
wrangl
io.github.asgerami/wrangl
Turn any REST API into MCP tools, from an OpenAPI spec, a Postman collection, or a base URL.
Documentation
Documentation · Architecture · Changelog · Contributing
Wrangl turns any REST API into a Model Context Protocol server, so AI agents like Claude and Cursor can call it. Give it an OpenAPI spec, a Postman collection, or just a base URL, and every endpoint becomes a tool. Your API keys stay on the server, so the agent never sees them.
Quick start
Wrangl needs Node.js 22 or newer.
npx @asgerami/wrangl install https://petstore3.swagger.io
Wrangl finds the API's spec, generates the tools, and adds the server to
Claude Desktop. Restart Claude and the API is ready to use. For another
agent, add --client with cursor, windsurf, cline, zed, or
vscode.
No spec? Add a ready-made server from the catalog:
npx @asgerami/wrangl catalog # list what's available
npx @asgerami/wrangl add stripe # 600+ tools
npx @asgerami/wrangl add github --discovery
For an API that needs a key, pass it with --env, for example
--env WRANGL_BEARER_TOKEN=...; see
Authentication.
Dashboard
npx @asgerami/wrangl serve # http://localhost:4000
Create servers, run any tool from the browser, and watch request logs, error rates, and latency.
Features
- One command.
installfinds the spec, generates the tools, and updates your agent's config, backing it up first. - Built-in catalog. Ready-made servers for GitHub, Stripe, OpenAI, Twilio, Discord, Slack, SendGrid, and PagerDuty.
- Spec discovery. Point it at a base URL and it finds the spec, even when it's only linked from a docs page.
- Discovery mode for large APIs.
--discoveryexposes three tools that search, describe, and call the endpoints instead of one tool each, so GitHub's 1,254 endpoints cost an agent three tool definitions.--pinkeeps the calls you use most as direct tools too. - Real-world specs. OpenAPI 3.x and Postman collections, including
recursive schemas.
--includeand--excludetrim huge APIs down to the tools an agent needs. - Auth built in. Bearer, Basic, API keys, OAuth2 (PKCE and client credentials), and OpenID Connect.
- Safe by default. Destructive tools ask the agent to confirm, POST and PATCH are never retried, and upstream calls time out.
- Ready to deploy. Docker image, admin auth, per-server tokens and rate limits, and PostgreSQL for running several replicas.
- Works as a Claude or ChatGPT connector.
--oauth-issuerlets agents sign in to hosted servers through your own identity provider. - Current with MCP. Targets protocol revision
2026-07-28and still serves older clients. - Optional LLM pass.
--enrichuses Claude to turn raw names likepost_v1_contactsinto clear tool names and descriptions.
Use it as a library
import { ingest, createMcpServer, serveStdio } from "@asgerami/wrangl";
const generated = await ingest("https://api.example.com/openapi.json");
const server = createMcpServer(generated, {
creds: { bearerAuth: process.env.API_TOKEN! },
});
await serveStdio(server);
Documentation
- Guide: every command and flag, authentication and OAuth2, the dashboard and REST API, and deploying with Docker and PostgreSQL.
- Architecture: how Wrangl works and the design decisions behind it.
- Changelog: release history.
Contributing
Bug reports and pull requests are welcome. See CONTRIBUTING.md for setup and tests, and SECURITY.md to report a vulnerability privately.
License
@asgerami/wranglnpm install @asgerami/wrangl