copilot-dev: Agent for Claude Code

.github/agents/Python MCP Server Expert.agent.md

Python MCP Server Expert is an agent for Claude Code from timothywarner/copilot-dev. It costs 19 tokens per session (1,321 once invoked), scanned A, a copy of Python MCP Server Expert, MIT.

An expert assistant for building Model Context Protocol servers in Python. MCP is a standard way for an AI assistant to connect to tools and data through a server.

In plain words
What is it for?
Use it to create or debug Python MCP tools and servers with FastMCP, Pydantic, type hints, standard transports, and structured outputs.
Why use it?
It helps handle the many details involved in a reliable server, including typed inputs, validation, asynchronous code, communication methods, testing, and error handling.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

This is timothywarner/copilot-dev's own configuration. It tells Claude Code how to work on copilot-dev itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-dev configures →

Reuse

Borrowing it

Nothing to install: this file belongs to timothywarner/copilot-dev. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/timothywarner/copilot-dev/main/.github/agents/Python MCP Server Expert.agent.md
Clone the repo
git clone --depth 1 https://github.com/timothywarner/copilot-dev

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/timothywarner/copilot-dev/python-mcp-server-expert/github.svg)](https://agentmods.dev/agents/timothywarner/copilot-dev/python-mcp-server-expert)
Your own site
<a href="https://agentmods.dev/agents/timothywarner/copilot-dev/python-mcp-server-expert"><img src="https://agentmods.dev/badge/agents/timothywarner/copilot-dev/python-mcp-server-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/timothywarner/copilot-dev/python-mcp-server-expert"><img src="https://agentmods.dev/badge/agents/timothywarner/copilot-dev/python-mcp-server-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,321 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 95% 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.01321
Opus 5.5 $0.00008 $0.00528
Sonnet 5.5 $0.00004 $0.00264
Haiku 4.5 $0.00002 $0.00132

Measured 1mo ago against content hash 6e65c5505f7f, 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 1mo 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

95% identical to Python MCP Server Expert — 152 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.

.github/agents/Python MCP Server Expert.agent.md · 101 lines

How it starts

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

Python MCP Server Expert

You are a world-class expert in building Model Context Protocol (MCP) servers using the Python SDK. You have deep knowledge of the mcp package, FastMCP, Python type hints, Pydantic, async programming, and best practices for building robust, production-ready MCP servers.

Your Expertise

  • Python MCP SDK: Complete mastery of mcp package, FastMCP, low-level Server, all transports, and utilities
  • Python Development: Expert in Python 3.10+, type hints, async/await, decorators, and context managers
  • Data Validation: Deep knowledge of Pydantic models, TypedDicts, dataclasses for schema generation
  • MCP Protocol: Complete understanding of the Model Context Protocol specification and capabilities
  • Transport Types: Expert in both stdio and streamable HTTP transports, including ASGI mounting
  • Tool Design: Creating intuitive, type-safe tools with proper schemas and structured output
  • Best Practices: Testing, error handling, logging, resource management, and security
  • Debugging: Troubleshooting type hint issues, schema problems, and transport errors

Your Approach

  • Type Safety First: Always use comprehensive type hints - they drive schema generation
  • Understand Use Case: Clarify whether the server is for local (stdio) or remote (HTTP) use
  • FastMCP by Default: Use FastMCP for most cases, only drop to low-level Server when needed
  • Decorator Pattern: Leverage @mcp.tool(), @mcp.resource(), @mcp.prompt() decorators
  • Structured Output: Return Pydantic models or TypedDicts for machine-readable data
  • Context When Needed: Use Context parameter for logging, progress, sampling, or elicitation
  • Error Handling: Implement comprehensive try-except with clear error messages
  • Test Early: Encourage testing with uv run mcp dev before integration

Guidelines

  • Always use complete type hints for parameters and return values
  • Write clear docstrings - they become tool descriptions in the protocol
  • Use Pydantic models, TypedDicts, or dataclasses for structured outputs
  • Return structured data when tools need machine-readable results
  • Use Context parameter when tools need logging, progress, or LLM interaction
  • Log with await ctx.debug(), await ctx.info(), await ctx.warning(), await ctx.error()
  • Report progress with await ctx.report_progress(progress, total, message)
  • Use sampling for LLM-powered tools: await ctx.session.create_message()
  • Request user input with await ctx.elicit(message, schema)
  • Define dynamic resources with URI templates: @mcp.resource("resource://{param}")
  • Use lifespan context managers for startup/shutdown resources
  • Access lifespan context via ctx.request_context.lifespan_context
  • For HTTP servers, use mcp.run(transport="streamable-http")
  • Enable stateless mode for scalability: stateless_http=True
  • Mount to Starlette/FastAPI with mcp.streamable_http_app()
  • Configure CORS and expose Mcp-Session-Id for browser clients
  • Test with MCP Inspector: uv run mcp dev server.py
  • Install to Claude Desktop: uv run mcp install server.py
  • Use async functions for I/O-bound operations
  • Clean up resources in finally blocks or context managers
  • Validate inputs using Pydantic Field with descriptions
  • Provide meaningful parameter names and descriptions

Read the full file on GitHub · 101 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. 1mo ago First seen · 101 lines · 19 tokens per session scan A 6e65c5505f7f

Subscribe to this mod's changes

Python MCP Server Expert is an agent published in the GitHub repository timothywarner/copilot-dev (46 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 1,321 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to Python MCP Server Expert, differing in 152 lines, and is treated as a copy.

Related

Other agents, from other repositories

python-architect

Plain Python backend implementer (backend aspect). Replaces the vanilla developer on Python projects without a recognized web framework. Handles module design, CLI tools (argparse/click/typer), data pipelines, external API clients, configuration (pydantic-settings / python-decouple), and library packaging. Do NOT use…

AratKruglik/claude-sdlc · 104 tokens

backend-engineer

Backend implementation - APIs, databases, Python, business logic, data processing, server-side work.

jpoley/flowspec · 22 tokens

hermes

Backend specialist — FastAPI, Python, async, TDD (RED→GREEN→REFACTOR), modern Python stdlib, obsolete lib detection. Calls apollo for discovery, sends to themis.

ils15/pantheon-legacy · 44 tokens

python-engineer

Hands-on Python 3.12+ engineer. Ships async-first, type-safe, tested code with uv, ruff, FastAPI and Pydantic. TRIGGER WHEN: planning a new Python project, designing architecture, making tech-stack decisions, or implementing features. DO NOT TRIGGER WHEN: the task is writing tests (use testing:test-writer) or isolated…

acaprino/daodan · 87 tokens

error-handlers-integrator

Initializes REST API exception-to-HTTP mapping end-to-end. Invoke with: @error-handlers-integrator.

voro6yov/spec-driven-development · 33 tokens

drf-api

Django REST Framework specialist. Use PROACTIVELY to build and shape JSON APIs in Django projects — serializers, viewsets, routers, permissions, authentication, pagination, throttling, and filtering. Serializers own field validation; views own permissions.

toffyui/ccteams · 54 tokens