addPetLABSCO SUMMARY
One server that becomes a client for whatever API you hand it, rather than a fixed integration.
Because the tool surface is generated from the spec, the same package fronts a payments API, an internal service, or the Petstore demo — you control which operations surface through whitelist and blacklist patterns, keeping the tool list scoped to what the agent should touch.
What it is
A server with no fixed tool list: it loads an OpenAPI or Swagger spec from a file or URL and exposes each operation as an MCP tool, so an assistant can call a REST API directly. The tools you get are whatever the spec defines.
What you get
- Loads specs from a local path or an HTTP URL, with OpenAPI Overlays to patch them
- Filters which operations become tools using glob patterns on operation id or URL path, so a large API can be trimmed to the handful you want
- Carries authentication, custom headers, and a target-URL override through to the live API
- Pointed at the bundled Petstore sample, it exposes that API's operations — findPetsByStatus, getInventory, placeOrder, createUser and the rest — as a working example of the mapping
Requirements
Runs through npx; Node is the prerequisite. Any credentials the target API needs are passed as headers or environment values you supply.
Setup effort
One command — npx -y @tyk-technologies/api-to-mcp@latest --spec https://petstore3.swagger.io/api/v3/openapi.json
USE CASES
Giving an assistant access to an internal REST API
Load the service's OpenAPI spec and its operations become callable tools, no per-endpoint wiring.
Exposing only part of a large API
Use glob patterns on operation id or path to whitelist the operations that should become tools and leave the rest out.
Trying the mapping before committing a spec
Point it at the bundled Petstore sample and call operations like findPetsByStatus and placeOrder to see how a spec turns into tools.
Adjusting a spec without editing the source
Apply an OpenAPI Overlay to rename or reshape operations at load time, from a file or URL.
19 tools
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
createUsercreateUsersWithListInputdeleteOrderdeletePetdeleteUserfindPetsByStatusfindPetsByTagsgetInventorygetOrderByIdgetPetByIdgetUserByNameloginUserlogoutUserplaceOrderupdatePetupdatePetWithFormupdateUseruploadFileBEFORE YOU INSTALL
What to know first
Tools you get
19 tools when we connected. These 19 are the Swagger Petstore demo spec's operations, which the install command loads. Point --spec at your own OpenAPI spec and you get one tool per operation in it instead.
Requires
npx on PATH
Where it runs
Both documented clients run the server on your machine.
CONTEXT COST
Light Standing cost
Rated by the size of the 19 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Connect your client
Server setup
npx -y @tyk-technologies/api-to-mcp@latest --spec https://petstore3.swagger.io/api/v3/openapi.jsonMCP Clients
Claude Desktop
{
"mcpServers": {
"api-tools": {
"command": "npx",
"args": [
"-y",
"@tyk-technologies/api-to-mcp@latest",
"--spec",
"https://petstore3.swagger.io/api/v3/openapi.json"
],
"enabled": true
}
}
}Cursor
{
"mcpServers": {
"My API Tools": {
"command": "npx",
"args": [
"-y",
"@tyk-technologies/api-to-mcp@latest",
"--spec",
"<YOUR_PATH_TO_OPENAPI>"
]
}
}
}<YOUR_PATH_TO_OPENAPI> is your own OpenAPI spec — a full file path, or the spec's URL (--spec takes either). Add the block to .cursor/mcp.json in your project or ~/.cursor/mcp.json, then reload the window.