How to expose your internal REST API as MCP without writing a server
Wann einsetzen: You have a company REST API and want Claude/Cursor to use it without building a bespoke MCP.
Voraussetzungen
- Docker — docker.com/get-started
- OpenAPI/Swagger spec for the API (helpful but optional) — Most internal APIs already have one
Ablauf
-
Deploy Unladocker run -d --name unla -p 8080:80 -p 5234:5234 -p 5235:5235 ghcr.io/amoylab/unla/allinone:latest✓ Kopiert→ Web UI at :8080
-
Add a YAML server definitionIn the UI, create a server 'internal-api' with endpoints /users (GET) and /orders (GET, POST), mapped to https://api.internal/v1.✓ Kopiert→ Tools show up: get_users, get_orders, create_order
-
Point your client at itAdd https://gateway.internal/mcp/internal-api to Claude Desktop.✓ Kopiert→ New tools appear in the client
Ergebnis: Your internal API usable from any MCP client within an hour.
Fallstricke
- Auth leaks if you map sensitive headers unrestricted — Use Unla's OAuth pre-auth to gate per-user; never hardcode admin tokens in YAML
- Write endpoints expose destructive calls — Mark POST/DELETE endpoints as 'confirm' so they require explicit user approval