- Home
- MCP servers
- Template
Template
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have a lightweight MCP server template that lets you expose functions over a Streamable HTTP transport. It’s designed for quick local development and easy deployment, so you can connect an MCP client to a server running Python code and add custom tools to extend capabilities.
How to use
Start by launching the server locally and then connect your MCP client to the designated MCP endpoint. The server is accessible via the HTTP path that ends with /mcp, and you interact with it using a compatible MCP client. You can run the server in one terminal and perform a separate inspection or tooling step in another terminal if needed. When you connect a client, you’ll be able to call the exposed tools and receive results in real time.
How to install
Prerequisites you need to have installed on your development machine are Python 3.13 (or a compatible Python environment) and a Python package manager. You’ll also benefit from a conda-enabled workflow for environment management.
Step by step commands you should run locally to set up and run the server are listed here as concrete commands.
Customization
Add more tools by decorating functions with @mcp.tool. This lets you extend the MCP server with custom endpoints that your clients can call.
@mcp.tool
def calculate(x: float, y: float, operation: str) -> float:
"""Perform basic arithmetic operations."""
if operation == "add":
return x + y
elif operation == "multiply":
return x * y
# ...
Available tools
calculate
Decorator-based tool that performs basic arithmetic operations such as add and multiply, extending the MCP with custom endpoints.