npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

swagger-mcp-server-z

v1.0.1

Published

An MCP server built on project Swagger docs, used in Cursor to **query API definitions and parameters** so agents and developers can quickly inspect endpoint descriptions, parameters, and response structure overviews.

Downloads

375

Readme

swagger-mcp-server-z

An MCP server built on project Swagger docs, used in Cursor to query API definitions and parameters so agents and developers can quickly inspect endpoint descriptions, parameters, and response structure overviews.

1. Install Dependencies

Run in the project root:

cd .cursor/swagger-mcp-server-z && npm install

2. Configure MCP in Cursor (CLI Arguments)

Add the following to .cursor/mcp.json (the server key can be adjusted to your team convention, for example swagger or swagger-mcp-server-z), and pass Swagger URLs and auth info via CLI arguments:

{
  "mcpServers": {
    "swagger-mcp-server-z": {
      "command": "npx",
      "args": [
        "-y",
        "swagger-mcp-server-z",
        "--swaggerUrls=https://api.example.com/api/doc/swagger.json,https://api2.example.com/api/doc/swagger.json",
        "--swaggerUser=demo_user",
        "--swaggerPassword=demo_password"
      ],
      "env": {}
    }
  }
}

The paths and credentials above are placeholders. Replace them with real values from your own Swagger environment, and avoid committing sensitive data (username/password/cookie) to the repository.

2.1 Supported CLI Arguments

  • --swaggerUrls (required): Comma-separated list of Swagger JSON URLs
    • Example: --swaggerUrls=https://a/swagger.json,https://b/swagger.json
  • --swaggerUser (required): Swagger login username
  • --swaggerPassword (required): Swagger login password
  • --swaggerCookie (optional): Full cookie string if you want to reuse an existing login session

Alias compatibility (choose any one in each group):

  • swaggerUrls can also be swaggerUrl / urls
  • swaggerPassword can also be swaggerPass / password
  • swaggerCookie can also be cookie
  • swaggerUser can also be user

After updating, in Cursor:

  • Settings → Features → MCP → ensure swagger-mcp-server-z is enabled
  • Reload Window if needed

4. Tools Provided

4.1 swagger_list_operations

  • Description: Lists endpoint definitions from Swagger docs, with optional filters by path/method/tag/summary. Useful for quickly seeing what APIs are available and their brief descriptions.
  • Input parameters:
    • path_contains (optional): Filter by path substring, e.g. running_task.
    • method (optional): GET / POST / PUT / DELETE / PATCH / OPTIONS / HEAD.
    • tag (optional): Filter by Swagger tag.
    • summary_contains (optional): Filter by keyword in summary/description.
    • force_refresh (optional, boolean): Whether to force refetch Swagger JSON.
  • Output: A list of operations, each including:
    • path
    • method
    • operationId
    • summary
    • description
    • tags

4.2 swagger_get_operation

  • Description: Queries a single operation in detail by path + method or operationId, including parameter list and response structure overview.
  • Input parameters (choose one mode):
    • By operationId:
      • operationId: operationId defined in Swagger;
    • By path + method:
      • path: e.g. /running_task;
      • method: GET / POST / PUT / DELETE / PATCH / OPTIONS / HEAD;
    • Common:
      • force_refresh (optional, boolean): Whether to force refetch Swagger JSON.
  • Output:
    • path
    • method
    • operationId
    • summary
    • description
    • tags
    • parameters: array containing:
      • name
      • in (query/path/header/body, etc.)
      • required
      • description
      • type
      • schemaRef (if it is a $ref)
    • responses: organized by HTTP status code, containing:
      • description
      • schemaRef
      • type

5. Typical Usage

  • Browse all running_task-related APIs:
    • Call swagger_list_operations with: { "path_contains": "running_task" }
  • Inspect API parameters by operationId:
    • Call swagger_get_operation with: { "operationId": "RunningTask_List" }
  • Inspect by path + method:
    • Call swagger_get_operation with: { "path": "/running_task", "method": "GET" }