- Home
- MCP servers
- Tvmcp
Tvmcp
- 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.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"kj14god-tvmcp": {
"command": "python",
"args": [
"src/server.py"
]
}
}
}You have a lightweight Python MCP server template that exposes an MCP endpoint via streamable HTTP. It’s designed for quick local testing and easy deployment, letting MCP clients connect to your server at a dedicated /mcp path.
How to use
Use the server by running the local MCP instance and connecting your MCP client to the dedicated endpoint path. Start the server in one terminal and, in a separate terminal, run an inspector tool to verify connectivity. The MCP endpoint is exposed at the /mcp path, and you’ll connect your client to that path over the Streamable HTTP transport.
How to install
Prerequisites you need on your system before getting started:
- Python 3.13 or later
- conda (or another environment tool) for creating an isolated environment
- pip (comes with Python)
Follow these concrete steps to set up and run the server locally:
# 1) Clone the template repository
git clone <your-repo-url>
cd mcp-server-template
# 2) Create and activate a Python environment (conda is shown here)
conda create -n mcp-server python=3.13
conda activate mcp-server
# 3) Install required Python packages
pip install -r requirements.txt
# 4) Run the MCP server
python src/server.py
# 5) In another terminal, start an inspector to test the MCP endpoint
npx @modelcontextprotocol/inspector
Additional steps and notes
Test the MCP connection by opening a browser or using your MCP client to reach http://localhost:3000 and connect to http://localhost:8000/mcp using the Streamable HTTP transport. The crucial path to connect to is the /mcp endpoint.
Configuration and customization
To add functionality, decorate your functions with the MCP tool decorator to expose new capabilities to MCP clients. For example, you can implement a simple calculator tool that can be invoked by clients.
@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
# additional operations can be added here
Available tools
calculate
A simple arithmetic tool exposed to MCP clients that can perform add and multiply operations based on the provided operands and operation type.