add_pet
Add a new pet to the store. [POST /pet]
Get one callable tool per operation in an OpenAPI specification, each carrying its HTTP method and path — the specification captured here is the Swagger Petstore, so the 19 tools are its pet, store and user endpoints.
LABSCO SUMMARY
Every tool carries its HTTP method and path in its description, which makes the mapping back to the endpoint visible instead of something you infer from the name. Because the surface is generated from a specification handed in at startup, the tools captured here belong to the Swagger Petstore demo — pets, store orders and users — rather than to the server itself. What the generation inherits is worth noticing: the write operations are as real as the API behind them, and delete_pet, delete_order and delete_user sit in the same list as the reads, with no separate switch in front of them.
A tool surface generated from an OpenAPI specification supplied when the server starts: every operation becomes a tool named after it and labelled with its method and path. The specification behind this capture is the Swagger Petstore.
An OpenAPI specification for the server to generate its tools from, supplied when it starts; the capture here points at the Swagger Petstore. Whatever the API behind it requires — login_user exchanges a username and password, and delete_pet takes an api_key.
One command — npx mcp-openapi --spec https://petstore3.swagger.io/api/v3/openapi.json
USE CASES
Creating, editing and removing an item are separate operations generated from the specification, including a form-data update and a separate image upload, each labelled with the method and path it hits.
Items are searchable by status or by tag, one is retrievable by id, and the store's own inventory count groups the totals by status.
The order carries the item, quantity, ship date and completion flag on creation, and is then retrievable and removable by its own identifier.
Users are created one at a time or from an array, addressed afterwards by username rather than by id, and the session tools log one in and out.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
add_petAdd a new pet to the store. [POST /pet]
create_userCreate user. [POST /user]
create_users_with_list_inputCreates list of users with given input array. [POST /user/createWithList]
delete_orderDelete purchase order by identifier. [DELETE /store/order/{orderId}]
delete_petDeletes a pet. [DELETE /pet/{petId}]
delete_userDelete user resource. [DELETE /user/{username}]
find_pets_by_statusFinds Pets by status. [GET /pet/findByStatus]
find_pets_by_tagsFinds Pets by tags. [GET /pet/findByTags]
get_inventoryReturns pet inventories by status. [GET /store/inventory]
get_order_by_idFind purchase order by ID. [GET /store/order/{orderId}]
get_pet_by_idFind pet by ID. [GET /pet/{petId}]
get_user_by_nameGet user by user name. [GET /user/{username}]
login_userLogs user into the system. [GET /user/login]
logout_userLogs out current logged in user session. [GET /user/logout]
place_orderPlace an order for a pet. [POST /store/order]
update_petUpdate an existing pet. [PUT /pet]
update_pet_with_formUpdates a pet in the store with form data. [POST /pet/{petId}]
update_userUpdate user resource. [PUT /user/{username}]
upload_fileUploads an image. [POST /pet/{petId}/uploadImage]
BEFORE YOU INSTALL
19 tools when we connected. Tools are generated from your OpenAPI spec; this count reflects the Swagger Petstore demo. --include, --exclude and --prefix shape the list, and --dynamic-discovery, automatic for specs with 100+ endpoints, replaces it with three meta-tools.
All 3 documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 19 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx mcp-openapi --spec https://petstore3.swagger.io/api/v3/openapi.json{
"mcpServers": {
"petstore": {
"command": "npx",
"args": [
"mcp-openapi",
"--spec",
"https://petstore3.swagger.io/api/v3/openapi.json"
]
}
}
}{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"mcp-openapi",
"--spec",
"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
"--auth-type",
"bearer",
"--auth-token",
"$GITHUB_TOKEN",
"--prefix",
"github",
"--include",
"listReposForAuthenticatedUser,getRepo,listIssues,createIssue"
],
"env": {
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
}
}
}
}The README's bearer-token example, wired to GitHub's REST API: <YOUR_GITHUB_TOKEN> is your GitHub token. For your own API, the --spec URL, token and --include list are that API's.
{
"mcpServers": {
"weather": {
"command": "npx",
"args": [
"mcp-openapi",
"--spec",
"<YOUR_WEATHER_URL>/openapi.json",
"--auth-type",
"api-key",
"--auth-name",
"X-API-Key",
"--auth-value",
"$WEATHER_API_KEY",
"--auth-in",
"header"
],
"env": {
"WEATHER_API_KEY": "<YOUR_WEATHER_API_KEY>"
}
}
}
}An illustration from the README: api.weather.example.com is not a real API. Point --spec at your own API's OpenAPI document, and set --auth-name and WEATHER_API_KEY to the header name and key that API expects.