The Model Context Protocol (MCP) lets P31 connect to external tools and data sources. Currently two MCP servers are bundled.
Command: node /path/to/phos-forge/mcp-server.mjs
26 tools for file management, cognitive state, deployment, research, and self-healing:
Command: node /path/to/google-workspace-mcp/build/index.js
Calendar, contacts, and email integration. Enables queries like "What meetings do I have today?"
MCP servers are configured in cmd/chat.go in the initMCP() function:
servers := []p31mcp.ServerDef{
{
Name: "my-server",
Command: "node",
Args: []string{"/path/to/server.mjs"},
Env: map[string]string{"KEY": "value"},
},
}
Tool names are prefixed with server__ (e.g., my-server__my-tool) to route calls to the correct server.