Niagara MCP Server

Niagara MCP Server

Dynamically discovers and exposes Azure API Management APIs as MCP tools, enabling Copilot Studio to call them via natural language without hardcoding.

Category
访问服务器

README

Niagara MCP Server — APIM Dynamic Discovery

An MCP (Model Context Protocol) server deployed on Azure that dynamically reads all APIs from Azure API Management and exposes them as AI tools to Copilot Studio. No hardcoding. No static files. APIM is the single source of truth.

Branch: Active development on development. main is protected.


How It Works

Copilot Studio (user types plain English)
        |
        |  MCP protocol — Streamable HTTP
        v
registry-mcp-server  (Azure App Service — Docker container)
  ├── http_app_apim.py   → exposes /mcp endpoint, accepts Copilot Studio connections
  ├── server_apim.py     → MCP protocol: handles tools/list and tools/call
  ├── apim_dynamic.py    → reads all APIs live from APIM Management API, filters, routes
  ├── registry.py        → fallback only (returns empty if tools_registry.json missing)
  ├── dispatcher.py      → fallback HTTP dispatcher for registry-based tools
  └── apim_poc/policy.xml → APIM native gateway policy (POC reference, not active)
        |
        |  Real HTTP calls with subscription key
        v
Azure API Management (apim-dev-intg)
  ├── Function Apps  (fn-dev-bark, fn-dev-dimitri-getshipmentfromwms, fn-dev-purchase-orders ...)
  ├── Logic Apps     (dimitri-otmtodimitriupdate, ebs-to-dimitri, service-cloud-integration ...)
  └── REST APIs      (livetracking-getShipments, uomconversiontoerp, otmgenericapi ...)

Code Files

File What it does
app/mcp_server/apim_dynamic.py Core. Authenticates via Managed Identity, calls management.azure.com, reads all 56 APIs, filters out EDI/B2B prefixes, converts each operation to MCP tool format, routes tool calls to correct APIM endpoint
app/mcp_server/server_apim.py MCP protocol layer. Handles tools/list (calls apim_dynamic) and tools/call (routes to apim_dynamic or fallback)
app/mcp_server/http_app_apim.py Web server. Exposes /mcp Streamable HTTP endpoint for Copilot Studio and /sse legacy endpoint
app/mcp_server/registry.py Fallback only. Loads tools from tools_registry.json if it exists. File is deleted — returns empty dict
app/mcp_server/dispatcher.py Fallback HTTP dispatcher. Used only if APIM discovery fails
apim_poc/policy.xml APIM native gateway approach (Plan A / POC). Documents rate limiting, JWT auth, and CORS policies

API Discovery Logic (apim_dynamic.py)

  1. Authenticates using App Service Managed Identity — no passwords, no hardcoded credentials
  2. Calls management.azure.com → reads all 56 APIs from apim-dev-intg
  3. Checks for mcp-enabled tag — if any API is tagged, shows only tagged ones. If none tagged, shows all
  4. Filters out EDI/B2B system callbacks by prefix: o2c_, p2p_, b2b_, echo_api, fourkites_, fap_dev_, 3pl_ofc_, fn_dev_edi_
  5. Converts remaining 53 business tools to MCP format with name, description, and input schema from APIM metadata
  6. Returns to Copilot Studio — happens live on every session, no caching

Any new Logic App or Function App published to APIM automatically appears in Copilot Studio on the next session. Zero code change, zero redeploy.


Security Controls

Control Status
Managed Identity — no credentials in code Active
All secrets in App Service env vars — never in code or git Active
APIM audit logging via Azure Monitor Active automatically
EDI/B2B filter — AI cannot see system integration endpoints Active
mcp-enabled tag — whitelist specific APIs for AI access Ready — APIM admin adds tags
Rate limiting — 100 calls/min per subscription Ready — one line in policy.xml
JWT Azure AD authentication on /mcp endpoint Ready — one line in policy.xml

Tech Stack

Technology Version Purpose
Python 3.11 Server language
MCP SDK 1.28.1 MCP protocol
Starlette 0.41.3 Web framework
Uvicorn 0.32.1 ASGI server
HTTPX 0.28.1 Async HTTP calls to APIM
Azure Identity SDK ≥1.15.0 Managed Identity authentication
Docker — Containerization
Azure App Service — Hosting
Azure Container Registry acrregistrymcp Docker image storage
APIM Management API 2022-08-01 Dynamic API discovery

Azure Resources

Resource group: rg-dev-IntegrationTeamAI — Subscription: Niagara Development

Resource Type Purpose
registry-mcp-server App Service MCP server — live at azurewebsites.net
acrregistrymcp Container Registry Docker image storage
apim-dev-intg API Management Source of all 56 APIs

Environment Variables (App Service)

Variable Purpose
AZURE_SUBSCRIPTION_ID Azure subscription hosting APIM
APIM_RESOURCE_GROUP Resource group of APIM instance
APIM_SERVICE_NAME APIM name — currently apim-dev-intg
APIM_BASE_URL APIM gateway URL
APIM_SUBSCRIPTION_KEY Subscription key for All APIs product — sent on every tool call
APIM_MCP_TAG Tag filter — default mcp-enabled

Live URLs

URL Purpose
https://registry-mcp-server.azurewebsites.net/mcp MCP endpoint — Copilot Studio connects here
https://registry-mcp-server.azurewebsites.net/sse Legacy SSE endpoint
https://apim-dev-intg.azure-api.net APIM gateway

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选