MCP Server template for better AI Coding
About
This template provides a streamlined foundation for building Model Context Protocol (MCP) servers in Python. It's designed to make AI-assisted development of MCP tools easier and more efficient.
Details
- Author
- sontallive
- GitHub stars
- 17
- Downloads
- 459
- Categories
- Developer Tools
Jump to
- Ready-to-use MCP server implementation in Python
- Configurable transport modes (stdio, SSE)
- Example weather service integration (NWS API)
- Embedded MCP specifications and documentation for AI understanding
- Minimal dependencies and clean, documented code structure
- Cursor Rules integration for improved coding assistance
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Server template for better AI CodingCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, create a virtual environment, install dependencies with pip install -e ., then run the example server using python server.py --transport stdio (for CLI) or python server.py --transport sse --host 0.0.0.0 --port 8080 (for web apps). Custom tools can be created by importing FastMCP and using the @mcp.tool() decorator.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server template for better ai coding": {
"mcp-server-python-template": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
}
}
McpServers
{
"mcp-server-python-template": {
"command": "python",
"args": [
"-m",
"venv",
".venv"
]
}
}
MCP Server template for better AI Coding
> Inspired by MCP Official Tutorial
Overview
This template provides a streamlined foundation for building Model Context Protocol (MCP) servers in Python. It's designed to make AI-assisted development of MCP tools easier and more efficient.
Features
- Ready-to-use MCP server implementation
- Configurable transport modes (stdio, SSE)
- Example weather service integration (NWS API)
- Clean, well-documented code structure
- Minimal dependencies
- Embedded MCP specifications and documentation for improved AI tool understanding
Cursor Rules Integration
This project uses Cursor Rules for improved AI coding assistance, with patterns from Awesome Cursor Rules.
- Clean Code Guidelines: Built-in clean code rules help maintain consistency and quality
- Enhanced AI Understanding: Rules provide context that helps AI assistants generate better code
- Standardized Patterns: Follow established best practices for MCP server implementation
Cursor Rules help both AI coding assistants and human developers maintain high code quality standards and follow best practices.
Integrated MCP Documentation
This template includes comprehensive MCP documentation directly in the project:
- Complete MCP Specification (protocals/mcp.md): The full Model Context Protocol specification that defines how AI models can interact with external tools and resources. This helps AI assistants understand MCP concepts and implementation details without requiring external references.
- Python SDK Guide (protocals/sdk.md): Detailed documentation for the MCP Python SDK, making it easier for AI tools to provide accurate code suggestions and understand the library's capabilities.
- Example Implementation (protocals/example_weather.py): A practical weather service implementation demonstrating real-world MCP server patterns and best practices.
Having these resources embedded in the project enables AI coding assistants to better understand MCP concepts and provide more accurate, contextually relevant suggestions during development.
Requirements
- Python 3.12+
- Dependencies:
- mcp>=1.4.1
- httpx>=0.28.1
- starlette>=0.46.1
- uvicorn>=0.34.0
Getting Started
Installation
1. Clone this repository:
git clone https://github.com/yourusername/mcp-server-python-template.git
cd mcp-server-python-template
2. Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .
Running the Example Server
The template includes a weather service example that demonstrates how to build MCP tools:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





