MCP CRUD Tools (FastMCP + HTTPX)
This repo exposes an MCP server that provides "tools" (functions) for Users & Products. Internally it calls your CRUD Service REST APIs.
Tools exposed
Users:
list_users,get_user,create_user,update_user,delete_userProducts:
list_products,get_product,create_product,update_product,delete_product
Transport:
Streamable HTTP at:
http://localhost:8002/mcp
Run with Docker (recommended)
Create
.env:
Start MCP server:
Connecting to your CRUD service
Default .env.example uses:
CRUD_URL=http://host.docker.internal:8000
This works on macOS/Windows when your CRUD service is accessible at http://localhost:8000.
If you run Linux, either:
run MCP server locally (no Docker), OR
add
extra_hosts: ["host.docker.internal:host-gateway"]indocker-compose.yml.