{"_id":"@ayushmudgal94/openapi-mcp-server","_rev":"4-01bd524b1db1dbe2e5e94b65f3a2220b","name":"@ayushmudgal94/openapi-mcp-server","dist-tags":{"latest":"0.7.4"},"versions":{"0.7.1":{"name":"@ayushmudgal94/openapi-mcp-server","version":"0.7.1","keywords":["model context protocol","mcp","openapi"],"author":{"name":"Twilio"},"license":"MIT","_id":"@ayushmudgal94/openapi-mcp-server@0.7.1","maintainers":[{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"}],"bin":{"openapi-mcp-server":"build/simple.js"},"dist":{"shasum":"1d1b23b14a3d36b99aadf705e3c998b3652d0b8a","tarball":"https://registry.npmjs.org/@ayushmudgal94/openapi-mcp-server/-/openapi-mcp-server-0.7.1.tgz","fileCount":32,"integrity":"sha512-c+WQ+4wd3anITwZ6kdXkxaSpVOSYQY6asboBWbCCDMQ0tLnWZLircx+kULA4ake/N/6eCLmZflhhenlPkIZ/eQ==","signatures":[{"sig":"MEUCIQDYYNNZ/kV5GaICbOx2OFvHhDhUuSXAXZfjfDpRizcppQIgVPY6YRV4DhTsbGkQiudGosOgPZuAXVarskehwhu22yg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76698},"main":"build/index.js","types":"build/index.d.ts","engines":{"npm":">=10.0.0","node":">=20.0.0"},"gitHead":"96e62a705a95045a72d07a442b5e653db1c17890","scripts":{"lint":"eslint src/ tests/ --ext .ts","test":"vitest run","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').chmodSync('build/simple.js', '755')\"","start":"node build","prepare":"# no-op","lint:fix":"eslint src/ tests/ --ext .ts --fix","prebuild":"rm -rf build/","test:watch":"vitest"},"_npmUser":{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"},"_npmVersion":"10.8.2","description":"A Model Context Protocol server that to expose OpenAPI specs.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"qs":"^6.14.0","pino":"^9.6.0","undici":"^7.9.0","minimist":"^1.2.8","form-data":"^4.0.2","node-fetch":"^2.7.0","pino-pretty":"^13.0.0","openapi-types":"^12.1.3","@modelcontextprotocol/sdk":"^1.7.0","@apidevtools/swagger-parser":"^10.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","eslint":"^8.57.1","vitest":"^3.0.9","@types/qs":"^6.9.18","tsc-alias":"^1.8.11","typescript":"^5","@types/node":"^22.13.10","@types/minimist":"^1.2.5","@types/form-data":"^2.2.1","@types/node-fetch":"^2.6.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.4.0","@typescript-eslint/parser":"^7.18.0","eslint-config-airbnb-base":"15.0.0","eslint-plugin-unused-imports":"^3.2.0","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.18.0"},"_npmOperationalInternal":{"tmp":"tmp/openapi-mcp-server_0.7.1_1773106333250_0.23656334646598087","host":"s3://npm-registry-packages-npm-production"}},"0.7.2":{"name":"@ayushmudgal94/openapi-mcp-server","version":"0.7.2","keywords":["model context protocol","mcp","openapi"],"author":{"name":"Twilio"},"license":"MIT","_id":"@ayushmudgal94/openapi-mcp-server@0.7.2","maintainers":[{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"}],"bin":{"openapi-mcp-server":"build/simple.js"},"dist":{"shasum":"d824d03e2b46e4a220877a0d38c7cef70235486e","tarball":"https://registry.npmjs.org/@ayushmudgal94/openapi-mcp-server/-/openapi-mcp-server-0.7.2.tgz","fileCount":32,"integrity":"sha512-7bAitibhMR9+Ia29mIGKB+OhyI1NxDRSXeJAuqT2UhxYEE17XkYEizQG6cNZkUuU7QXNl/8pCUQQ17hwgMJrFQ==","signatures":[{"sig":"MEYCIQCb4nl9rhdpjDscizbyVVUZADe37x3kkxSrzC6lntndGQIhAOk7pfAbWSwgxGqGszhcWQ3XOJ7f4dzsSsLiatbeMPrq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77319},"main":"build/index.js","types":"build/index.d.ts","engines":{"npm":">=10.0.0","node":">=20.0.0"},"gitHead":"96e62a705a95045a72d07a442b5e653db1c17890","scripts":{"lint":"eslint src/ tests/ --ext .ts","test":"vitest run","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').chmodSync('build/simple.js', '755')\"","start":"node build","prepare":"# no-op","lint:fix":"eslint src/ tests/ --ext .ts --fix","prebuild":"rm -rf build/","test:watch":"vitest"},"_npmUser":{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"},"_npmVersion":"10.8.2","description":"A Model Context Protocol server that to expose OpenAPI specs.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"qs":"^6.14.0","pino":"^9.6.0","undici":"^7.9.0","minimist":"^1.2.8","form-data":"^4.0.2","node-fetch":"^2.7.0","pino-pretty":"^13.0.0","openapi-types":"^12.1.3","@modelcontextprotocol/sdk":"^1.7.0","@apidevtools/swagger-parser":"^10.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","eslint":"^8.57.1","vitest":"^3.0.9","@types/qs":"^6.9.18","tsc-alias":"^1.8.11","typescript":"^5","@types/node":"^22.13.10","@types/minimist":"^1.2.5","@types/form-data":"^2.2.1","@types/node-fetch":"^2.6.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.4.0","@typescript-eslint/parser":"^7.18.0","eslint-config-airbnb-base":"15.0.0","eslint-plugin-unused-imports":"^3.2.0","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.18.0"},"_npmOperationalInternal":{"tmp":"tmp/openapi-mcp-server_0.7.2_1773107876470_0.9985432086651733","host":"s3://npm-registry-packages-npm-production"}},"0.7.3":{"name":"@ayushmudgal94/openapi-mcp-server","version":"0.7.3","keywords":["model context protocol","mcp","openapi"],"author":{"name":"Twilio"},"license":"MIT","_id":"@ayushmudgal94/openapi-mcp-server@0.7.3","maintainers":[{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"}],"bin":{"openapi-mcp-server":"build/simple.js"},"dist":{"shasum":"90acd07e95dcc926782e0f44dc0a1e9145e9559b","tarball":"https://registry.npmjs.org/@ayushmudgal94/openapi-mcp-server/-/openapi-mcp-server-0.7.3.tgz","fileCount":32,"integrity":"sha512-RRcwvzuCAl7Lhul/bIFpNG/G0MMNiMsWGwsaeYKiyrPwUvXk6rifBYM6c/3i/pX9989R7cVRDFk8GY640b0G2w==","signatures":[{"sig":"MEUCIQD+ZIkXNG4WKxuAHUc4fzwAFLdnusg7wrQkEMZ/yuc6qwIgVHjFpIh5/SOLLmfKrD55/4R5GmePFQqw69ThXXaNQbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77913},"main":"build/index.js","types":"build/index.d.ts","engines":{"npm":">=10.0.0","node":">=20.0.0"},"gitHead":"96e62a705a95045a72d07a442b5e653db1c17890","scripts":{"lint":"eslint src/ tests/ --ext .ts","test":"vitest run","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').chmodSync('build/simple.js', '755')\"","start":"node build","prepare":"# no-op","lint:fix":"eslint src/ tests/ --ext .ts --fix","prebuild":"rm -rf build/","test:watch":"vitest"},"_npmUser":{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"},"_npmVersion":"10.8.2","description":"A Model Context Protocol server that to expose OpenAPI specs.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"qs":"^6.14.0","pino":"^9.6.0","undici":"^7.9.0","minimist":"^1.2.8","form-data":"^4.0.2","node-fetch":"^2.7.0","pino-pretty":"^13.0.0","openapi-types":"^12.1.3","@modelcontextprotocol/sdk":"^1.7.0","@apidevtools/swagger-parser":"^10.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","eslint":"^8.57.1","vitest":"^3.0.9","@types/qs":"^6.9.18","tsc-alias":"^1.8.11","typescript":"^5","@types/node":"^22.13.10","@types/minimist":"^1.2.5","@types/form-data":"^2.2.1","@types/node-fetch":"^2.6.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.4.0","@typescript-eslint/parser":"^7.18.0","eslint-config-airbnb-base":"15.0.0","eslint-plugin-unused-imports":"^3.2.0","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.18.0"},"_npmOperationalInternal":{"tmp":"tmp/openapi-mcp-server_0.7.3_1773256625994_0.8194832351759922","host":"s3://npm-registry-packages-npm-production"}},"0.7.4":{"name":"@ayushmudgal94/openapi-mcp-server","version":"0.7.4","description":"A Model Context Protocol server that to expose OpenAPI specs.","keywords":["model context protocol","mcp","openapi"],"license":"MIT","author":{"name":"Twilio"},"main":"build/index.js","types":"build/index.d.ts","bin":{"openapi-mcp-server":"build/simple.js"},"scripts":{"prebuild":"rm -rf build/","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').chmodSync('build/simple.js', '755')\"","lint":"eslint src/ tests/ --ext .ts","lint:fix":"eslint src/ tests/ --ext .ts --fix","prepare":"# no-op","start":"node build","test":"vitest run","test:watch":"vitest"},"dependencies":{"@apidevtools/swagger-parser":"^10.1.1","@modelcontextprotocol/sdk":"^1.7.0","form-data":"^4.0.2","minimist":"^1.2.8","node-fetch":"^2.7.0","openapi-types":"^12.1.3","pino":"^9.6.0","pino-pretty":"^13.0.0","qs":"^6.14.0","undici":"^7.9.0"},"devDependencies":{"@types/form-data":"^2.2.1","@types/minimist":"^1.2.5","@types/node":"^22.13.10","@types/node-fetch":"^2.6.12","@types/qs":"^6.9.18","@typescript-eslint/eslint-plugin":"^7.18.0","@typescript-eslint/parser":"^7.18.0","eslint":"^8.57.1","eslint-config-airbnb-base":"15.0.0","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.4.0","eslint-plugin-unused-imports":"^3.2.0","tsc-alias":"^1.8.11","tsx":"^4.19.3","typescript":"^5","vitest":"^3.0.9"},"engines":{"node":">=20.0.0","npm":">=10.0.0"},"publishConfig":{"access":"public"},"_id":"@ayushmudgal94/openapi-mcp-server@0.7.4","gitHead":"4e3bc48d14ed4d4b08cc576102df68ab6a330e61","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-HzvzuFoVE6kUzI/RNYIpdUfSxk5NwiQpEHuq2inq5pS+0z3LBkQbzB2hGJ7sRnQFxY2p13TesYcN7EY1YM3OFQ==","shasum":"7c649140c7ca9fdf88948fc65d088c407e044a93","tarball":"https://registry.npmjs.org/@ayushmudgal94/openapi-mcp-server/-/openapi-mcp-server-0.7.4.tgz","fileCount":32,"unpackedSize":77637,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGmkRW392GHA/4u96diLeREgO8a25nJrRFCHnr6h5ePXAiBUqKbHxE8A65YbK5btDphAEFcAY+MzL4t2LyWWkiNKRQ=="}]},"_npmUser":{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"},"directories":{},"maintainers":[{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openapi-mcp-server_0.7.4_1787616496942_0.07343077841846468"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T01:32:13.154Z","modified":"2026-08-25T00:08:17.200Z","0.7.1":"2026-03-10T01:32:13.387Z","0.7.2":"2026-03-10T01:57:56.617Z","0.7.3":"2026-03-11T19:17:06.147Z","0.7.4":"2026-08-25T00:08:17.077Z"},"author":{"name":"Twilio"},"license":"MIT","keywords":["model context protocol","mcp","openapi"],"description":"A Model Context Protocol server that to expose OpenAPI specs.","maintainers":[{"name":"ayushmudgal94","email":"ayushincnca@gmail.com"}],"readme":"<p align=\"center\"><img src=\"https://github.com/twilio-labs/mcp/blob/246f1b1cd1854d1343468af07a2dfa179dc30a16/docs/twilioAlphaLogoLight.png?raw=true#gh-dark-mode-only\" height=\"70\" alt=\"Twilio Alpha\"/><img src=\"https://github.com/twilio-labs/mcp/blob/246f1b1cd1854d1343468af07a2dfa179dc30a16/docs/twilioAlphaLogoDark.png?raw=true#gh-light-mode-only\" height=\"70\" alt=\"Twilio Alpha\"/></p>\n<h1 align=\"center\">OpenAPI MCP Server</h1>\n\nThis is a Proof of Concept (PoC) project by the ETI team, exploring the use of [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) for the exchange of model context information between different tools.\n\n## Prerequisites\n\n- Node.js 18 or higher\n- npm 9 or higher\n- A Twilio account with API credentials\n\n## Getting Started\n\nThe easiest way to get started is to edit the configuration of your client to point to the MCP server using `npx`.\n\n```json\n{\n  \"mcpServers\": {\n    \"twilio\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@twilio-alpha/openapi-mcp-server\",\n        \"--apiPath\",\n        \"<PATH_TO_OPEN_API_YAML_DIR>\",\n        \"--authorization\",\n        \"<AUTHORIZATION>\"\n      ]\n    }\n  }\n}\n```\n\nwhere `<AUTHORIZATION>` can be either of:\n\n- `Basic`: Basic authentication using username and password. Provide as `Basic/username:password`.\n- `Bearer`: Bearer token authentication. Provide as `Bearer/token`.\n- `ApiKey`: API key authentication. Provide as `ApiKey/key:value`.\n\n## Security Recommendations\n\nTo guard against injection attacks that may allow untrusted systems access to your Twilio data, the ETI team advises users of Twilio MCP servers to avoid installing or running any community MCP servers alongside our official ones. Doing so helps ensure that only trusted MCP servers have access to tools interacting with your Twilio account, reducing the risk of unauthorized data access.\n\n## Configuration Parameters\n\nYou can pass the following optional parameters to the `mcp` server:\n\n**--authorization (optional)**\n\nIf provided, the HTTP requests are authenticated using the provided authorization method.\n\n- `Basic`: Basic authentication using username and password. Provide as `Basic/username:password`.\n- `Bearer`: Bearer token authentication. Provide as `Bearer/token`.\n- `ApiKey`: API key authentication. Provide as `ApiKey/key:value`.\n\n**--services (optional)**\n\nThe name of the services you want to use - this corresponds to the individual filename inside the directory of your OpenAPI yaml files.\n\n**--tags (optional)**\n\nThe tag name as defined in each of the individual endpoints. If you want to filter by `tags` only, make sure you pass `--services ''` as an empty object.\n\n## Custom Server\n\nFirst, install the package in your repo:\n\n```bash\n# Clone the repository\nnpm install @twilio-alpha/openapi-mcp-server --save\n```\n\nThen you can extend `OpenAPIMCPServer`:\n\n```ts\nimport {\n  OpenAPIMCPServer,\n  OpenAPIMCPServerConfiguration,\n} from '@twilio-alpha/openapi-mcp-server';\n\nclass CustomOpenAPIServer extends OpenAPIMCPServer {\n  constructor(config: OpenAPIMCPServerConfiguration) {\n    super({\n      // these are required\n      server: config.server,\n      openAPIDir: '/path/to/openapi/yaml',\n\n      // These are optional\n      filters: config.filters,\n      authorization: {\n        type: 'BasicAuth',\n        username: config.credentials.apiKey,\n        password: config.credentials.apiSecret,\n      },\n    });\n\n    // perform any other option\n  }\n}\n\nconst server = new CustomOpenAPIServer({ ... });\nconst transport = new StdioServerTransport();\nawait server.start(transport);\nlogger.info('MCP Server running on stdio');\n```\n\n\n### loadCapabilities() => Promise<void>\n\nUse this method to load/modify any additional capabilities, such as making change to the default tools or adding resources.\n\n_Note_: To enable resources, include\n\n```js\nconst configuration = {\n  server: {\n    name: config.server.name,\n    version: config.server.version,\n    capabilities: {\n      resources: {},\n      tools: {},\n    },\n  }\n}\n```\n\n#### Example\n\n```ts\n/**\n * Loads resources for the server\n * @returns\n */\nprotected async loadCapabilities(): Promise<void> {\n  this.resources.push({\n    uri: 'text://accountSid',\n    name: 'Twilio AccountSid',\n    description: 'The account SID for the Twilio account',\n  });\n\n  this.prompts.set('userSid', {\n    name: 'Twilio UserSid',\n    description: 'The UserSid for the Twilio account',\n    arguments: [\n      {\n        name: 'userSid'\n        description: 'The UserSid for the Twilio account',\n        required: true,\n      },\n    ],\n  });\n\n  // Modify anything else here\n}\n```\n\n### callToolBody(tool: Tool, api: API, body: Record<string, unknown>) => Record<string, unknown>\n\nThis method can be used to modify the body of the request before an API call is made.\n\n### callToolResponse(httpResponse: HttpResponse<T>, response: CallToolResponse,) => CallToolResponse\n\nThis method can be used to modify the response of the API call before it is sent back to the client.\n\n###  handleReadResource(request: ReadResourceRequest) => Promise<ReadResourceResult>\n\nUse this method to handle Resource loading.\n\n#### Example\n\n```ts\n/**\n * Handles read resource requests\n * @param request\n * @returns\n */\nprotected async handleReadResource(\n  request: ReadResourceRequest,\n): Promise<ReadResourceResult> {\n  const { uri, name } = request.params;\n  if (uri === 'text://accountSid') {\n    return {\n      contents: [\n        {\n          uri,\n          name,\n          mimeType: 'text/plain',\n          text: `The Twilio accountSid is ${this.config.accountSid}`,\n        },\n      ],\n    };\n  }\n\n  throw new Error(`Resource ${name} not found`);\n}\n```\n\nFor more information see [resources#example-implementation](https://modelcontextprotocol.io/docs/concepts/resources#example-implementation)\n\n### protected async handleGetPrompt(request: GetPromptRequest) => Promise<GetPromptResult>\n\n```ts\n/**\n * Handles the get prompt request\n * @param request the request to handle\n */\nprotected async handleGetPrompt(\n  request: GetPromptRequest,\n): Promise<GetPromptResult> {\n  const { name, arguments } = request.params;\n  if (name === 'twilio-userSid') {\n    return {\n      messages: [\n        {\n          role: 'user',\n          content: {\n            type: 'text',\n            text: `The Twilio UserSid is ${arguments.userSid}`,\n          },\n        },\n      ],\n    };\n  }\n\n  throw new Error(`Prompt ${name} not found`);\n}\n```\n\nFor more information see [prompts#example-implementation](https://modelcontextprotocol.io/docs/concepts/prompts#example-implementation)\n","readmeFilename":"README.md"}