openapi-anything
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openapi-anythingwrap the ls command as a REST API"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openapi-anything
Agentic system that, given a natural language request describing "anything" to connect, writes/tests/deploys live code for a REST API wrapper around the target.
Goal
Input: Free-form NL description (e.g. "wrap the CLI from this github repo into a REST API", "expose this web-only online service via proper REST API")
Output: Unique deployed FastAPI service instance serving correct auto-generated
openapi.jsonat/services/{id}/openapi.jsonConsuming agents fetch the openapi.json and use the REST endpoints to interact with the wrapped target.
Full web hub + central API gateway proxying to isolated per-wrapper Docker containers.
Related MCP server: swaggbot
Quickstart
# Install
pip install -e .
# Generate a wrapper (CLI) — runs the full pipeline + deploys
openapi-anything generate "wrap the ls command as a REST API"
# Undeploy a wrapper (stops+removes its container and image)
openapi-anything delete <wrapper_id>
# Run the hub/gateway
openapi-anything serve
# Or with the compose stack (Podman or Docker)
podman compose up --build # or: docker compose up --buildThe compose stack exposes the gateway on http://localhost:8800 (host port 8800
maps to container port 8000). Visit the hub UI in your browser.
API
The gateway serves both an HTML hub and a JSON API for agent clients:
Method | Path | Body | Purpose |
|
|
| JSON async generate+deploy: returns |
|
| – | Poll a generation job (status + live |
|
| – | List generation jobs (newest first) |
|
| – | Cancel a queued/running job (409 if finished) |
|
| – | Wrapper container logs (gateway meta route, not proxied) |
|
| – | Generated |
|
|
| Re-run the pipeline for an existing wrapper (409 while a job is active); previous verification feeds the new design |
|
| JSON-RPC | MCP server (Streamable HTTP): every wrapper's endpoints as tools + |
|
| JSON-RPC | MCP server scoped to one wrapper (no meta tools) |
|
| form: | Hub form generate — starts a job, hub auto-refreshes (returns HTML) |
|
| – | Hub UI |
|
| – | List deployed wrappers |
|
| – | Per-wrapper traffic: requests, errors, avg latency, last used |
|
| – | Wrapper's OpenAPI spec (proxied) |
|
| – | Reverse-proxy to the wrapper container |
|
| – | Undeploy a wrapper (container+image removed) |
|
| – | Hub-friendly undeploy (browsers can't DELETE) |
Note:
POST /generateis form-encoded for the browser hub; agents should use the JSON/api/generateendpoint. They intentionally live on distinct paths. Generation is asynchronous: both endpoints return immediately and the pipeline runs in the background — agents pollGET /jobs/{job_id}untilstatusiscompleted(result includesopenapi_path) orfailed(includeserror).
MCP (Model Context Protocol)
Agents can skip OpenAPI parsing entirely and connect via MCP:
claude mcp add --transport http openapi-anything http://localhost:8800/mcpEvery deployed wrapper's endpoints appear as tools ({wrapper_id}__{method}_{path}),
alongside meta tools: list_apis, generate_api (submit a new wrapper build, get a
job_id), and job_status. An agent can literally ask for a new API and use its
tools once the job completes. Tool schemas are derived live from each wrapper's
openapi.json (cached MCP_SPEC_TTL s).
Architecture
Podman users: podman compose up --build (or podman-compose). The DockerManager
auto-detects the Podman socket; no docker.sock mount needed.
Central gateway (
openapi_anything.gateway):Proxies
/services/{wrapper_id}/*→ the correct backend container.Provides
POST /api/generate(JSON) +POST /generate(hub form) and the web hub UI.Runs generation asynchronously as in-memory jobs (
GET /jobs,GET /jobs/{id}); the hub shows a jobs table and auto-refreshes while jobs are active.Manages wrapper lifecycle:
DELETE /services/{id}undeploys.
Generator pipeline (
openapi_anything.generator, LLM-driven via LiteLLM/GLM-5.1):Inspect target (git, subprocess, http + LLM analysis), enriched with web research via a SearxNG instance (
SEARXNG_BASE_URL, defaulthttps://searxng.schnigg.ie; JSON API required). Results flow into both the inspection analysis and the design prompt; search outages degrade gracefully.Design REST API — the LLM produces title, description, endpoints, Pydantic models, and per-endpoint handler bodies.
Generate code — a deterministic assembler turns the design into a complete
app.py. The whole design is consumed (title/description/models/endpoints are never hardcoded by the generator).Test — generated pytest smoke (health + openapi).
Fix loop — on failure, errors are fed back to the LLM and the app is regenerated (up to 5 retries), with a deterministic safe fallback that always works.
Build + deploy — per-wrapper Docker image + container on a free port.
Verify — pre-deploy (TestClient health/openapi) and post-deploy (live health + openapi + every designed endpoint exercised); the report is persisted into the registry entry.
Tech: Python + FastAPI (auto OpenAPI), Docker SDK, httpx, openai (LiteLLM), pytest, Jinja2.
Example NL Requests
"wrap the ls command as a REST API"
"make a REST wrapper for httpbin.org that exposes /get /post"
"wrap the todo web app at example.com/todos into CRUD REST endpoints"
Each produces a distinct service with its own openapi.json usable by agents.
Auth
Opt-in: unset GATEWAY_API_KEY (default) and the gateway is fully open, as before.
Set it and admin routes require credentials — hub UI, generate/regenerate,
jobs, delete, /registry, /metrics, /services/{id}/_logs, /services/{id}/_source,
and the gateway-wide /mcp (which carries generate_api/regenerate_api).
Two ways to authenticate:
X-API-Key: <key>header — for API/MCP clients (curl, agents).HTTP Basic auth, any username, the key as the password — browsers prompt for this natively when you open the hub; no login page needed.
Deployed-wrapper traffic is never gated, even with a key set: the
/services/{id}/* proxy and a wrapper's own /services/{id}/mcp stay open, so
other systems/agents can use a generated API without holding the gateway's
admin key. /health is also always open (container health probes).
Configuration
All knobs are environment variables (set them in docker-compose.yml or a .env file;
values are read at runtime, not import time):
Variable | Default | Purpose |
|
| OpenAI-compatible LLM proxy |
| (required, no default) | Proxy API key — set via |
|
| Model id (must match proxy |
|
| Per-request timeout (s) |
|
| JSON-mode budget — reasoning models burn hidden thinking tokens against it |
|
| SearxNG instance for inspector web research (JSON API) |
|
| Search request timeout (s) |
|
| Research hits fed into inspection/design |
|
| LLM fix-loop attempts before the safe fallback |
|
| Generated wrapper code directory |
|
| Gateway → wrapper proxy timeout (s) |
|
| Seconds MCP tool schemas are cached per wrapper |
| unset (open) | Opt-in auth for admin routes — see |
| unset (in-memory) | Job persistence backend; compose sets |
|
| Terminal jobs kept in history before pruning oldest |
|
| Seconds between metric flushes to redis |
|
| Seconds between registry health sweeps |
|
| Per-wrapper /health probe timeout (s) |
|
| Host wrappers are reachable on from the gateway |
| podman socket autodetect | Container runtime socket |
Development
python -m pytest tests/ -v
ruff check .(Full pipeline implementation per plan phases.)
This server cannot be deployed
Maintenance
Related MCP Connectors
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Discover and call 10,000+ production APIs from one MCP server. Pay-per-call billing for AI agents.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAutomatically generates MCP servers from OpenAPI/Swagger specifications, enabling users to interact with any REST API through natural language with flexible endpoint filtering and authentication support.-
- AlicenseNot gradedqualityDmaintenanceTransforms Swagger/OpenAPI documented APIs into conversational interfaces, enabling natural language interaction with APIs through an MCP server for use with AI assistants.4MIT
- AlicenseNot gradedqualityBmaintenanceTurns any OpenAPI/Swagger API into MCP tools, enabling AI assistants to call REST API endpoints directly.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to interact with any REST API that has an OpenAPI specification by providing a lightweight MCP server that translates between natural language and API calls.MIT