python-mcp-server-generator

Generate a complete Python MCP server project with tools, resources, and transport configuration.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/miyake-san/sogo-agent-platform --skill python-mcp-server-generator-miyake-san
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-mcp-server-generator
Source: https://github.com/miyake-san/sogo-agent-platform/tree/main/skills/core/python-mcp-server-generator
Command: npx skills add https://github.com/miyake-san/sogo-agent-platform --skill python-mcp-server-generator-miyake-san

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a Model Context Protocol server from scratch involves repetitive boilerplate: project scaffolding, dependency setup, transport configuration, and tool schema definitions. This Skill generates a complete, correctly structured Python MCP server so you can focus on tool logic instead of setup. ## Core Features & Use Cases - Project Scaffolding: Initializes a uv-based Python project with the mcp[cli] SDK, .gitignore, and a runnable server entry point. - Tool, Resource, and Prompt Generation: Creates FastMCP tools with type hints and docstrings, plus optional resources and prompts using URI templates. - Transport Configuration: Supports stdio for local servers and streamable-http with stateless mode, JSON responses, and CORS for remote deployments. - Use Case: You need to expose an internal database query API to Claude Desktop. The Skill generates a stdio MCP server with typed tools, error handling, and install instructions via uv run mcp install server.py. ## Quick Start Generate a Python MCP server with a tool that queries my SQLite database and runs over stdio.

Frequently Asked Questions about python-mcp-server-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an MCP server in Python?

Initialize a project with uv, add the mcp[cli] package, and define a FastMCP server instance. Register tools with the @mcp.tool() decorator using type hints and docstrings, then run the server over stdio or streamable-http transport.

What is the difference between stdio and streamable-http MCP transport?

Stdio transport runs the server as a local subprocess, suited for desktop clients like Claude Desktop. Streamable-http exposes the server over HTTP with options for stateless mode, JSON responses, and CORS, suited for remote or multi-client deployments.

How do I test a Python MCP server locally?

Run the MCP Inspector with `uv run mcp dev server.py` to interactively test tools and resources. For stdio servers you can also execute `python server.py` directly, or install into Claude Desktop with `uv run mcp install server.py`.

Does FastMCP support async tools and structured output?

Yes, FastMCP supports async tool functions for I/O-bound operations and structured output through Pydantic models or TypedDicts. Type hints on parameters and return values automatically generate the tool schemas.

Why should MCP servers log to stderr instead of stdout?

Stdio MCP servers use stdout for protocol messages, so printing logs there corrupts the communication stream. Log to stderr or use the Context logging API to keep the protocol channel clean.