mcp-server-template-python
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-server-template-pythongreet Alice"
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-server-template-python
A very simple Python template for building MCP servers using Streamable HTTP transport.
Overview
This template provides a foundation for creating MCP servers that can communicate with AI assistants and other MCP clients. It includes a simple HTTP server implementation with example tools, resources & prompts to help you get started building your own MCP integrations.
Related MCP server: Streamable HTTP Python MCP Server Template
Prerequisites
Installation
Clone the repository:
git clone git@github.com:alpic-ai/mcp-server-template-python.git
cd mcp-server-template-pythonInstall python version & dependencies:
uv python install
uv sync --lockedUsage
Start the server on port 3000:
uv run main.pyRunning the Inspector
Requirements
Node.js: ^22.7.5
Quick Start (UI mode)
To get up and running right away with the UI, just execute the following:
npx @modelcontextprotocol/inspectorThe inspector server will start up and the UI will be accessible at http://localhost:6274.
You can test your server locally by selecting:
Transport Type: Streamable HTTP
Development
Adding New Tools
To add a new tool, modify main.py:
@mcp.tool(
title="Your Tool Name",
description="Tool Description for the LLM",
)
async def new_tool(
tool_param1: str = Field(description="The description of the param1 for the LLM"),
tool_param2: float = Field(description="The description of the param2 for the LLM")
)-> str:
"""The new tool underlying method"""
result = await some_api_call(tool_param1, tool_param2)
return resultAdding New Resources
To add a new resource, modify main.py:
@mcp.resource(
uri="your-scheme://{param1}/{param2}",
description="Description of what this resource provides",
name="Your Resource Name",
)
def your_resource(param1: str, param2: str) -> str:
"""The resource template implementation"""
# Your resource logic here
return f"Resource content for {param1} and {param2}"The URI template uses {param_name} syntax to define parameters that will be extracted from the resource URI and passed to your function.
Adding New Prompts
To add a new prompt , modify main.py:
@mcp.prompt("")
async def your_prompt(
prompt_param: str = Field(description="The description of the param for the user")
) -> str:
"""Generate a helpful prompt"""
return f"You are a friendly assistant, help the user and don't forget to {prompt_param}."
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA foundational template for building MCP servers in Python using Streamable HTTP transport. Provides example implementations of tools, resources, and prompts to help developers create custom MCP integrations for AI assistants.Last updated
- Flicense-qualityDmaintenanceA starter template for building MCP servers in Python using the streamable HTTP transport protocol. Provides a foundation with the MCP Python SDK and example configuration to quickly develop custom MCP servers.Last updated2
- Alicense-qualityDmaintenanceA TypeScript template for building MCP servers with Streamable HTTP transport, providing example tools, resources, and prompts to help developers create custom MCP integrations.Last updated19ISC
- AlicenseAqualityCmaintenanceProduction-ready MCP server template in Python with example tool, resource, and prompt.Last updated1MIT
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
MCP server for generating rough-draft project plans from natural-language prompts.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/swapnildagade1213/mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server