📦
Fastmcp Sample
No description available
0 installs
Trust: 30 — Low
Devtools
Ask AI about Fastmcp Sample
Powered by Claude · Grounded in docs
I know everything about Fastmcp Sample. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Todo Management MCP Server
A minimal FastMCP server for managing todos over the Model Context Protocol.
Setup
-
Install dependencies:
pip install -r requirements.txt -
Initialize the database:
python setup_db.py -
Run the server:
python main.py
The server will start on http://localhost:8000.
Available Tools
create_todo(title, description=None)- Create a new todo itemlist_todos(completed=None)- List all todos (optionally filter by completion)get_todo(todo_id)- Get a specific todo by IDupdate_todo(todo_id, title=None, description=None, completed=None)- Update a tododelete_todo(todo_id)- Delete a todo by ID
Project Structure
main.py- Server entry pointdatabase.py- SQLite database operationsmodels.py- Data modelstools.py- MCP tool definitionssetup_db.py- Database initialization scripttodos.db- SQLite database (created after setup)Dockerfile- Docker configuration for Cloud Run deployment
Cloud Run Deployment
-
Build the Docker image:
docker build -t todo-mcp-server . -
Test locally:
docker run -p 8080:8080 -e PORT=8080 todo-mcp-server -
Deploy to Cloud Run:
gcloud run deploy todo-mcp-server \ --source . \ --platform managed \ --region us-central1 \ --allow-unauthenticatedOr use the Cloud Console to deploy from the Dockerfile.
