hara-mcp
Language-owned MCP gateway and execution-host coordination for Hara, exposing read-only tools for runtime introspection, evaluation, calls, and checks, with an optional deterministic test fixture for development.
README
hara-mcp
Language-owned MCP gateway and execution-host coordination for Hara.
The architecture and six-phase delivery plan are tracked in issue #1. The gateway scaffold is issue #8; the active loopback-relay slice is issue #10.
Current status
This branch contains the MCP gateway, a closed four-tool catalogue, fail-closed host selection, and the first authenticated loopback relay for an outbound execution host. It does not provide a production endpoint or prove real Hara execution.
Two development paths exist, and they are deliberately mutually exclusive:
- a disabled-by-default deterministic transport fixture for MCP schema and routing tests;
- a
127.0.0.1-only relay that lets an enrolled host register, poll for one bounded request, acknowledge commands, submit a terminal result, and receive cancellation.
Phase 1 remains open until an unpacked Hara Chrome host executes a request in a fresh restricted Rust/Wasm Sandbox. A relay transport result is not semantic evidence.
Development
Node.js 22 is required.
npm ci
npm run check
Start the stdio MCP server with no registered host:
npm run dev
Enable the deterministic transport fixture for MCP Inspector development only:
HARA_MCP_ENABLE_TEST_FIXTURE=1 npm run dev
Start the stdio server and loopback host relay:
HARA_MCP_LOOPBACK_TOKEN='replace-with-a-random-development-token' \
HARA_MCP_LOOPBACK_PORT=8765 \
HARA_MCP_LOOPBACK_ORIGIN='chrome-extension://your-extension-id' \
npm run dev
HARA_MCP_LOOPBACK_TOKEN is required whenever another loopback setting is present. The token must contain at least 16 non-whitespace bytes. It authenticates the local HTTP transport only; it must never enter an execution request, descriptor, result, MCP response, diagnostic, or log.
HARA_MCP_LOOPBACK_ORIGIN is optional. When configured, requests carrying an Origin header must match it exactly. Wildcards are prohibited. The relay always binds exactly to 127.0.0.1 and refuses wildcard, LAN, or public bind addresses.
Probe the relay process without exposing host or run details:
curl --fail --silent http://127.0.0.1:8765/v0/health
The health response proves only that the local relay process is answering. Host readiness remains derived from an authenticated, current-generation heartbeat and is reported separately by hara_runtime_get.
See the loopback relay guide for the host protocol and lifecycle.
MCP catalogue
The initial catalogue is exactly:
hara_runtime_get
hara_eval
hara_call
hara_check
All four tools are declared read-only, non-destructive, and closed-world. No option enables browser, network, persistent filesystem, package, process, provider, database, shell, or external-effect authority.
MCP request cancellation is propagated through the SDK request signal to the selected execution host. The loopback relay converts it into a distinct, idempotent cancel command. Requested wall-clock deadlines use the same path.
Boundaries
- Hara owns execution semantics and the canonical Sandbox/LiveSession lifecycle.
- Hara Chrome is an enrolled execution host, not an MCP server.
- The loopback relay is a temporary Phase 1 transport adapter, not a second Hara runtime protocol.
mcp.greenways.airemains a Greenways application ingress and consumes the lower-level Hara host protocol directly when needed.- MCP client credentials, loopback transport credentials, and execution-host/device credentials terminate at independent boundaries.
- Exact command redelivery is allowed until acknowledgement; the host must de-duplicate by command and request identity.
See the architecture note and AGENTS.md before making changes.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。