Provides an autonomous AI agent and MCP server with 133 tools for neurodivergent support, session management, and design compliance.
Also known as p31labs/p31-cli, p31-cli, @p31ca/cli
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 3.1.6
- Last commit
- Nov 6, 2026
- License
- MIT
What is P31 Sovereign CLI MCP?
P31 Sovereign CLI provides an autonomous AI agent and MCP server with 133 tools for neurodivergent support, session management, and design compliance.
Summary generated from the project's README
About P31 Sovereign CLI MCP server
P31 Governed Agent CLI provides an autonomous AI agent and an MCP server designed specifically for neurodivergent support and design compliance. Developers can deploy it as a local stdio server or a remote HTTP server. The system includes 133 tools organized into ten distinct categories such as cognitive support, design tokens, and verified facts. It supports three LLM providers, including Anthropic, Google Gemini, and OpenRouter, and uses SQLite for sharded session management.
Users interact with the system through an interactive TUI with adaptive themes or via command line modes like p31 agent and p31 chat. The architecture relies on TypeScript and Node.js version 22 or higher. It integrates six sovereign plugins and manages state through various specialized toolsets like oasis for session state and marge for design compliance. Configuration is handled via opencode.json, allowing for both local commands and remote MCP URLs.
What you can do with it
- 1Neurodivergent cognitive supportAsk the AI to assist with cognitive tasks using the specialized neurodivergent support toolset.
- 2Manage design system complianceVerify that design implementations follow specific tokens and component registries.
- 3Maintain session state historyUse the oasis tools to manage and track CLI session states.
- 4Verify information accuracyAccess verified facts through the ground-truth tool category.
Written from the project's README. Every use case is checked against a quote from it.
How to install P31 Sovereign CLI MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall P31 Sovereign CLI MCP in Claude Code
$ claude mcp add p31-cli -- npx -y @p31ca/cliInstall P31 Sovereign CLI MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"p31-cli": {
"command": "npx",
"args": [
"-y",
"@p31ca/cli"
]
}
}
}Install P31 Sovereign CLI MCP in VS Code
.vscode/mcp.json
{
"servers": {
"p31-cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@p31ca/cli"
]
}
}
}Install P31 Sovereign CLI MCP in VS Code CLI
$ code --add-mcp '{"name":"p31-cli","type":"stdio","command":"npx","args":["-y","@p31ca/cli"]}'Install P31 Sovereign CLI MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"p31-cli": {
"command": "npx",
"args": [
"-y",
"@p31ca/cli"
]
}
}
}Install P31 Sovereign CLI MCP in Codex
$ codex mcp add p31-cli -- npx -y @p31ca/cliInstall P31 Sovereign CLI MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.p31-cli] command = "npx" args = ["-y", "@p31ca/cli"]
Install P31 Sovereign CLI MCP in Gemini CLI
$ gemini mcp add -s user p31-cli npx -- -y @p31ca/cliInstall P31 Sovereign CLI MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"p31-cli": {
"command": "npx",
"args": [
"-y",
"@p31ca/cli"
]
}
}
}Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablep31labs/p31-cli is public and reachablegithub.com/p31labs/p31-cli ↗Pass
- Package names this repository as its source@p31ca/cli names p31labs/p31-cli as sourcenpmjs.com/package/@p31ca/cli ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @p31ca/clinpmjs.com/package/@p31ca/cli/v/3.1.6#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-06github.com/p31labs/p31-cli ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @p31ca/cliPass
- No critical advisory in the package or its dependencies226 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeHTTPS endpoint answered 401 (sign-in required)Pass
README
View on GitHubP31 Sovereign CLI
Sovereign AI agent for neurodivergent families. OpenCode face, P31 guts.
Install
curl -fsSL https://cli.p31ca.org/install | bash
Or from source:
git clone https://github.com/p31labs/p31-cli.git
cd p31-cli
npm install
npm run build
npm link
Quick Start
p31 # Interactive TUI
p31 chat # One-shot chat
p31 agent # Autonomous agent mode
p31 mcp # MCP stdio server (133 tools)
p31 mcp:http # MCP HTTP server
p31 tui # Ink TUI with themes
p31 phos # PHOS forge commands
p31 spoons # Spoon level management
p31 session # Session management
p31 sync # Cross-app sync
Architecture
- TypeScript (ESM, Node.js >= 22)
- MCP Protocol — 133 tools across 10 categories
- OpenCode Plugins — 6 sovereign plugins
- 3 LLM Providers — Anthropic, Google Gemini, OpenRouter
- SQLite Sessions — Per-session-tree sharding
- Ink TUI — 3 themes, spoon-aware adaptive UI
- React Web UI — xterm.js terminal viewer
MCP Servers
| Category | Tools | Description |
|---|---|---|
| oasis | 11 | CLI session state |
| love | 4 | LOVE ledger |
| cognitive | 47 | Neurodivergent support |
| spaceship | 4 | DUNA / dome |
| ground-truth | 14 | Verified facts |
| marge | 12 | Design compliance |
| soulsafe | 15 | 3-gate verification |
| bob | 10 | Building ontology |
| component | 5 | Component registry |
| design | 11 | Design tokens |
| Total | 133 |
Configuration
// opencode.json
{
"mcp": {
"phos-forge": { "type": "local", "command": ["node", "/path/to/mcp-server.mjs"] },
"p31-crypto": { "type": "remote", "url": "https://p31-crypto-mcp.trimtab-signal.workers.dev/mcp" }
},
"plugin": ["spoon-monitor", "sovereign-id", "care-attest", "pqc-tools", "mesh-visualize", "honest-label"]
}
Design System
- Tokens:
tokens/tokens.yml - Components:
tokens/components.yml - Themes: p31ca, phosphorus31, crisis
- Accessibility: Atkinson Hyperlegible, 48px touch targets, WCAG AAA
Environment Variables
| Variable | Description |
|---|---|
LOVE_LEDGER_URL |
LOVE ledger endpoint |
LEDGER_BRIDGE_URL |
Ledger bridge endpoint |
P31_USER_ID |
Default user ID |
OPENCODE_CONFIG |
Custom OpenCode config path |
License
MIT — P31 Labs, Inc.
P31 Sovereign CLI MCP questions
How do I add P31 Sovereign CLI MCP to Claude Code?
Run claude mcp add p31-cli -- npx -y @p31ca/cli in your terminal. Add --scope user to make it available in every project.
How do I add P31 Sovereign CLI MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools are available via the MCP server?
The MCP server provides 133 tools organized across 10 categories including cognitive support, design compliance, and session state.
Which LLM providers are supported?
The system supports Anthropic, Google Gemini, and OpenRouter.
How can I run the MCP server?
You can run it as a stdio server using the 'p31 mcp' command or as an HTTP server using 'p31 mcp:http'.