anirbanbasu-pymcp — Claude Code MCP server: a FastMCP template
A Python starter kit for building your own MCP servers with FastMCP, shipped with a handful of working tools and resources.
claude mcp add --transport http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcpWhat anirbanbasu-pymcp does
PyMCP is meant to be forked. You clone it when you need a working skeleton for an MCP server written in Python on top of FastMCP, and the bundled examples show how tools, resources and prompts are wired up.
The tool list covers a few everyday jobs: greet returns a hello with a UTC timestamp, generate_password builds a password between 8 and 64 characters long, text_web_search queries the web through DDGS, permutations counts ordered selections, and run_python_code executes snippets in the Pydantic Monty interpreter. Resources serve the PyMCP logo as PNG with a SHA3-512 hash, the same logo as SVG, and a Unicode character picked from a number modulo 10.
Web search can go out through a proxy if you set DDGS_PROXY. Pydantic Monty is flagged experimental with partial language support, so run_python_code will choke on anything non-trivial. The template also dropped its sampling and elicitation examples: ctx.sample() and ctx.elicit() are deprecated in FastMCP, and code using them only runs against clients on the older protocol. Everything else keeps working, since the SDK negotiates the protocol version on each connection.
What it helps with
- scaffold a Python MCP server without hand-building the project layout
- see how FastMCP declares tools and resources in practice
- produce a random password of a set length with complexity rules
- run a short Python snippet in a sandboxed interpreter
- compute the number of ordered k-selections from n items
Example prompts for the agent
- Greet me with
greetand show the UTC timestamp - Generate a 20-character password with special characters
- Search the web with
text_web_searchfor recent FastMCP posts, regionus-en
How to install anirbanbasu-pymcp
Platform CLI: remote server
claude mcp add --transport http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcpPlatform CLI: remote server
codex mcp add anirbanbasu-pymcp --url https://server.smithery.ai/@anirbanbasu/pymcp/mcpConfig file
{
"mcpServers": {
"anirbanbasu-pymcp": {
"url": "https://server.smithery.ai/@anirbanbasu/pymcp/mcp"
}
}
}Config file
{
"servers": {
"anirbanbasu-pymcp": {
"type": "http",
"url": "https://server.smithery.ai/@anirbanbasu/pymcp/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about anirbanbasu-pymcp
How do I install anirbanbasu-pymcp in Claude Code?
Run claude mcp add --transport http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcp.
What does anirbanbasu-pymcp do?
It gives the agent a set of Python tools and resources: a greeting, a password generator, DDGS web search, a permutations calculator and a Python runner. The repository itself is a template for your own FastMCP servers.
Why were the sampling and elicitation tools removed?
They relied on server-initiated calls to the client, and ctx.sample() and ctx.elicit() are now deprecated in FastMCP. Such code only works with clients speaking the older protocol.