Skip to content

Events and Local Webhooks

String events are an agent-local text inbox. A local process can POST text to an agent’s webhook URL; String stores it as a pending event. The agent reads the event through CLI, MCP, or SDK and decides what to do.

String does not execute webhook payloads. A webhook creates a message, not a command.


Terminal window
string event webhook show

This prints the current agent’s local URL:

http://127.0.0.1:3923/webhook/wh_...

The token is stored in the agent registry. Rotate it with:

Terminal window
string event webhook rotate

The MCP/slash form is { "topic": "event", "cmd": "/webhook show" }.

Terminal window
curl -X POST \
-H 'Content-Type: text/plain' \
--data 'Run the scheduled Moltbook follow-up now.' \
http://127.0.0.1:3923/webhook/wh_...

The daemon accepts text up to 64 KiB and returns:

{ "ok": true, "agent_id": "default", "event_id": "evt_..." }

From CLI:

Terminal window
string event list
string event read evt_...
string event ack evt_...

From MCP:

{ "topic": "event", "cmd": "/events" }
{ "topic": "event", "cmd": "/events.read evt_..." }
{ "topic": "event", "cmd": "/events.ack evt_..." }

String can also deliver local webhook events as a Claude Code Remote Control channel. The normal string --mcp server provides both the string MCP tool and the channel capability, so tool calls and event push use the same agent id:

{
"mcpServers": {
"string": {
"command": "string",
"args": ["--mcp", "--agent", "default"]
}
}
}

Start Claude Code with that MCP config as a development channel. You can also load Anthropic’s official Discord channel at the same time:

Terminal window
claude \
--mcp-config .mcp.json \
--channels plugin:discord@claude-plugins-official \
--dangerously-load-development-channels server:string

When a local process POSTs text to the agent webhook, Claude receives it as a channel message from String. The same event remains in the event topic so the agent can read and acknowledge it explicitly.

If your installed Claude Code build exposes only --remote-control and not the channel flags above, update Claude Code before using this integration. The String side still uses the official MCP channel protocol.

Useful commands:

CommandMeaning
/eventsList pending events
/events list --allList pending and acked events
/events.read <id>Read the full event text
/events.ack <id>Mark an event handled
/events.clearDelete acked events
/events.clear --allDelete all events
  • The daemon still binds only to 127.0.0.1.
  • The webhook URL contains an agent-specific random token.
  • Webhook bodies are stored as text and never interpreted as String commands.
  • Bad tokens are rejected.
  • Claude Code channel delivery is notification-only. It does not mark an event acknowledged; agents should still use /events.ack <id> when handled.
  • The initial implementation is local-only; internet-facing webhooks need an explicit auth and relay design.