IFRC GO MCP Server

IFRC GO MCP Server

Read-only MCP server for IFRC GO data, secured with Microsoft Entra ID OAuth/JWT, exposing datasets as MCP tools with rate limiting and PII filtering.

Category
访问服务器

README

IFRC GO MCP Server

Read-only MCP server for IFRC GO data, secured with Microsoft Entra ID OAuth/JWT.

What this server does

  • Exposes some IFRC GO datasets as MCP tools.
  • Enforces bearer-token auth with Entra JWT validation.
  • Publishes OAuth metadata endpoints for MCP clients.
  • Applies request rate limiting.
  • Removes selected PII fields from responses before returning data.
  • Adds GO frontend URLs to records so callers can open source pages directly.

Main tools

  • get_agent_instructions
    • Returns the full data model and querying guidance from agent-instructions.md.
  • get_server_info
    • Returns runtime configuration and upstream connectivity status.
  • ifrcgo_meta
    • Returns live enum/choice metadata for entity fields via OPTIONS.
  • ifrcgo_read
    • Main read tool for list/detail access across IFRC GO entities.
  • ifrcgo_get_country_plan
    • Finds and summarizes the best available planning document for a country.
  • ifrcgo_download_document
    • Downloads authenticated IFRC GO documents and extracts text (including PDFs).

Supported entities (via ifrcgo_read)

  • Reference: region, country, district, disaster_type
  • Events and reports: event, field-report, situation_report
  • Appeals: appeal, appeal_document
  • Surge and deployments: surge_alert, eru, eru_owner, personnel, partner_deployment
  • Projects: project, emergency-project
  • DREF: active-dref, completed-dref, dref-op-update, dref-final-report
  • Other: flash-update, public-per-process-status, public-per-stats, ops-learning, public-local-units
  • Country detail: country-plan, country-document, country-supporting-partner, delegation_office

See agent-instructions.md for field-level guidance and workflow examples.

Quick start (local)

1. Create and activate a virtual environment

Windows PowerShell:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

2. Install dependencies

pip install -r requirements.txt

3. Configure environment variables

Set these in your shell, profile, or launch config before starting the server.

Required for auth-gated operation:

  • ENTRA_TENANT_ID
  • ENTRA_AUDIENCE
  • ENTRA_CLIENT_ID
  • MCP_SERVER_URL
  • STATE_SIGNING_SECRET

IFRC GO upstream auth (choose one mode):

  • Recommended auto-refresh mode:
    • IFRCGO_USERNAME
    • IFRCGO_PASSWORD
  • Static token mode:
    • IFRCGO_API_TOKEN

Optional:

  • IFRCGO_API_BASE_URL (default: https://goadmin.ifrc.org/api/v2)
  • ENTRA_REQUIRED_SCOPE (default: mcp.access)
  • REQUIRED_GROUP_IDS (comma-separated)
  • REQUIRED_APP_ROLES (comma-separated)
  • MCP_RATE_LIMIT_REQUESTS (default: 60)
  • MCP_RATE_LIMIT_WINDOW_SECONDS (default: 60)
  • SCOPE_NAME (default: ifrcgo)
  • HOST (default: 0.0.0.0)
  • PORT (default: 8000)

4. Run the server

python server.py

Health endpoint:

  • GET /health

OAuth metadata endpoints:

  • GET /.well-known/oauth-protected-resource
  • GET /.well-known/oauth-authorization-server
  • GET /.well-known/oauth-authorization-server/mcp

OAuth helper endpoints:

  • GET /oauth/authorize
  • GET /oauth/callback
  • POST /oauth/token
  • POST /register

MCP transport:

  • Mounted at / using streamable HTTP from FastMCP.

Testing

Run unit tests:

pytest tests -q -m "not smoke" --ignore=tests/smoke

Run smoke tests (live endpoint + valid token required):

$env:IFRCGO_MCP_URL = "https://<your-host>"
$env:MCP_TEST_TOKEN = "<entra-access-token>"
pytest tests/smoke -q -m smoke

Deployment (Azure Container Apps)

This repo includes an automated deploy script:

  1. Copy local.settings.json.template to local.settings.json.
  2. Fill in required values (subscription, RG, ACR, Entra, IFRC GO credentials, etc.).
  3. Run:
bash infra/deploy.sh

What the script handles:

  • Validates local settings.
  • Runs non-smoke tests before deploy.
  • Builds and pushes Docker image.
  • Creates/updates Container App and secrets.
  • Applies optional ingress IP allow-list.
  • Performs health check and optional smoke tests.

Security and privacy notes

  • All data tools are read-only.
  • OAuth/JWT validation is enforced unless Entra settings are missing.
  • If REQUIRED_GROUP_IDS or REQUIRED_APP_ROLES are set, caller token must match at least one.
  • Selected PII fields are stripped from personnel and project results.
  • Keep local.settings.json and credentials out of source control.

Repository layout

  • server.py: MCP server, auth middleware, tool definitions.
  • ifrcgo_client.py: Async IFRC GO client, auth refresh, list/detail/options helpers, document parsing.
  • agent-instructions.md: Data model and usage guidance surfaced to MCP agents.
  • tests/: Unit and smoke tests.
  • infra/deploy.sh: Azure deployment automation.
  • scripts/: One-off data processing utilities and generated outputs.

Notes for MCP clients

  • Start sessions by calling get_agent_instructions.
  • Use ifrcgo_meta to resolve current enum values before filtering.
  • Use ifrcgo_read with limit and offset for paging.
  • Use detail mode with resource_id when you need full single-record payloads.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选