智能体工作流

python-mcp-server-generator

github/awesome-copilot

Use this skill when the user wants to create a new Model Context Protocol (MCP) server in Python. Also use it to expose Python functions, an API, or a database to AI clients as MCP tools. The skill makes a uv project with the MCP Python SDK v2 (MCPServer), typed tools, in-memory tests, and client configuration. Do not use it for an MCP client or for a server in another language.

  • 1万 次安装
  • 4.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/github/awesome-copilot --skill python-mcp-server-generator

要点

Complete Python MCP server project generator with tools, resources, and proper configuration.

  • Scaffolds a new Python project using uv with MCP SDK, proper directory structure, and .gitignore
  • Supports both stdio (local) and streamable-http (remote) transport types with optional host, port, and stateless mode configuration
  • Generates decorated tools, resources, and prompts with automatic schema generation from type hints and docstrings
  • Includes comprehensive error handling, async/await support, Pydantic model integration, and context managers for resource cleanup
  • Provides testing guidance via MCP Inspector, Claude Desktop installation, and example tool invocations with troubleshooting tips

SKILL.md

Python MCP Server Generator

Create a Model Context Protocol (MCP) server in Python with the official MCP Python SDK v2. SDK v2 supports the MCP specification revision 2026-07-28. The same server also serves clients that use earlier revisions.

Workflow

Copy this checklist and track your progress:

  • Step 1: Create the project.
  • Step 2: Write the server.
  • Step 3: Write the tests.
  • Step 4: Run the tests until they pass.
  • Step 5: Configure the client.

Step 1: Create the project

Run these commands:

Python MCP Server Generator

Create a Model Context Protocol (MCP) server in Python with the official MCP Python SDK v2. SDK v2 supports the MCP specification revision 2026-07-28. The same server also serves clients that use earlier revisions.

Workflow

Copy this checklist and track your progress:

  • Step 1: Create the project.
  • Step 2: Write the server.
  • Step 3: Write the tests.
  • Step 4: Run the tests until they pass.
  • Step 5: Configure the client.

Step 1: Create the project

Run these commands: