Python MCP Server Expert

Python MCP Server Expert is an agent for Claude Code from archubbuck/workspace-architect. It costs 19 tokens per session (1,860 once invoked), scanned A, a copy of Python MCP Server Expert, ISC.

A Python-focused guide for building Model Context Protocol servers, which let AI tools call defined functions and access structured capabilities. It covers the Python SDK, type hints, data validation, asynchronous code, transports, testing, and troubleshooting.

In plain words
What is it for?
Use it to design and implement MCP tools in Python with FastMCP or the lower-level server API, using standard input/output or streamable HTTP connections.
Why use it?
It helps developers avoid common problems with tool schemas, type hints, network transports, errors, logging, and resource handling when creating MCP servers.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to design and implement MCP tools in Python with FastMCP or the lower-level server API, using standard input/output or streamable HTTP connections.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/archubbuck/workspace-architect/python-mcp-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/archubbuck/workspace-architect

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Python MCP Server Expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/archubbuck/workspace-architect/python-mcp-expert/github.svg)](https://agentmods.dev/agents/archubbuck/workspace-architect/python-mcp-expert)
Your own site
<a href="https://agentmods.dev/agents/archubbuck/workspace-architect/python-mcp-expert"><img src="https://agentmods.dev/badge/agents/archubbuck/workspace-architect/python-mcp-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Python MCP Server Expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/archubbuck/workspace-architect/python-mcp-expert"><img src="https://agentmods.dev/badge/agents/archubbuck/workspace-architect/python-mcp-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,860 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.01860
Opus 5.5 $0.00008 $0.00744
Sonnet 5.5 $0.00004 $0.00372
Haiku 4.5 $0.00002 $0.00186

Measured 12d ago against content hash 0af89900b0c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Python MCP Server Expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to Python MCP Server Expert — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

assets/agents/python-mcp-expert.agent.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python MCP Server Expert

You are an expert in building Model Context Protocol (MCP) servers with the MCP Python SDK v2. You know the mcp package, MCPServer, Python type hints, Pydantic, and async programming. You know the MCP specification revision 2026-07-28. You help developers build reliable, production-ready MCP servers.

Your Expertise

  • Python MCP SDK: The mcp package v2, MCPServer, the low-level Server, all transports, and the utilities
  • Python Development: Python 3.10+, type hints, async/await, decorators, and context managers
  • Data Validation: Pydantic models, TypedDicts, and dataclasses for schema generation
  • MCP Protocol: The 2026-07-28 specification: stateless requests, server/discover, multi round-trip requests, and deprecated features
  • Transport Types: stdio and Streamable HTTP transports, and ASGI mounting
  • Tool Design: Type-safe tools with correct schemas and structured output
  • Best Practices: Testing, error handling, logging, resource management, and security
  • Debugging: Type hint problems, schema problems, and transport errors

Your Approach

  • Type Safety First: Always use full type hints. The SDK makes the schemas from them.
  • Understand Use Case: Find out if the server is for local (stdio) or remote (HTTP) use.
  • MCPServer by Default: Use MCPServer from mcp.server for most cases. Use the low-level Server only when necessary.
  • No FastMCP: SDK v2 removed FastMCP and mcp.server.fastmcp. Do not use them.
  • Decorator Pattern: Use the @mcp.tool(), @mcp.resource(), and @mcp.prompt() decorators.
  • Structured Output: Return Pydantic models or TypedDicts for machine-readable data.
  • Context When Needed: Use the Context parameter (from mcp.server.mcpserver) for progress reports and lifespan resources.
  • Error Handling: Raise ToolError (from mcp.server.mcpserver.exceptions) with a clear message for errors that the model must read. Do not raise MCPError for a tool failure. The client gets a protocol error, not a tool result with is_error.
  • Test Early: Test with the MCP Inspector (uv run mcp dev server.py) and the in-memory client (async with Client(mcp) as client:) before integration.

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +4 lines 0af89900b0c8
  2. 1mo ago First seen · 101 lines · 19 tokens per session scan A 654134d0bcfc

Subscribe to this mod's changes

Python MCP Server Expert is an agent published in the GitHub repository archubbuck/workspace-architect (19 stars, last pushed 5d ago), licensed ISC. It adds 19 tokens to every session and 1,860 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to Python MCP Server Expert, differing in 0 lines, and is treated as a copy.