mcp-py-template
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., "@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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
- addA
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/vidyasagarr7/mcp-py-template'
If you have feedback or need assistance with the MCP directory API, please join our Discord server