Mooncore.MCP.Server
(mooncore v0.2.5)
Copy Markdown
MCP (Model Context Protocol) server for AI observability.
Everything is gated behind MOONCORE_DEV_SECRET. Nothing is exposed when the secret is not set.
Resources (read-only)
actions— list all registered actions across all appsclients— connected WebSocket client counts per pool/group/channelapps— registered app configurationsconfig— current Mooncore configuration (sanitized)
Tools
run_action— execute an action with given params and authadd_watcher— start collecting logs with optional tag filterread_logs— read collected logs, optionally filtered by tag or since an idclear_logs— clear the log buffereval— evaluate Elixir code in the running application
Summary
Functions
Add a log watcher. Returns a reference for reading. Requires MOONCORE_DEV_SECRET.
Clear all collected logs. Requires MOONCORE_DEV_SECRET.
Evaluate Elixir code in the running application. mooncore_dev_tools only. Returns the result or error.
Handle an MCP-style request. Returns a map response.
List all registered actions across all apps. Requires MOONCORE_DEV_SECRET.
Get all registered apps (sanitized — no sensitive data). Requires MOONCORE_DEV_SECRET.
Get connected client counts for a pool. Requires MOONCORE_DEV_SECRET.
Publish a WebSocket message to connected clients. Requires MOONCORE_DEV_SECRET.
Read logs. Optional tag filter or since_id. Requires MOONCORE_DEV_SECRET.
Read WebSocket message logs with optional filters. Requires MOONCORE_DEV_SECRET.
Run an action through the full pipeline. Requires MOONCORE_DEV_SECRET.
Get current server configuration (sanitized). Requires MOONCORE_DEV_SECRET.
Functions
Add a log watcher. Returns a reference for reading. Requires MOONCORE_DEV_SECRET.
Clear all collected logs. Requires MOONCORE_DEV_SECRET.
Evaluate Elixir code in the running application. mooncore_dev_tools only. Returns the result or error.
Handle an MCP-style request. Returns a map response.
Read resources: actions, clients, apps, config Tools (mooncore_dev_tools): run_action, add_watcher, read_logs, clear_logs, eval
List all registered actions across all apps. Requires MOONCORE_DEV_SECRET.
Get all registered apps (sanitized — no sensitive data). Requires MOONCORE_DEV_SECRET.
Get connected client counts for a pool. Requires MOONCORE_DEV_SECRET.
Publish a WebSocket message to connected clients. Requires MOONCORE_DEV_SECRET.
Params
group— the dkey/group to target (required)event— event name string (required)message— payload map or value (required)channels— list of channel strings (default: ["main:default"])
Read logs. Optional tag filter or since_id. Requires MOONCORE_DEV_SECRET.
Read WebSocket message logs with optional filters. Requires MOONCORE_DEV_SECRET.
Options
limit— max entries (default 100, max 1000)user— filter by usernamechannel— filter by channel namedirection— filter by "in", "out", or "publish"since_id— only return entries after this id (for polling)
Run an action through the full pipeline. Requires MOONCORE_DEV_SECRET.
Params
action— action name stringparams— map of params to passauth— optional auth map (roles, user, app, dkey, scope)
Get current server configuration (sanitized). Requires MOONCORE_DEV_SECRET.