pandaow3r/mcp_server_test
If you are the rightful owner of mcp_server_test and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This template provides a comprehensive setup for deploying a Model Context Protocol (MCP) server using modern Python and Docker technologies.
dummy_tool
A sample tool that processes input parameters.
π MCP Server Template
A production-ready Python MCP (Model Context Protocol) server template
Deploy to Smithery and other MCP platforms with zero configuration!
π― Quick Start β’ π¦ Features β’ π Deploy β’ π οΈ Customize
β¨ Features
- π― Zero-Config Deployment - Ready for Smithery and other MCP platforms
- π Modern Python - Built with Python 3.11+ and FastMCP
- π³ Docker Ready - Containerized for easy deployment
- π§ Template Structure - Perfect starting point for your MCP tools
- π Well Documented - Clear examples and best practices
- β‘ Fast Setup - Get your MCP server running in minutes
π― Quick Start
1. Use This Template
Click the "Use this template" button at the top of this repository to create your own MCP server.
2. Clone & Setup
git clone https://github.com/yourusername/your-mcp-server.git
cd your-mcp-server
pip install -r requirements.txt
3. Run Locally
python server.py
4. Test Your Tools
# Your MCP server is now running and ready to accept connections!
π¦ What's Included
mcp-template/
βββ π app.py # Your tool implementations
βββ π server.py # MCP server configuration
βββ π requirements.txt # Python dependencies
βββ π³ Dockerfile # Container configuration
βββ βοΈ smithery.yaml # Smithery deployment config
βββ π README.md # This beautiful documentation
π οΈ Customize Your Tools
Adding New Tools
- Implement your tool logic in
app.py
:
def myAwesomeTool(param: str) -> str:
"""Your amazing tool implementation."""
# Add your logic here
return f"Processed: {param}"
- Register it in the MCP server in
server.py
:
@mcp.tool()
async def my_awesome_tool(param: str) -> str:
"""
Description of what your tool does.
"""
result = myAwesomeTool(param)
return result
Example Tool Structure
The template includes a dummy tool to get you started:
@mcp.tool()
async def dummy_tool(param: str) -> str:
"""
A sample tool that processes input parameters.
"""
awesome_response = dummyTool(param)
return awesome_response
π Deploy
Smithery Deployment
This template is Smithery-ready! The smithery.yaml
configuration is already set up:
- Push your customized code to GitHub
- Connect your repository to Smithery
- Deploy with one click! π
Docker Deployment
# Build the container
docker build -t my-mcp-server .
# Run the container
docker run -p 8000:8000 my-mcp-server
Manual Deployment
Deploy to any platform that supports Python applications:
pip install -r requirements.txt
python server.py
π§ Configuration
Environment Variables
Customize your MCP server behavior:
export MCP_SERVER_NAME="my-awesome-mcp"
export LOG_LEVEL="INFO"
Dependencies
Add your required packages to requirements.txt
:
requests>=2.28.0
mcp
your-additional-package>=1.0.0
π Examples
HTTP API Tool
def fetchData(url: str) -> dict:
"""Fetch data from an API endpoint."""
response = requests.get(url)
return response.json()
@mcp.tool()
async def fetch_api_data(url: str) -> str:
"""Fetch and return data from a URL."""
data = fetchData(url)
return json.dumps(data, indent=2)
File Processing Tool
def processFile(content: str) -> str:
"""Process file content."""
# Your processing logic
return content.upper()
@mcp.tool()
async def process_text(text: str) -> str:
"""Process and transform text content."""
return processFile(text)
π€ Contributing
Found a bug or have a feature request?
- π΄ Fork the repository
- π± Create a feature branch
- π» Make your changes
- π§ͺ Test thoroughly
- π Submit a pull request
π License
This project is licensed under the MIT License - see the file for details.
π Show Your Support
If this template helped you build something awesome, please consider:
- β Starring this repository - it makes me happy! π
- π¦ Sharing it with other developers
- π οΈ Contributing improvements back to the community
Made with β€οΈ by Alperen KoΓ§yiΔit
Building the future of AI tool integration, one MCP server at a time π