{"id":49233338,"url":"https://github.com/cl0v1s/openapi-mcpify","last_synced_at":"2026-04-24T13:05:24.233Z","repository":{"id":344623808,"uuid":"1182446751","full_name":"Cl0v1s/openapi-mcpify","owner":"Cl0v1s","description":"Turn any OpenAPI spec into a live MCP server — with built-in confirmation prompts for mutating operations.","archived":false,"fork":false,"pushed_at":"2026-03-15T17:04:41.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-16T04:24:41.649Z","etag":null,"topics":["elicitatio","mcp","openapi"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cl0v1s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T14:36:04.000Z","updated_at":"2026-03-15T17:08:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Cl0v1s/openapi-mcpify","commit_stats":null,"previous_names":["cl0v1s/openapi-elicitation-mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Cl0v1s/openapi-mcpify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cl0v1s%2Fopenapi-mcpify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cl0v1s%2Fopenapi-mcpify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cl0v1s%2Fopenapi-mcpify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cl0v1s%2Fopenapi-mcpify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cl0v1s","download_url":"https://codeload.github.com/Cl0v1s/openapi-mcpify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cl0v1s%2Fopenapi-mcpify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32224417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elicitatio","mcp","openapi"],"created_at":"2026-04-24T13:05:16.009Z","updated_at":"2026-04-24T13:05:24.228Z","avatar_url":"https://github.com/Cl0v1s.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-mcpify\n\nTurn any OpenAPI spec into a live MCP server — with built-in confirmation prompts for mutating operations.\n\n## What it does\n\n`openapi-mcpify` reads an OpenAPI 3.x spec, generates one MCP tool per route, and exposes them over stdio. When an AI agent tries to call a `POST`, `PUT`, or `DELETE` route, it triggers a MCP elicitation dialog asking the user to confirm before the HTTP request is actually sent.\n\n```\nOpenAPI spec  →  MCP tools  →  AI agent calls  →  (confirm if mutating)  →  HTTP request\n```\n\n---\n\n## Usage (user)\n\n### With bunx\n\n```bash\nbunx openapi-mcpify --spec ./openapi.json --url https://api.example.com\n```\n\n### Parameters\n\n| Parameter | Required | Description |\n|---|---|---|\n| `--spec` | yes | Path or URL to the OpenAPI 3.x spec (JSON or YAML) |\n| `--url` | yes | Base URL of the target API |\n| `--default-args` | no | JSON string injected into every tool call (useful for auth headers) |\n| `--disable-methods` | no | Comma-separated HTTP methods to exclude (e.g. `post,delete`) |\n\n### Examples\n\n```bash\n# Basic usage\ndist/index.js --spec ./petstore.json --url https://petstore.example.com\n\n# With an auth header injected by default\ndist/index.js \\\n  --spec ./petstore.json \\\n  --url https://petstore.example.com \\\n  --default-args '{\"headers\": {\"Authorization\": \"Bearer mytoken\"}}'\n\n# Read-only mode: disable all mutating methods\ndist/index.js \\\n  --spec ./petstore.json \\\n  --url https://petstore.example.com \\\n  --disable-methods post,put,delete,patch\n```\n\n### Claude Desktop / MCP client config\n\nAdd this to your MCP client configuration (e.g. `claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"petstore\": {\n      \"command\": \"dist/index.js\",\n      \"args\": [\n        \"--spec\", \"/path/to/openapi.json\",\n        \"--url\", \"https://api.example.com\",\n        \"--default-args\", \"{\\\"headers\\\":{\\\"Authorization\\\":\\\"Bearer mytoken\\\"}}\"\n      ]\n    }\n  }\n}\n```\n\n---\n\n## Development\n\n### Prerequisites\n\n- [Bun](https://bun.sh) \u003e= 1.0\n\n### Install\n\n```bash\nbun install\n```\n\n### Build\n\n```bash\nbun run build\n```\n\nThe compiled output lands in `dist/`.\n\n### Project structure\n\n```\nsrc/\n  index.ts   — entry point, wires CLI args → OpenAPI → MCP server\n  cli.ts     — argument parser\n  swager.ts  — OpenAPI spec loader \u0026 route extractor\n  tool.ts    — OpenAPI route → MCP tool + HTTP call + elicitation logic\n```\n\n### How tools are generated\n\nEach route in the spec becomes one MCP tool named `{METHOD}_{path}` (e.g. `GET_pets__id_`). Its input schema is built from:\n\n- **path parameters** → required fields\n- **query parameters** → optional or required per spec\n- **request body** (`application/json`) → `body` field\n- **`headers`** → always optional, merged with `--default-args` headers\n\n### Elicitation (confirmation dialog)\n\nFor `POST`, `PUT`, and `DELETE` routes, the server calls `server.elicitInput()` before executing the HTTP request. The client (e.g. Claude Desktop) displays a confirmation form showing the method, path, and parameters. The request is only sent if the user confirms.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcl0v1s%2Fopenapi-mcpify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcl0v1s%2Fopenapi-mcpify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcl0v1s%2Fopenapi-mcpify/lists"}