Smithery Fastmcp Example
No description available
Ask AI about Smithery Fastmcp Example
Powered by Claude Β· Grounded in docs
I know everything about Smithery Fastmcp Example. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
FastMCP Demo π
A simple demonstration of FastMCP, the fast, Pythonic way to build MCP servers and clients.
What is this?
This project demonstrates how to create a basic MCP server using FastMCP. The server provides a simple tool that adds two numbers together.
Features
- Simple MCP Server: Built with FastMCP framework
- Basic Tool:
addfunction that adds two integers - Docker Support: Containerized for easy deployment
- Smithery Integration: Configured for Smithery.ai deployment
Quick Start
Prerequisites
- Python 3.11+
- pip
Local Development
-
Install dependencies:
pip install -r requirements.txt -
Run the server:
python server.py
Using Docker
-
Build the image:
docker build -t fastmcp-demo . -
Run the container:
docker run fastmcp-demo
Project Structure
smithery-fastmcp-example/
βββ server.py # Main MCP server implementation
βββ requirements.txt # Python dependencies
βββ smithery.yaml # Smithery.ai configuration
βββ Dockerfile # Docker container definition
βββ README.md # This file
Available Tools
add(a: int, b: int) -> int
Adds two integers together.
Parameters:
a: First integerb: Second integer
Returns:
- Sum of the two integers
Example:
result = add(5, 3) # Returns 8
Configuration
The project is configured for Smithery.ai deployment with the following settings:
- Start Command:
python server.py - Runtime: Python 3.11
- Protocol: stdio
Development
To extend this demo:
- Add new tools using the
@mcp.tooldecorator - Define your function with proper type hints
- Add a docstring for the tool description
Example:
@mcp.tool
def multiply(a: int, b: int) -> int:
"""Multiply two numbers"""
return a * b
Learn More
- FastMCP GitHub Repository - The official FastMCP project
- Model Context Protocol - MCP specification and documentation
- Smithery.ai - MCP deployment platform
License
This project is open source and available under the MIT License.
