nanoclaw MCP server is automatically available to all agents running in NanoClaw. It provides tools for scheduling tasks, managing the task lifecycle, and sending messages to users.
Overview
The NanoClaw MCP server is implemented as a stdio-based MCP server that communicates with the host process via file-based IPC. Each agent gets a dynamically configured instance with context about its group, privileges, and target chat. Location:container/agent-runner/src/ipc-mcp-stdio.ts
Context Variables
The MCP server receives context from environment variables set by the agent runner:| Variable | Description |
|---|---|
NANOCLAW_CHAT_JID | JID of the chat/group this agent is running for |
NANOCLAW_GROUP_FOLDER | Folder name of the group (e.g., whatsapp_main) |
NANOCLAW_IS_MAIN | "1" if this is the main control group, otherwise unset |
Available Tools
The NanoClaw MCP server exposes the following tools to agents:Task Management
- schedule_task - Schedule a recurring or one-time task
- list_tasks - List all scheduled tasks (filtered by group)
- update_task - Modify an existing task’s prompt or schedule
- pause_task - Pause a scheduled task
- resume_task - Resume a paused task
- cancel_task - Delete a scheduled task
Messaging
- send_message - Send a message to the user immediately while the agent is running
Group Management (Main Only)
- register_group - Register a new chat/group for the agent to respond to
IPC Communication
The MCP server communicates with the host process by writing JSON files to the IPC directory:How Agents Access the Server
Agents running in containers automatically have access to the NanoClaw MCP server. The agent runner configures it dynamically based on the group context. Example usage from agent:Permissions Model
- All groups can schedule tasks for themselves, list their own tasks, and send messages
- Main group can schedule tasks for any group, list all tasks, and register new groups
- Non-main groups can only target their own chat with
schedule_task- thetarget_group_jidparameter is ignored
Related Documentation
- schedule_task - Detailed documentation for scheduling tasks
- Task Management Tools - Tools for managing scheduled tasks
- Channel Interface - How channels deliver messages from tasks