log-extractor-mcp-server
by AneeshMishra
README.md
# log-extractor-mcp-server
MCP server exposing read-only Order Orchestrator diagnostic tools, plus one tool backed by real telemetry: `search_order_failure_logs`, which queries [order-orchestration-simulator-py](https://order-orchestration-simulator-py.onrender.com)'s live logs on Render via Render's Logs API. The other 6 tools are mock-data-backed (see `mcp_server/mock_data.py`).
## Running locally over stdio
```
pip install -r requirements.txt
python -m mcp_server.server
```
## Running over HTTP (cloud deploy)
`mcp_server/http_server.py` exposes the same server instance over streamable-HTTP transport at `/mcp`, so a remote client can reach it at `https://<deployed-host>/mcp`.
```
cp .env.example .env # fill in MCP_API_KEY + RENDER_* vars
python -m mcp_server.http_server
```
Env vars (see `.env.example`):
- `HOST` (default `0.0.0.0`), `PORT` (default `8000`, most cloud platforms inject this automatically)
- `MCP_API_KEY` — optional; if set, every request must send `Authorization: Bearer <key>`. Leave blank for local testing, set it before deploying anywhere internet-reachable.
- `RENDER_API_KEY`, `RENDER_OWNER_ID`, `RENDER_SERVICE_ID` — required for `search_order_failure_logs` to reach Render's Logs API for order-orchestration-simulator-py. If unset, that tool returns a clean "could not reach the telemetry backend" message; the other 6 tools are unaffected.
## Deploying to Render
This repo includes a `render.yaml` Blueprint. In the Render dashboard: **New → Blueprint**, point it at this repo, and it will pick up the Docker build automatically. Set `MCP_API_KEY`, `RENDER_API_KEY`, `RENDER_OWNER_ID`, and `RENDER_SERVICE_ID` as env vars on the service (marked `sync: false` in the blueprint so Render prompts for them rather than storing them in the file).
Or manually:
```
docker build -t log-extractor-mcp-server .
docker run -p 8000:8000 -e MCP_API_KEY=<your-key> log-extractor-mcp-server
```
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessSyncing