AI Prompt for MCP Servers
MCP server that exposes marketing data as Resources and canned workflows as Prompt Templates, installable in Windsurf. Covers resource URIs, subscriptions, and prompt argument design.
More prompts for MCP Servers.
Opinionated recipe for turning an existing send email via SendGrid API into a clean MCP tool. Focus: tight schema, JWT bearer token flow, retries, and Zod-backed input validation.
Opinionated recipe for turning an existing invoke AWS Lambda API into a clean MCP tool. Focus: tight schema, JWT bearer token flow, retries, and TypeBox-backed input validation.
Opinionated recipe for turning an existing create Linear issue API into a clean MCP tool. Focus: tight schema, API key in header flow, retries, and Zod-backed input validation.
Opinionated recipe for turning an existing query BigQuery API into a clean MCP tool. Focus: tight schema, OAuth 2.0 authorization code flow flow, retries, and ArkType-backed input validation.
Opinionated recipe for turning an existing search Notion pages API into a clean MCP tool. Focus: tight schema, JWT bearer token flow, retries, and Zod-backed input validation.
Production MCP server exposing query Elasticsearch index over WebSocket. Tested with custom host via MCP SDK — includes auth (JWT bearer token), schema validation (TypeBox), error handling, and host-specific install instructions.
You are building an MCP server that primarily surfaces **Resources** and **Prompt Templates** (not just tools) to give agents in Windsurf deep, navigable context over a marketing dataset. **Runtime:** TypeScript + Node 20 **Validator:** TypeBox **Auth:** OAuth 2.0 client credentials ## Background on the three MCP primitives - **Tools** → model-initiated actions (side-effectful) - **Resources** → application-attached read-only context (file-like, addressable by URI) - **Prompt Templates** → user-initiated canned workflows with typed arguments This server leans heavily on Resources and Prompts. Only expose Tools where a Resource won't do. ## Part 1 — Resource design for marketing 1. Define the resource URI scheme, e.g. `marketing://<entity>/<id>` and `marketing://search?q=...` 2. List 8 concrete resource examples with URI, MIME type, and a short description 3. Implement `resources/list` — paginated, with cursor 4. Implement `resources/read` — return `text` or `blob` content, set `mimeType` correctly 5. Implement `resources/templates/list` for parameterized URIs 6. If the dataset changes, implement `resources/subscribe` + `notifications/resources/updated` 7. Access control: which resources should require elevated auth? ## Part 2 — Prompt Templates for marketing workflows Design 6 Prompt Templates that Windsurf users would reach for. For each, provide: - `name` (kebab-case, scoped like `marketing/<verb>`) - `description` shown in the Windsurf UI picker - `arguments`: name, description, `required`, example value - The **messages** the template expands to, including how it attaches relevant Resources via `resource_link` or embedded resource contents - Why this is a Prompt (user-initiated) and not a Tool (model-initiated) Example workflows to cover: "summarize today's changes in <entity>", "compare two <entities>", "draft a <domain>-specific report from <resource>". ## Part 3 — Tools (only where needed) List any tools the agent genuinely needs (e.g. write-back actions). Keep the tool surface small; prefer resources for reads. ## Part 4 — Windsurf install + UX - Config JSON block for Windsurf's MCP settings - How Resources appear in the Windsurf UI (attach picker, @-mention, autocomplete) - How Prompt Templates appear (slash menu, command palette) - Screenshots/descriptions of the expected UX so the user knows what "working" looks like ## Part 5 — Implementation Write the full server code for: - The resource handler (list + read + templates + subscribe) - Two of the prompt templates, fully fleshed out - OAuth 2.0 client credentials middleware - A `Dockerfile` that runs under TypeScript + Node 20 ## Part 6 — Testing - Unit tests: resource URI parsing, prompt argument validation - Integration test driving the server via the MCP client SDK - A manual test plan for Windsurf: "open Windsurf, attach resource X, run prompt Y, expect Z" ## Part 7 — Versioning and backward compat When the marketing schema changes, how do you version resource URIs and prompt argument shapes without breaking existing agents? Document the deprecation path. Output must be concrete and implementation-ready. No vague "you could also...". Pick one stack, ship it.