Repository navigation
feat(mcp): module state and logs as MCP resources - #457
Merged
Merged
Conversation
Uses the resource templates, subscriptions and long running routes from
action-controller 9.3 to bring the module debugging features of the
control websocket to MCP clients.
- resource templates: `placeos://modules/{id}/state`,
`placeos://modules/{id}/state/{key}`, `placeos://systems/{sys_id}/{module_slug}/{key}`
and `placeos://modules/{id}/logs{?seconds,level}`
- the two state value templates can be subscribed to. Watchers use the
websocket's redis subscriptions, so any instance can serve a client, and
clients re-read the resource when notified
- GET /modules/:id/state/:key/value returns the stored JSON as is, for MCP
reads. `state_lookup` is unchanged
- GET /modules/:id/logs captures a module's debug output for `seconds`
(30s default, 36h max) at or above `level`, streamed over HTTP and spooled
to disk for MCP clients, capped at 3 MiB with a truncation marker
- module logs need support or admin users, or support subsystem Operate and
Read (or Manage) on the module's zones. The websocket `debug` command now
requires the same
- requires action-controller >= 9.3.0, which no longer issues Mcp-Session-Id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stakach
force-pushed
the
feat/mcp-module-resources
branch
from
October 20, 2026 06:11
0dd202f to
de256b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the module debugging features of the
/systems/controlwebsocket to MCP clients, using the resource templates, subscriptions and long running routes from action-controller 9.3.placeos://modules/{id}/state,placeos://modules/{id}/state/{key},placeos://systems/{sys_id}/{module_slug}/{key}andplaceos://modules/{id}/logs{?seconds,level}GET /modules/:id/state/:key/value: returns the stored JSON as is, for MCP reads.state_lookupis unchangedGET /modules/:id/logs: captures a module's debug output forseconds(30s default, 36h max) at or abovelevel, streamed over HTTP and spooled to disk for MCP clients, capped at 3 MiB with a truncation markerdebugcommand now requires the sameMcp-Session-Id(spec updated)Specs: the new and affected spec files pass locally (80 examples, 0 failures).
🤖 Generated with Claude Code