mcp -template-python
An exemple python server template
claude mcp add --transport stdio alpic-ai-mcp-server-template-python uvx mcp-server-template-python
How to use
This MCP server is a Python-based template that provides a minimal foundation for building MCP servers using the Streamable HTTP transport. It exposes a simple set of example tools, resources, and prompts in main.py to help you get started integrating with AI assistants and other MCP clients. To run locally, start the server with the uvx workflow, and connect via the Streamable HTTP transport to enable LLMs to discover and invoke your tools, resources, and prompts. The included inspector (when used) can help you validate routes, tools, and prompts and view a UI at http://localhost:6274.
How to install
- Prerequisites:
- Python and uv (uv is the Python tool installed per the project prerequisites): https://docs.astral.sh/uv/getting-started/installation/
- Installation steps:
- Clone the repository:
git clone git@github.com:alpic-ai/mcp-server-template-python.git cd mcp-server-template-python - Install Python version & dependencies using uv:
uv python install uv sync --locked - Run the server (default port 3000):
uv run main.py
- Clone the repository:
- Optional: to test the Inspector UI locally, ensure Node.js is installed and run the inspector command described in the repository if needed:
The inspector UI will be accessible at http://localhost:6274 after starting the inspector server.npx @modelcontextprotocol/inspector
Additional notes
- The template uses Streamable HTTP transport. Ensure your client can reach http://<host>:3000/mcp for the MCP endpoint.
- To add new tools, resources, or prompts, modify main.py following the examples in the Development section of the README.
- If you encounter port conflicts, you can run the server on a different port by configuring the uv runner or the main.py settings as needed.
- The Inspector requires Node.js (as specified in the README); use the UI for quick testing of your MCP server integration.
- This template is a starting point. Replace or extend @mcp.tool, @mcp.resource, and @mcp.prompt definitions to fit your specific capabilities.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP