Proof of concept: an agent in an OpenShell sandbox gets governed access to an API through a reShapr MCP server. OpenShell decides what the sandbox may reach and send; reShapr decides what the agent can do with the API and how much comes back.
sandbox (curl) ──► OpenShell proxy ──► host.openshell.internal:7777 ──► reShapr ──► api.open-meteo.com
protocol: mcp rules adds x-reshapr-key (op filters, audit)
reshapr-profile.yaml: OpenShell provider profile. One MCP endpoint, allow-list of methods and the toolget_v1_forecast, MCP revision 2025-06-18 only, API key injected asx-reshapr-key.Dockerfile: sandbox image withcurl(the default base image has none).smoke.sh: runs inside the sandbox; positive path plus negative checks.
Tested with OpenShell 0.1.8 (macOS, Docker Desktop, supervisor_network_mode = "bridge") and reShapr 1.1.0.
(cd ../reshapr-sbx-poc && make up) # reShapr on :7777, key in .state/api-key
docker build -t reshapr-openshell-poc:curl .
openshell provider profile import -f reshapr-profile.yaml --global
openshell provider create --name reshapr --type reshapr-mcp \
--credential RESHAPR_API_KEY="$(cat ../reshapr-sbx-poc/.state/api-key)"
openshell sandbox create --from reshapr-openshell-poc:curl --provider reshapr \
--no-keep --no-tty -- bash -c "$(cat smoke.sh)"| Check | Result |
|---|---|
initialize, notifications/initialized, tools/list |
200, tool get_v1_forecast listed |
tools/call get_v1_forecast |
real Open-Meteo data via reShapr |
| Key inside the sandbox | only openshell:resolve:env:... placeholder |
| No key sent (placeholder not put in the header) | reShapr 401 (key is only injected where the client sends the placeholder) |
tools/call of another tool |
OpenShell policy_denied (MCP tool call has no matching rule) |
resources/list (not allowed) |
OpenShell policy_denied |
MCP-Protocol-Version: 2025-03-26 |
OpenShell mcp_protocol_version_not_allowed |
| Other reShapr path | 403 from OpenShell |
Direct call to api.open-meteo.com |
blocked (000) |
| Check | Result |
|---|---|
server/discover |
reShapr lists supported versions incl. 2026-07-28 |
tools/list, tools/call get_v1_forecast (no initialize, no session id) |
real Open-Meteo data |
tools/call of another tool, resources/list |
OpenShell policy_denied |
Mcp-Name header not matching params.name |
OpenShell invalid_mcp_request_metadata (400) |
MCP-Protocol-Version: 2025-06-18 on this endpoint |
OpenShell mcp_protocol_version_not_allowed |
| No key | reShapr 401 |
Requests need MCP-Protocol-Version, Mcp-Method, Mcp-Name (for tools/call) and params._meta with the protocol version and client capabilities.
Copilot CLI in the sandbox (Dockerfile.copilot, copilot-profile.yaml, reshapr-profile-agent.yaml, agent.sh)
Inconclusive. Copilot CLI 1.0.109 started and reached its API through OpenShell, but blocked the reshapr MCP server with "Could not verify server against any configured registry". That is an account-level MCP registry policy, not an OpenShell denial. OpenShell blocked the agent's fallback direct call to api.open-meteo.com. Retry with an account without the MCP registry restriction, or another agent.
- OpenShell MCP inspection accepts reShapr's session flow (initialize, notifications/initialized, tools/list, tools/call) on 2025-06-18.
- Injection is placeholder substitution: the client must send
x-reshapr-key: $RESHAPR_API_KEY. The real key never enters the sandbox. - On Docker Desktop without host networking, set
[openshell.drivers.docker] supervisor_network_mode = "bridge", otherwise the supervisor cannot reach the gateway. host.openshell.internal:7777was reachable with noallowed_ips.- The sessionless 2026-07-28 revision works end to end once the profile lists
mcp.versions: ["2026-07-28"]andserver/discoverinstead ofinitialize. - Defense in depth: reShapr operation filters plus OpenShell tool allow-list.
- OAuth2/elicitation expositions (SSE responses are relayed unparsed by OpenShell).
- A real agent end to end (Copilot CLI was blocked by an MCP registry policy on the test account; Claude Code not tried).
- Linux and VM/Podman drivers, reShapr on a remote or Kubernetes gateway.
- Audit correlation between OpenShell OCSF and reShapr audit logs.