Cloud ALM MCP

Cloud ALM MCP

Enables local or HTTP-based MCP interactions with a mock SAP Cloud ALM environment, enforcing read/write capability separation and fail-closed security policies for future SAP Cloud ALM connectivity.

Category
访问服务器

README

Cloud ALM MCP

Node.js and TypeScript skeleton for a SAP Cloud ALM Model Context Protocol server.

This repository is currently mock-first. It can install, build, test, and start without SAP Cloud ALM credentials, BTP Destination Service configuration, or OAuth setup.

Target Architecture

  • Runtime: Node.js on SAP BTP Cloud Foundry.
  • Production MCP transport: MCP Streamable HTTP via the official MCP TypeScript SDK.
  • STR-158 uses stateless Streamable HTTP for the POC by setting no MCP session ID generator.
  • Local fallback transport: stdio, intended only for local development.
  • Future Cloud ALM access path: SAP BTP Destination Service.
  • Future authentication model: OAuth2 Client Credentials through a configured destination.

Real SAP Cloud ALM connectivity is intentionally not included in STR-158.

Session and state requirements must be revisited before production agent usage if later tool flows require persistent MCP session state. STR-158 intentionally does not introduce a session store.

Local Development

npm install
npm run build
npm test
npm start

By default, npm start runs mock mode over HTTP and exposes:

  • MCP endpoint: POST /mcp
  • Health endpoint: GET /health

The remote MCP endpoint is stateless and POST-only. GET, DELETE, and other unsupported methods on /mcp return 405 Method Not Allowed with Allow: POST; GET SSE and MCP session termination are intentionally not implemented. JSON request bodies are limited to 64kb.

Example:

curl http://localhost:3000/health

Use .env.example as the list of supported placeholders. Do not add real Cloud ALM secrets to local files committed to git.

SAP BTP Cloud Foundry POC Deployment

manifest.yml defines a single cloud-alm-mcp Cloud Foundry application using nodejs_buildpack, command: npm start, and an HTTP health check on /health. The first deployment is intentionally locked to safe mock mode:

RUNTIME_MODE=mock
MCP_TRANSPORT=http
EXTERNAL_CALLS_ENABLED=false
READ_CAPABILITY_ENABLED=true
WRITE_CAPABILITY_ENABLED=false

No Cloud ALM credentials, OAuth settings, XSUAA/IAS binding, Destination Service binding, or real destination values are required for STR-162.

Cloud Foundry staging runs npm install; the package postinstall lifecycle runs npm run build so dist/src/index.js exists before npm start. TypeScript and the type packages needed for compilation are regular dependencies so the standard Node.js buildpack production install can build the app without carrying local-only tools such as vitest and tsx.

The app keeps using the platform-provided PORT; do not hardcode a production port. package.json requests Node.js 22.x for deterministic staging/runtime behavior on the first deployment. SAP BTP Cloud Foundry currently supports Node.js 22 through nodejs_buildpack; operators should still verify the exact target foundation with cf buildpacks before deployment.

package-lock.json remains the authoritative npm dependency lock. No packageManager field is set because Cloud Foundry uses npm for a root package.json/package-lock.json, and forcing an npm version is only needed if the target foundation's default npm proves incompatible.

Local validation:

npm install
npm run build
npm test
npm start
curl http://localhost:3000/health

BTP values needed from the operator:

CF API endpoint
BTP org
BTP space
route/domain decision, if not using the default route

Manual BTP validation flow:

cf login -a <api-endpoint>
cf target -o <org> -s <space>
cf buildpacks
cf push
cf app cloud-alm-mcp
cf logs cloud-alm-mcp --recent
curl https://<route>/health

After deployment, validate that /health returns status: ok, POST /mcp works in mock mode, GET /mcp returns 405 Method Not Allowed with Allow: POST, and logs contain request IDs, method, path, status, and duration without request bodies, authorization headers, tokens, or secrets.

Configuration

Core environment variables:

  • RUNTIME_MODE=mock|destination
  • MCP_TRANSPORT=http|stdio
  • PORT=3000
  • READ_CAPABILITY_ENABLED=true|false
  • WRITE_CAPABILITY_ENABLED=true|false
  • ALLOWED_DESTINATIONS=cloud-alm-dev
  • EXTERNAL_CALLS_ENABLED=false|true

Local defaults are intentionally safe: mock runtime, HTTP transport, read enabled, write disabled, and external calls disabled.

Destination mode exists only as a placeholder in this skeleton. It fails closed until the BTP Destination Service lookup and OAuth token flow are implemented in later tasks.

Mock Task Client

Mock mode uses deterministic in-memory task and comment data for local development and tests. It supports only the current mock contract fields: task id, title, status, priority, and comment id, taskId, author, text, createdAt.

The mock client returns known tasks, rejects unknown task IDs, appends one comment at a time with deterministic IDs, and updates only explicitly allowlisted mock task fields. These fields are not claimed to be official SAP CALM_TKM payload fields. Real Cloud ALM endpoints, payload schemas, scopes, pagination names, and update semantics remain unverified and deferred to the real integration work.

Security Boundary

The Policy Guard is code-enforced before Cloud ALM client calls. It validates:

  • allowed operation names only,
  • read/write capability separation,
  • delete operation rejection,
  • bulk operation rejection,
  • unknown operation rejection,
  • no agent-supplied destination or customer selection,
  • fail-closed behavior for ambiguous configuration.

This is deliberately not prompt-only enforcement. Customer isolation and durable audit logging are left as future architecture work, with module boundaries already present.

Audit events already reserve optional fields for future traceability: actor, customer context, resource type/id, and correlation ID. The skeleton does not invent real actor or customer values and does not log request payloads, tokens, authorization headers, client IDs, client secrets, or sensitive response bodies.

推荐服务器

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

官方
精选