arc-mcp-hub

arc-mcp-hub

A thin, deterministic MCP hub for SAP BTP that routes connections to multiple SAP systems behind one login, preserving per-user identity.

Category
访问服务器

README

arc-mcp-hub

CI

A thin, deterministic MCP hub for SAP BTP. It puts multiple ARC-1 instances — one per SAP system (DEV / QA / PROD) — behind one front door with one login, while keeping each system fully isolated and preserving per-user SAP identity.

                        one login
  MCP client  ───────────────────────────►  arc-mcp-hub  (one BTP app)
  (VS Code / Claude / Cursor)                  │  /dev/mcp  ─► ARC-1 (DEV)   ─► SAP DEV
                                               │  /qa/mcp   ─► ARC-1 (QA)    ─► SAP QA
                                               │  /prod/mcp ─► ARC-1 (PROD)  ─► SAP PROD

You connect your MCP client to https://<hub>/dev/mcp (or /qa/mcp, /prod/mcp). The hub validates your login, propagates your identity to that system's ARC-1 (so SAP sees the real you), and transparently relays the connection. Each system's tools come through unchanged.


When to use it

  • You run ARC-1 against several SAP systems and want one endpoint host + one login instead of N independently-configured servers.
  • You want per-user SAP identity preserved end-to-end (principal propagation), per system.
  • All those ARC-1 instances live in one BTP subaccount.
  • You want to front other SAP MCP servers too, not only ARC-1 — any XSUAA-protected, Streamable-HTTP MCP server qualifies (how).

When NOT to use it

  • One SAP system only → just point your client at that ARC-1 directly. The hub adds nothing.
  • You want a natural-language assistant that reasons across systems → that's a different, LLM-in-the-middle product. This hub is deterministic routing only — no server-side LLM, no merged tool list, no "ask it anything."
  • Backends in different subaccounts → not supported in v1 (the token exchange only maps within one subaccount). See roadmap.
  • You want the model to pick the system at call time → intentionally unsupported. The system is bound by which endpoint you connect to, so an agent can never accidentally write to PROD from a DEV conversation. That safety is the whole point.

How it works (one paragraph)

The hub is an OAuth 2.1 resource server (one shared authorization server → one login). Each /<env>/mcp advertises its own resource (per RFC 9728) so standards-compliant clients connect cleanly. On each request the hub takes your validated token, exchanges it via a BTP destination (OAuth2JWTBearer) for a per-user token scoped to that backend, and bridges the MCP Streamable-HTTP session to it. The backend (ARC-1) does its own principal propagation to SAP, so SAP enforces your real authorizations — a user without PROD access simply can't do anything on PROD, even if they connect to /prod/mcp.

There is no shared service account and no LLM in the path. See docs/architecture.md.


Quick start

  1. Deploy the hub into the same BTP subaccount as your ARC-1 instances:
    npm ci && npm run build
    cf push                 # uses manifest.yml  (or: mbt build && cf deploy *.mtar  for MTA)
    
  2. Wire each backend (a one-time per-system setup) — full steps in docs/operator-setup.md: create a destination, grant the hub a scope on the backend, assign developers the role collection.
  3. Configure backends — set HUB_BACKENDS:
    [{ "name": "dev", "destination": "arc1-dev" }, { "name": "prod", "destination": "arc1-prod" }]
    
    Adding a system later = create a destination + add one entry here. No code change.
  4. Connect a client to one system, e.g. in VS Code .vscode/mcp.json:
    { "servers": { "sap-dev": { "type": "http", "url": "https://<hub>/dev/mcp" } } }
    
    First use → one browser login → the system's ARC-1 tools appear.

Configuration

Env var Required Description
HUB_BACKENDS yes JSON array of { name, destination }. name is the URL segment (lowercase/digits/hyphen); destination is the BTP destination resolving to that backend.
ARC_HUB_PUBLIC_URL no The hub's public URL for OAuth metadata. Derived from the CF route if unset; set it behind a reverse proxy/custom domain.
ARC_HUB_DCR_SIGNING_SECRET recommended Stable secret so cached client_ids survive cf deploy. openssl rand -base64 48.
ARC_HUB_ALLOWED_ORIGINS no CSV CORS allowlist for browser MCP clients (e.g. https://claude.ai).
PORT no Defaults to 9000 (CF sets it).

Safety model

  • Connection-scoped systems. A session on /dev/mcp can only ever see DEV's tools. There is no runtime system selector to get wrong.
  • PROD is read-only at the backend. Set SAP_ALLOW_WRITES=false and a read-only SAP user on the PROD ARC-1 instance. Even if someone connects to /prod/mcp, writes are refused at the strongest boundary (SAP).
  • Per-user identity. Every call runs as the logged-in user via principal propagation — no shared service account.

Limits (v1)

  • Same subaccount for hub + backends (cross-subaccount → roadmap).
  • Single instance (in-memory session map). Scaling >1 needs sticky sessions or a shared store.
  • No server-side LLM — by design.

Roadmap

  • Cross-subaccount backends (OAuth2SAMLBearerAssertion / shared IAS).
  • Horizontal scale (shared session store).

Development

npm ci
npm test          # unit + local integration (proxy ↔ in-process MCP backend)
npm run typecheck
npm run lint
npm run build

Docs

License

MIT

推荐服务器

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

官方
精选