Get the FREE Ultimate OpenClaw Setup Guide →

mcp -template-python

An exemple python server template

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:
  • Installation steps:
    1. Clone the repository:
      git clone git@github.com:alpic-ai/mcp-server-template-python.git
      cd mcp-server-template-python
      
    2. Install Python version & dependencies using uv:
      uv python install
      uv sync --locked
      
    3. Run the server (default port 3000):
      uv run main.py
      
  • Optional: to test the Inspector UI locally, ensure Node.js is installed and run the inspector command described in the repository if needed:
    npx @modelcontextprotocol/inspector
    
    The inspector UI will be accessible at http://localhost:6274 after starting the inspector server.

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

Sponsor this space

Reach thousands of developers