mcp-py-template
Click on "Deploy 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., "@mcp-py-templateadd 5 and 3"
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.
mcp-py-template
Production-ready Model Context Protocol (MCP) server template in Python, built on the official mcp SDK (FastMCP). Ships an example tool, resource, and prompt.
Use this template
gh repo create my-mcp --template vidyasagarr7/mcp-py-templateRelated MCP server: MCP Template
Layout
src/mcp_py_template/
server.py # FastMCP registration + stdio entry point
core.py # pure domain logic (testable, no MCP concerns)
__init__.py
tests/ # pytest specs (core + server)Golden rule: registration in server.py, logic in core.py.
Develop
uv sync --extra dev # create .venv + install deps
uv run mcp-py-template # run server over stdio
uv run pytest # tests + coverage
uv run ruff check . # lint
uv run mypy # strict type-checkInspect
uv run mcp dev src/mcp_py_template/server.py # MCP Inspector (dev UI)Register a new tool
Add pure logic to
src/mcp_py_template/core.py.Add a unit test in
tests/.Register it in
server.pywith@mcp.tool()(type hints become the schema).
Connect from a client
{
"mcpServers": {
"my-mcp": { "command": "uv", "args": ["run", "mcp-py-template"] }
}
}Make it yours (rename checklist)
pyproject.toml:name,description,[project.scripts], coverage targetRename the package dir
src/mcp_py_template/and update importsserver.py:FastMCP("mcp-py-template")nameReplace the example
addtool /greetingresource /summarizeprompt with your own
License
MIT
Available Tools
1 tooladdA
Add two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. 'Add two numbers' fully describes the behavior for a pure arithmetic operation with no side effects, hidden state, or special requirements. The simplicity of the operation makes this sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, ultra-concise sentence with no wasted words. It is perfectly front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a trivial two-number addition with an output schema and no nested objects, the description is complete. The simplicity of the tool means no further context is required.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It mentions 'two numbers' which maps to parameters a and b, but does not provide individual parameter detail. Since addition is commutative, order is irrelevant, and the description is minimally adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Add two numbers' clearly states the specific verb 'Add' and the resource 'two numbers', which unambiguously distinguishes this from sibling tools like subtract, multiply, and divide.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives, but the purpose itself implies usage: use when you need to add two numbers. No exclusions or alternative recommendations are provided, so it relies on the obviousness of the operation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
add
TDQS
Scored across 1 tool
With only one tool, there is no ambiguity; the tool's purpose is clear and distinct.
With a single tool, naming consistency is not an issue; the name 'add' is straightforward.
The server has only one trivial tool (addition), which is far too few for any meaningful scope, indicating an extreme mismatch.
The tool set is severely incomplete for even basic arithmetic operations; only addition is provided, lacking subtraction, multiplication, etc.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA foundational template for building MCP servers in Python using Streamable HTTP transport. Provides example implementations of tools, resources, and prompts to help developers create custom MCP integrations for AI assistants.-
- AlicenseNot gradedqualityDmaintenanceA production-ready Python template for building MCP servers with enterprise features including registry integration, configuration management, structured logging, and extensible patterns for tools, resources, and prompts.MIT
- AlicenseNot gradedqualityDmaintenanceA minimal template MCP server demonstrating basic tools, resources, and prompts functionality. Includes example implementations like a hello tool, history resource, and greet prompt for learning MCP development.1 npmISC
- AlicenseAqualityCmaintenanceProduction-ready MCP server starter templates in TypeScript and Python. Includes tool, resource, and prompt patterns with Claude Desktop integration configs.22 npm2MIT