Browse AI Agents & MCP SECTION 4: Model Context Protocol (MCP)

The MCP Server Implementation Prompt

4 fill-in slots · from The AI Prompt Handbook for AI Agents & MCP

Your details

0/4 filled

The MCP Server Implementation Prompt

Help me implement an MCP server.

Language and runtime: [SPECIFY]
Design: [PASTE THE DESIGN FROM ABOVE]
Transport: [STDIO FOR LOCAL / HTTP FOR REMOTE — VERIFY CURRENT
OPTIONS AGAINST THE SPECIFICATION]

Produce:
1. Project structure
2. The server skeleton with initialisation
3. Tool registration, with one fully worked example
4. Resource registration, with one fully worked example
5. Error handling patterns
6. Logging: what to log and at what level
7. Configuration: what should be environment-dependent
8. Graceful shutdown

Constraints:
- Use the official SDK for [LANGUAGE] if one exists. Tell me if you
  are unsure whether one exists rather than guessing.
- Mark every function name, class name, and import path you are not
  certain about as [VERIFY AGAINST SDK DOCUMENTATION]
- Do not invent API signatures. If you do not know the exact
  binding, describe what it does and mark it for me to look up.
- Do not state a protocol version number

I will verify every API surface against the current SDK docs before
running this.

Highlighted [slots] are still empty. Downloads are plain .txt — paste into any AI assistant.