PyMCP Kit
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PyMCP Kitadd 3 and 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PyMCP Kit
Documentation | Quick Start | Tasks | Security | Middleware
PyMCP Kit is a capability-first MCP server toolkit for FastAPI. It keeps the built-in transport surface small, supports Streamable HTTP and stdio, and ships app-scoped registries, roots, tasks, and optional auth hooks without pulling in a larger framework.
Quick Start
Install from PyPI:
pip install pymcp-kitFor local development from this repo:
pip install -e .Register tools, prompts, and resources, then build an app:
from pymcp import (
CapabilitySettings,
ServerSettings,
create_app,
prompt_registry,
resource_registry,
tool_registry,
)
@tool_registry.register
def add(a: float, b: float) -> str:
return str(a + b)
@prompt_registry.register(description="Create a release summary prompt.")
def summarize_release(topic: str) -> str:
return f"Summarize the release impact for {topic}."
@resource_registry.register(
uri="memo://release-plan",
name="release_plan",
description="Latest release checklist",
mime_type="text/markdown",
)
def release_plan() -> str:
return "# Release Plan\n- freeze API\n- tag build\n"
@resource_registry.register_template(
uri_template="note://{topic}",
name="topic_note",
description="Parameterized note resource keyed by topic.",
)
def topic_note(topic: str) -> str:
return f"Notes for topic: {topic}"
app = create_app(
server_settings=ServerSettings(
name="demo-server",
version="0.1.0",
capabilities=CapabilitySettings(
advertise_empty_prompts=False,
advertise_empty_resources=False,
),
)
)The HTTP transport is mounted at /mcp. For local-process integrations, use run_stdio_server(app).
Hosted documentation is built from docs/ with MkDocs Material and published to GitHub Pages.
Related MCP server: Test MCP Server
Features
Streamable HTTP transport for networked MCP servers
Stdio transport for local-process MCP hosts
Tool, prompt, and resource registries, including parameterized resource templates
Roots, resource subscriptions, and app-scoped session lifecycle
Task-aware tool execution with progress, cancellation, and result polling
Optional authentication and authorization hooks
Capability advertising through
CapabilitySettingsFastAPI middleware integration through
MiddlewareConfigSmall surface area focused on practical MCP server builds
Supported MCP Methods
Server-side JSON-RPC methods and notifications implemented by pymcp-kit:
Lifecycle
initializepingnotifications/initializednotifications/cancelled
Tools
tools/list(cursor pagination)tools/call
Prompts
prompts/list(cursor pagination)prompts/get
Resources
resources/list(cursor pagination)resources/templates/list(cursor pagination)resources/readresources/subscriberesources/unsubscribenotifications/resources/updated(server → client)notifications/resources/list_changed(server → client, when enabled)
Completions
completion/complete(whencompletions_enabledis set)
Tasks
tasks/list(cursor pagination)tasks/gettasks/canceltasks/resultnotifications/tasks/status(server → client)notifications/progress(server → client)
Client capabilities (server-initiated helpers)
These are not inbound server handlers; the toolkit sends requests or notifications to the client when the client advertises the capability:
roots/listviarequest_roots_list()notifications/roots/list_changed(client → server notification)elicitation/createviarequest_elicitation()sampling/createMessageviarequest_sampling()notifications/messageviasend_log_message()
List operations support optional cursor / nextCursor pagination. Page size is controlled by CapabilitySettings.list_page_size (default 50).
See Runtime Surface for protocol versions, HTTP endpoints, and capability settings.
Example Server
Run the bundled example server:
python example/run_server.pyThat starts a FastAPI app on http://127.0.0.1:8088 with the MCP endpoint mounted at http://127.0.0.1:8088/mcp.
Stdio Transport
from pymcp import create_app, run_stdio_server
app = create_app()
run_stdio_server(app)Middleware
Middleware stays separate from capability registration. Use MiddlewareConfig to control CORS, compression, logging, auth hooks, and custom ASGI middleware, then pass it into create_app(). See the hosted Middleware guide for examples.
Scope
Prompts and resources are advertised only when registered by default
Registries are copied into an app-scoped manager when
create_app()runsStreamable HTTP and stdio are the only built-in transports
Extra transports such as SSE and HTTP NDJSON are intentionally not shipped in
pymcp-kit
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Agent-Hellboy/py-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server