# anirbanbasu-pymcp

A Python starter kit for building your own MCP servers with FastMCP, shipped with a handful of working tools and resources.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: anirbanbasu
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/anirbanbasu/pymcp
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/anirbanbasu-pymcp

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Remote server: `https://server.smithery.ai/@anirbanbasu/pymcp/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add anirbanbasu-pymcp --url https://server.smithery.ai/@anirbanbasu/pymcp/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "anirbanbasu-pymcp": {
            "url": "https://server.smithery.ai/@anirbanbasu/pymcp/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "anirbanbasu-pymcp": {
            "type": "http",
            "url": "https://server.smithery.ai/@anirbanbasu/pymcp/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http anirbanbasu-pymcp https://server.smithery.ai/@anirbanbasu/pymcp/mcp
```

## When to use it
- 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
- Greet me with `greet` and show the UTC timestamp
- Generate a 20-character password with special characters
- Search the web with `text_web_search` for recent FastMCP posts, region `us-en`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
