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 🙏

© 2025 – Pkg Stats / Ryan Hefner

api7-mcp

v0.0.1

Published

## Supported Operations

Readme

API7 MCP Server

Supported Operations

Common Operations

  • get_resource: Get resource details by ID or list resources based on filters
  • send_request_to_gateway: Send a request or multiple requests to the API7ee gateway instance

Permission Management

  • get_permission_policy: Get permission policy details by ID or list permission policies
  • create_permission_policy: Create a permission policy
  • update_permission_policy: Update a permission policy
  • attach_permission_policy_to_role: Attach a permission policy to a role
  • detach_permission_policy_from_role: Detach a permission policy from a role
  • get_permission_policy_by_role: Get permission policies attached to a role

Role Management

  • get_role: Get role details by ID or list roles
  • create_role: Create a role
  • delete_role: Delete a role
  • update_assigned_roles_for_user: Update assigned roles for a user

User Management

  • get_role_by_user_id: Get role details by user ID
  • get_userId_by_username: Get user ID by username

Monitoring

  • get_prometheus_metrics: Get Prometheus metrics from API7 Gateway, including status code distribution, request failures, total requests, bandwidth usage, latency, connections, and QPS

Risk Management

  • check_risk: Scan API7 resources configurations for security, performance, and compliance risks, then generates a structured report with actionable fixes

Configuration in AI Client

Prerequisite

Ensure you have API7 Enterprise Edition properly installed and configured.

Using NPM

Configure your AI client (Cursor, Claude, Copilot, etc.) with following settings:

{
  "mcpServers": {
    "api7-mcp": {
      "command": "npx",
      "args": ["-y","api7-mcp"],
      "env": {
        "DASHBOARD_URL": "your-api7ee-dashboard-url",
        "GATEWAY_URL":"your-api7ee-gateway-server-url",
        "TOKEN": "your-api7ee-token"
      }
    }
  }
}

Using Source Code

Clone the repository:

git clone https://github.com/api7/api7-mcp.git
cd api7-mcp

Install dependencies and build the project:

pnpm install
pnpm build

Configure your AI client (Cursor, Claude, Copilot, etc.) with following settings:

{
  "mcpServers": {
    "api7-mcp": {
      "command": "node",
      "args": ["your-project-path/dist/index.js"],
      "env": {
        "DASHBOARD_URL": "your-api7ee-dashboard-url",
        "GATEWAY_URL":"your-api7ee-gateway-server-url",
        "TOKEN": "your-api7ee-token"
      }
    }
  }
}

Conversation Examples

Common Operations

  • "Show me the details of the service with ID 'svc123'."
  • "List all routes in the 'prod' gateway group."
  • "Send a GET request to '/status' on the gateway."

Permission Management

  • "Adjust xiaolin's permissions to only view the default gateway group."
  • "Modify xiaolin's permissions to prevent viewing and editing consumer credential resources in any gateway group."
  • "Update xiaolin's permissions to only view gateway groups with labels team: R&D and region: shenzhen."
  • "What permissions does xiaolin currently have?"
  • "Create a new permission policy named 'ReadOnlyConsumers' that only allows viewing consumers."
  • "Attach the 'ReadOnlyConsumers' policy to the 'Auditor' role."
  • "Remove the 'AdminAccess' policy from the 'Intern' role."

Role Management

  • "List all available roles."
  • "Create a new role called 'DevOps'."
  • "Delete the 'TemporaryAccess' role."
  • "Assign the 'DevOps' and 'Monitoring' roles to the user 'johndoe'."

User Management

  • "What roles does the user with ID 'user456' have?"
  • "Find the user ID for the username 'alice'."

Monitoring

  • "Show me the current QPS for the gateway."
  • "Get the latency metrics for the past hour."

Risk Management

  • "Check my API configurations for any security risks."
  • "Generate a risk report for the 'staging' environment."