openhands-connect
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OpenHands Connect
A universal bridge connecting ChatGPT and AI assistants to local, self-hosted, and cloud OpenHands agent environments through MCP. Extensible, secure, and customizable.
OpenHands Connect bridges conversational AI clients to OpenHands execution environments. It aims to let users explicitly select an environment, dispatch work, observe progress, and retrieve results without coupling the client to runtime-specific APIs.
Status: v0.1 vertical slice implemented and tested against OpenHands Agent Server 1.60.1. Local-only: one explicitly configured environment per call. Cloud/relay, multi-provider, and UI are not implemented.
What works today
A local MCP server that connects to one explicitly configured OpenHands Agent Server, reports connectivity, submits a task, and exposes task status, bounded logs, follow-up messages, and stop.
MCP tool | Effect |
| List configured environments (sanitized, no credentials) |
| Connectivity/auth check for one environment ID |
| Submit a prompt; returns a task ID |
| Normalized status |
| Bounded, redacted log entries |
| Follow-up instruction to a running task |
| Interrupt/pause — see Limitations |
| Completion summary when available |
Task execution modifies files and runs commands in the selected environment's workspace. Environment selection is explicit; there is no implicit local/cloud fallback.
Related MCP server: ChatGPT Gateway MCP Nyan
Requirements
Python 3.12+
An OpenHands Agent Server (for real use). Everything except the opt-in integration tests runs without one.
Install
git clone <this repo> && cd openhands-connect
uv sync --extra devConfigure
Copy the example and edit it:
cp examples/environments.example.yaml config/environments.yamlschema_version: 1
environments:
- id: local
name: Local Agent Server
provider: openhands
base_url: http://127.0.0.1:18000
enabled: true
request_timeout_seconds: 30
default_agent_profile_id: autonomous # a profile NAME or UUID
allowed_operations:
- check_environment
- create_task
- get_task
- get_task_logs
- get_task_result
- send_task_message
- stop_taskNotes:
Credentials are never in this file. An environment names the variable that holds its token (
credential_env_var: OH_STAGING_KEY); the value is read at call time and never logged.Operations are opt-in. An environment that omits
allowed_operationspermits nothing beyond being listed.default_agent_profile_idaccepts a profile name (autonomous) or a UUID. A name is resolved through the server; an unknown name is reported with the list of available profiles rather than a bare 422.
Config is read from OH_CONNECT_CONFIG if set, else config/environments.yaml.
Run
uv run openhands-connectAudit events go to stderr; set OH_CONNECT_AUDIT_LOG=/path/to/audit.log to
append to a file instead. Audit records environment, operation, task ID,
timestamp, and outcome — not prompt or output text.
Register with an MCP client
{
"mcpServers": {
"openhands-connect": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/openhands-connect", "openhands-connect"]
}
}
}Validate
./scripts/validate.sh # ruff + format + mypy + pytest; no networkOpt-in integration tests
Skipped unless a server is configured:
OH_CONNECT_INTEGRATION_BASE_URL=http://127.0.0.1:18000 \
OH_CONNECT_INTEGRATION_API_KEY="$SESSION_KEY" \
./scripts/validate.sh --with-integrationA local Agent Server authenticates with the X-Session-API-Key header, not
Authorization: Bearer.
Limitations
No conversation terminate endpoint exists upstream.
stop_taskusesinterrupt, which pauses; it reportscancelled=Falserather than claiming a cancellation the server cannot perform.Local server support only; cloud/relay is deferred.
Single provider (
openhands). The adapter boundary exists so others can be added.Verified against Agent Server 1.60.1; see ADR 0002.
Goals
Connect to local, self-hosted, and cloud OpenHands instances.
Provide unified environment discovery, health checks, task creation, status, logs, messaging, and cancellation.
Expose functionality through Model Context Protocol (MCP).
Keep OpenHands-specific details behind an adapter so other execution providers may be added.
Support configuration and customization.
Apply policy checks and auditable task lifecycle events.
MVP non-goals
Reimplement OpenHands or build a general agent framework.
Automatic PR merge, deployment, or irreversible actions.
Unauthenticated public exposure of OpenHands APIs.
Premature distributed services or multi-agent orchestration.
Target capabilities
Capability | Purpose |
Environment Registry | Named local, self-hosted, and cloud targets |
Environment Health | Connectivity diagnostics without credential leakage |
Task Dispatch | Submit bounded work to an explicitly selected environment |
Task Observation | Status, logs, and safe outputs |
Task Messaging | Send follow-up instructions |
Task Control | Cancel/stop tasks |
Policy & Approval | Constraints and approval gates |
Audit | Record lifecycle and control events |
Provider Adapter | Encapsulate OpenHands API specifics |
Architecture overview
AI Client (ChatGPT / MCP client)
|
v
MCP Interface
|
v
Connect Core / Policy Engine
| | |
v v v
Environment Task Audit
Registry Manager Events
|
v
Agent Execution Provider
|
v
OpenHands Adapter(s)
/ \
v v
Local/Private Cloud
OpenHands OpenHandsMVP roadmap
Named environment configuration.DoneProvider contract and OpenHands adapter.DoneEnvironment listing and health tools.DoneTask create/status/logs/message/stop.DonePolicy checks and audit events.DoneMock-based tests and setup documentation.Done
Next: cloud/relay connectivity, additional providers, and an MCP client UI.
Security
No credentials in prompts, tool outputs, logs, or committed files. Environment selection is explicit; local and cloud permissions remain separate. Remote connectivity must use authenticated secure transport or relay. Higher-impact operations require explicit policy and approval.
See Project Charter, Architecture, Roadmap, Security, Contributing, ADR 0001, and ADR 0002.
Development
AGENTS.md has the working rules for this repository. In short: verify upstream
endpoints before using them, never report a capability the server does not have,
keep credentials out of files and logs, and run ./scripts/validate.sh before
committing.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for scoped credential retrieval by AI agents. Approve specific service keys, review credential-access audit logs, and revoke future retrieval access. Connect with OAuth or an agent token.
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Scoped agent execution. Server-side credentials, policy, budgets and verifiable receipts.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible LLM clients to execute server-verified agent workflows, with enforced transitions, invocation caps, and signed audit trails.MIT
- AlicenseNot gradedqualityCmaintenanceEnables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to run declarative agents and DAG workflows as plain tools, with parallel nodes, review loops, and per-run least-privilege sandboxing.10 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables governed MCP agent tool invocation with policy-based authorization, short-lived credentials, and audited access control.-