hara-mcp
OfficialThis server is a read-only, closed-world MCP gateway for Hara that exposes four tools for inspecting and safely exercising a Hara execution host.
hara_runtime_get — Return the selected compatible execution host, exact runtime build, pure sandbox profile, resource limits, and observed availability/state.
hara_eval — Evaluate inline Hara source in a fresh restricted, no-network, no-browser, non-persistent sandbox and receive output, diagnostics, and execution evidence.
hara_call — Call an already-loaded fully qualified Hara Var with transfer-safe arguments, without concatenating arguments into source.
hara_check — Run bounded reader, compile, namespace, lint, or test checks and get structured diagnostics.
The tools are non-destructive and closed-world: no browser, network, persistent filesystem, package, process, provider, database, shell, or external-effect authority is enabled.
Request cancellation and wall-clock deadlines are propagated through the MCP request signal; with the loopback relay enabled, they become idempotent cancel commands to an enrolled host.
The server can also expose a 127.0.0.1-only health endpoint and loopback relay for local development host enrollment, polling, command acknowledgement, result submission, and cancellation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hara-mcp Check the current Hara runtime status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: MCP Agent Execution Runtime
Development
Node.js 22 is required.
npm ci
npm run checkStart the stdio MCP server with no registered host:
npm run devEnable the deterministic transport fixture for MCP Inspector development only:
HARA_MCP_ENABLE_TEST_FIXTURE=1 npm run devStart 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 devHARA_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/healthThe 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_checkAll 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.
Available Tools
4 toolshara_callCall a qualified Hara VarBRead-only
Invoke an already-loaded fully qualified Hara Var with transfer-safe arguments in a fresh restricted sandbox. Arguments are never concatenated into source.
Inputs: symbol (required), namespace (required), limits, source, +1 more. Returns: ok, error, result
hara_checkCheck Hara sourceARead-only
Run a bounded reader, compile, namespace, lint, or test check in the same fresh restricted pure sandbox profile and return structured diagnostics.
Inputs: source (required), profile (required), limits. Returns: ok, error, result
hara_evalEvaluate Hara sourceARead-only
Evaluate inline Hara source in a fresh restricted, no-network, no-browser, non-persistent sandbox on an enrolled compatible host.
Inputs: source (required), limits. Returns: ok, error, result
hara_runtime_getGet Hara runtimeARead-only
Return the selected compatible Hara execution host, exact runtime build, pure sandbox profile, limits, and observed availability.
Inputs: no named parameters. Returns: ok, host, error
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: eval executes inline source, call invokes a loaded var, check runs diagnostics, and runtime_get provides environment info. There is no meaningful overlap among the four tools.
Three tools follow a clean verb pattern (hara_eval, hara_call, hara_check), but hara_runtime_get uses a noun-verb ordering that slightly deviates. The prefix is consistent, and the naming remains intuitive overall.
Four tools is a tight, focused set for a niche language runtime server. Each tool earns its place without redundancy or bloat.
The core execution and checking workflow is well covered. A minor gap is the lack of an explicit var-loading or listing mechanism, but since call assumes pre-loaded vars, this may be handled externally.
Maintenance
Related MCP Connectors
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Host any HTTP API as MCP tools with a tamper-evident cross-agent settlement ledger.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes the Nodus orchestration runtime as MCP tools for memory management, goal/workflow execution, and sandboxed code execution.241 PyPIMIT
- FlicenseNot gradedqualityDmaintenanceA runtime for inspectable agent workflows that provides MCP tools, bounded Python execution, session memory, and deterministic evaluation.-
- AlicenseNot gradedqualityBmaintenanceA local MCP server that enables Codex and other MCP clients to orchestrate native external coding-agent harnesses through a normalized lifecycle, with guarded execution and deterministic testing.166 PyPIMIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to launch and manage an owned Mindustry runtime, create logic fixtures, configure processors with mlog programs, observe live memory values, and verify program replacements with digest preconditions.7 npm1-