bgphorizon-mcp
Enables AI assistants to query global BGP routing intelligence, including network investigation, origin history, reachability, and health checks, with 15 tools plus resources and prompts for incident triage and reporting.
README
bgphorizon-mcp
An MCP server that exposes BGPHorizon — global BGP routing intelligence — to any MCP-capable LLM client (Claude Code, Claude Desktop, Cursor, Gemini CLI, OpenAI Agents, …).
It is not a thin wrapper over the REST API. The surface is 15 task-shaped
tools built around the operations investigators and operators actually perform,
each returning aggregates plus warnings[] so a model cannot silently misread the
data (persistence, single-vantage-point concentration, censored first_seen, …).
LLM client ──stdio│http──► bgphorizon-mcp ──► BGPHorizon /api/v1 ──► ClickHouse
(key auth, metering, tier entitlements inherited)
Install & run
The server needs a BGPHorizon API key (create one in your account's API
panel), passed as BGPHORIZON_API_KEY.
Zero-install with uv:
export BGPHORIZON_API_KEY=bgps_xxx
uvx bgphorizon-mcp --selftest # ✓ API reachable ✓ key valid ✓ 15 tools ✓ 8 resources ✓ 7 prompts
uvx bgphorizon-mcp fetches and runs on demand — nothing to install first. Or
install it as a tool (uv tool install bgphorizon-mcp) / with pipx
(pipx install bgphorizon-mcp).
From source:
git clone <this-repo> && cd bgphorizon-mcp
uv sync
uv run bgphorizon-mcp --selftest
Connect it
You can either use the hosted endpoint (nothing to install) or self-host
(this repo). Both authenticate with the same bgps_ API key and go through the
same metered /api/v1.
Hosted endpoint (no install)
claude mcp add --transport http bgphorizon https://bgphorizon.com/mcp \
--header "Authorization: Bearer bgps_xxx"
{
"mcpServers": {
"bgphorizon": {
"url": "https://bgphorizon.com/mcp",
"headers": { "Authorization": "Bearer bgps_xxx" }
}
}
}
Self-hosted with Claude Code
claude mcp add bgphorizon --env BGPHORIZON_API_KEY=bgps_xxx -- uvx bgphorizon-mcp
Claude Desktop / Cursor / Zed (mcpServers block)
{
"mcpServers": {
"bgphorizon": {
"command": "uvx",
"args": ["bgphorizon-mcp"],
"env": { "BGPHORIZON_API_KEY": "bgps_xxx" }
}
}
}
Point at a non-production API with "BGPHORIZON_API_URL" in the same env block.
Hosted / HTTP transport
bgphorizon-mcp --transport http --port 8931 --require-auth
Put it behind TLS with proxy_buffering off for streaming. See
docs/SETUP.md for every client (Gemini CLI,
OpenAI Agents SDK, LangChain, n8n, VS Code) and reverse-proxy config.
What's in the box
Investigation tools (12): identify, inventory, timeline,
origin_history, reachability, detections, paths, compare_windows,
locate, subprefixes, events_sample, platform_baseline.
Operator tools (3): health_check, validate_announcement, visibility.
Resources (8): bgphorizon://reference/{detection-types, collectors, glossary, data-horizon, report-template, writing-guide, qa-checklist, methodology} — reference
the model can pull without a tool call. report-template ships with the house CSS
already inlined, and the report standards are all here, so a hosted (no-clone) client
still writes house-style reports.
Prompts (7): investigate_entity, write_report, triage_incident,
locate_infrastructure, audit_my_network, preflight_change,
explain_incident — where the house methodology lives. In Claude Code they surface
as /bgphorizon:audit_my_network, etc.
Full tool contracts: docs/TOOLS.md.
Design rationale and full docs: https://bgphorizon.com/docs/mcp.
Writing investigative reports
The server ships a complete report kit and a write_report prompt so you can
generate defensible, house-style BGP routing reports from any client — Claude
Code, Claude Desktop, OpenAI (Codex / Agents / ChatGPT), Gemini CLI, Cursor, and more.
It's three steps: connect the server → set your agent's system prompt to
reporting/SYSTEM-PROMPT.md → ask for the report. The
per-client, copy-paste guide is in reporting/README.md.
Configuration
| Env var | Default | Purpose |
|---|---|---|
BGPHORIZON_API_KEY |
— | API key, forwarded as Authorization: Bearer. |
BGPHORIZON_API_URL |
https://bgphorizon.com |
BGPHorizon base URL. |
BGPHORIZON_TIMEOUT |
30 |
Per-request timeout (seconds). |
BGPHORIZON_LOG_LEVEL |
INFO |
DEBUG surfaces every upstream request. |
Develop
uv sync --group dev
uv run pytest # deterministic reshaping logic (transitions, direction, …)
uv run bgphorizon-mcp --selftest
npx @modelcontextprotocol/inspector uv run bgphorizon-mcp # raw protocol inspection
Layout: client.py (one method per /api/v1 endpoint) · tools/ (analytical
operations + _shape.py pure helpers) · resources.py + reference/ (bundled
docs) · prompts.py (methodology). Adding a tool = one function under tools/
with an @mcp.tool() decorator; the input schema comes from its type hints.
License
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。