get_resource: Get resource details by ID or list resources based on filterssend_request_to_gateway: Send a request or multiple requests to the API7ee gateway instance
get_permission_policy: Get permission policy details by ID or list permission policiescreate_permission_policy: Create a permission policyupdate_permission_policy: Update a permission policyattach_permission_policy_to_role: Attach a permission policy to a roledetach_permission_policy_from_role: Detach a permission policy from a roleget_permission_policy_by_role: Get permission policies attached to a role
get_role: Get role details by ID or list rolescreate_role: Create a roledelete_role: Delete a roleupdate_assigned_roles_for_user: Update assigned roles for a user
get_role_by_user_id: Get role details by user IDget_userId_by_username: Get user ID by username
get_prometheus_metrics: Get Prometheus metrics from API7 Gateway, including status code distribution, request failures, total requests, bandwidth usage, latency, connections, and QPS
check_risk: Scan API7 resources configurations for security, performance, and compliance risks, then generates a structured report with actionable fixes
Ensure you have API7 Enterprise Edition properly installed and configured.
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"
}
}
}
}Clone the repository:
git clone https://github.com/api7/api7-mcp.git
cd api7-mcpInstall dependencies and build the project:
pnpm install
pnpm buildConfigure 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"
}
}
}
}- "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."
- "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."
- "List all available roles."
- "Create a new role called 'DevOps'."
- "Delete the 'TemporaryAccess' role."
- "Assign the 'DevOps' and 'Monitoring' roles to the user 'johndoe'."
- "What roles does the user with ID 'user456' have?"
- "Find the user ID for the username 'alice'."
- "Show me the current QPS for the gateway."
- "Get the latency metrics for the past hour."
- "Check my API configurations for any security risks."
- "Generate a risk report for the 'staging' environment."