apim-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@apim-mcpShow me the OpenAPI spec for the Payments API"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
apim-mcp
Read-only MCP server for exploring Azure API Management from an MCP-compatible client. It exposes API inventory and configuration, OpenAPI definitions, search, and service health without exposing APIM secrets.
Why a purpose-built APIM MCP server
Azure MCP Server provides broad Azure coverage but does not expose a dedicated
API Management (apim) namespace. APIM requests therefore rely on generic
Azure Resource Graph, Azure CLI, and ARM REST operations. This server exposes
focused, read-only APIM tools directly, reducing discovery and response
interpretation while returning bounded, redacted results.
In an observed four-prompt comparison using the same model, the purpose-built server completed the workload in roughly one-third of the session time while using about 72% fewer tokens and 74% fewer AI credits. Both approaches answered the core questions accurately, but the focused server needed substantially fewer tool calls and returned APIM-specific results directly. Azure MCP produced broader infrastructure detail in some responses, but did so through additional discovery, CLI, and REST operations.
Related MCP server: Microsoft Sentinel Data Exploration
Connect to a deployed server
VS Code and GitHub Copilot
Add the server URL supplied by the operator to .vscode/mcp.json:
{
"servers": {
"apim": {
"type": "http",
"url": "https://<app>.<region>.azurecontainerapps.io/mcp"
}
}
}Run MCP: List Servers and start apim. VS Code discovers the Entra OAuth
configuration, prompts you to sign in, and refreshes tokens automatically.
You do not add an Authorization header or mint tokens manually.
Your account must be assigned the Apim.Read app role on the server's Entra
enterprise application. All authorized users see the APIM instances configured
by the server operator.
Connect to a local server
Start the server with make run, then use
http://localhost:8000/mcp in .vscode/mcp.json. The local endpoint uses the
same VS Code OAuth discovery and sign-in flow as the deployed endpoint. The
only difference is outbound Azure authentication: local development uses your
az login session, while the deployed server uses its managed identity.
Foundry
azd ai connection create apim-mcp-conn \
--kind remote-tool \
--target "https://<app>.<region>.azurecontainerapps.io/mcp" \
--auth-type user-entra-token \
--audience "https://<app>.<region>.azurecontainerapps.io/mcp"Set require_approval: "never" because every exposed tool is read-only.
Available tools
Every tool accepts response_format: "markdown" | "json". List tools support
pagination, and tools that accept a service parameter use the friendly alias
configured by the server operator, such as prod.
Service discovery
Tool | Returns |
| Configured APIM instances and their basic status |
| Service configuration, networking, hostnames, and certificate metadata |
| Provisioning, Resource Health, certificate warnings, capacity, and dependency status |
API configuration
Tool | Returns |
| APIs, revisions, paths, protocols, and subscription requirements |
| One API and its operations |
| Redacted policy XML at global, API, operation, or product scope |
| OpenAPI/Swagger summary or full definition |
| Products and approval/subscription settings |
| Backend metadata without credentials |
| Named-value metadata; secret values are never returned |
| Subscription metadata; keys are never returned |
Search
Tool | Returns |
| Ranked lexical search across API and operation metadata |
| Rebuilds the API search index for one or all configured services |
Telemetry
Tool | Returns |
| Aggregate APIM capacity, request, and duration metrics from |
| Bounded gateway-log details filtered by API, operation, response category, duration, or correlation ID |
| Gateway failures grouped by API, error reason, and response code |
Telemetry requires each existing APIM service to already route AllMetrics
to the configured Log Analytics workspace. Gateway logs can use either the
resource-specific ApiManagementGatewayLogs table or legacy GatewayLogs
records in AzureDiagnostics. This repository does not modify APIM diagnostic
settings. Metric dimensions are not available through the diagnostic export;
use the gateway-log tools for API, operation, response-code, and error
breakdowns.
The implemented tool list evolves with docs/development/TASKS.md; clients discover the
currently registered set directly from the server.
Example requests
“List the APIs on
prodthat do not require a subscription.”“Find operations related to inventory or stock levels.”
“Show the effective policy for the
ordersAPI.”“Which hostname certificate expires first?”
“Show aggregate request volume and capacity for
prodover the last hour.”“Summarize the most common gateway errors on
prodin the last 24 hours.”“List the named values marked secret.” The server returns names and flags, never the secret contents.
Access and safety
The server is read-only.
It never retrieves subscription keys, named-value secrets, gateway keys, user tokens, certificate contents, or backend credentials.
The server operator controls which APIM instances are available.
In v1, every authorized caller sees the same configured instances because downstream Azure access uses the server's managed identity.
Every tool invocation is audited with caller identity and arguments, not response bodies.
User troubleshooting
Symptom | Resolution |
| Restart the server from MCP: List Servers so VS Code begins OAuth discovery |
| Ask the operator to assign your account to the |
OAuth sign-in fails | Confirm the server advertises the fully qualified |
Tool returns | The server's managed identity lacks access to that configured Azure resource; contact the operator |
Documentation
Feature guides
Development
Principles — non-negotiable security and design rules
Operations
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Read-only AgentiScript concept search, catalog, authenticity, license, and approved asset discovery.
- RumboOAuthcom.rumboar
Securely query and analyze business data, dashboards, projections, alerts, and knowledge.
Read-only ArcadeOps discovery for developer docs, OAuth, OpenAPI and synthetic sandbox.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables natural-language queries about Azure resource compliance, including VM compliance, patch status, orphaned RBAC, and infrastructure health, through read-only MCP tools.3MIT

Microsoft Sentinel Dataofficial
AlicenseNot gradedqualityDmaintenanceEnables searching for relevant tables and retrieving data from Microsoft Sentinel's data lake using natural language, supporting security hunting scenarios like password-spray detection and impossible travel checks.2MIT- FlicenseNot gradedqualityDmaintenanceExposes Azure Log Analytics workspace data with tools for querying AuditLogs and AzureActivity tables, supporting custom KQL queries, time range filters, and pagination.-
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to inspect and audit Azure Landing Zones by inventorying resources, auditing tagging, evaluating policy compliance, and detecting infrastructure drift, all in read-only mode.-