# 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_user`
- Products: `list_products`, `get_product`, `create_product`, `update_product`, `delete_product`
Transport:
- Streamable HTTP at: `http://localhost:8002/mcp`
## Run with Docker (recommended)
1) Create `.env`:
```bash
cp .env.example .env
```
2) Start MCP server:
```bash
docker compose up --build
```
## 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"]` in `docker-compose.yml`.
## Run locally (no Docker)
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python server.py
```