Code
Build an MCP server
A working tool server your AI client can connect to, with tests.
Fill it in
The tools to expose and what each returns.
Which SDK.
Prove each tool works before shipping it.
Your prompt
Build an MCP server in Python (FastMCP). [your what it should do] Design the tool surface before writing any of it. An MCP tool is read by a model, not a human, so the name and description ARE the interface: `search_notes(query, limit)` with a description saying what it returns and what it does not is worth more than any amount of implementation quality. A vague description produces a model that calls the tool wrongly and then apologises. Return structured content with clear errors. "Something went wrong" gives the caller nothing to retry differently. Write tests that call each tool the way a client will, and run them. An MCP server that has only been read is not known to work. Deliver the code, the install instructions, and the client config snippet.
Use Build an MCP serverOpens with everything above already filled in.
Why this works
An MCP tool is read by a model, not a human, so the name and description ARE the interface. A vague description produces a client that calls the tool wrongly and then apologises. This designs the surface first, returns structured errors a caller can act on, and runs tests before handing it over.
Questions
- Python or TypeScript?
- Either.
- How do I connect it?
- You get the client config snippet along with the code.