@daxaur/ctrl-mcp
v0.2.0
Published
Base MCP plugin for CTRL — turn natural language into onchain workflow automations on Base. Sign once, trade forever.
Maintainers
Readme
@daxaur/ctrl-mcp
Workflow automation built on Base MCP. Designed to compose with every native plugin.
Tell Claude, Cursor, or Codex what your agent should do. CTRL assembles the workflow, you sign once, and CTRL's keeper runs it on Base mainnet — chaining into other Base MCP plugins (Moonwell, Uniswap, Aerodrome, send_calls) as the workflow needs them.
Built for the Base Agent Quest. Custom Base MCP plugin per the official spec. Live at ctrl.build/mcp.
How CTRL composes with Base MCP
CTRL is the automation layer for Base MCP. The native plugins are precise primitives — each transaction goes through human approval, which is exactly what they're built for. CTRL adds a different primitive: a persistent workflow that fires those native plugin actions automatically on triggers (time, price, on-chain events, social signals), under on-chain spending caps the user signed once.
Your agent uses native plugins for one-shot actions, and CTRL when you want those actions to recur or fire conditionally. The two work together — your agent can chain base.send_calls to fund a CTRL vault and ctrl_activate to start the workflow in the same chat.
Install
1. Get your API key
Visit ctrl.build/settings/api-keys, sign with your wallet, and mint a key. You'll see it ONCE — paste it into your MCP client config below.
2. Add to your MCP client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ctrl": {
"command": "npx",
"args": ["-y", "@daxaur/ctrl-mcp"],
"env": {
"CTRL_API_KEY": "sk_ctrl_YOUR_KEY_HERE"
}
}
}
}Restart Claude Desktop.
Cursor
Edit ~/.cursor/mcp.json (or via Settings → MCP Servers):
{
"mcpServers": {
"ctrl": {
"command": "npx",
"args": ["-y", "@daxaur/ctrl-mcp"],
"env": {
"CTRL_API_KEY": "sk_ctrl_YOUR_KEY_HERE"
}
}
}
}Other MCP clients
Run as a stdio MCP server with CTRL_API_KEY set:
CTRL_API_KEY=sk_ctrl_YOUR_KEY_HERE npx @daxaur/ctrl-mcpWhat you get
Four tools registered with your AI client:
| Tool | What it does |
|------|--------------|
| ctrl_create_workflow | Assemble a CTRL workflow — trigger + chain of actions/conditions. Stored as a draft. |
| ctrl_activate | Returns an EIP-5792 transactions[] batch the user signs ONCE to deploy the vault + activate. |
| ctrl_fire_manual | Test-fire a workflow without waiting for the natural trigger. |
| ctrl_get_execution_logs | Read recent executions — trigger, status, BaseScan tx hash, gas used. |
Try it
Paste any of these into Claude or Cursor after install:
build me an agent that snipes new flaunch tokens with $25 each and auto-sells at 2x.
cap me at 0.5 eth per day.watch wallet 0x6cc5...c01b. when they buy anything for >$10k, copy with $50 of my own.every monday at noon UTC, swap $100 of usdc for eth. pause if eth is above $5000.The AI calls ctrl_create_workflow → ctrl_activate → you click the returned link → sign once → done.
How sign-once works
CTRL's V3 vault on Base mainnet is rule-based. When you activate a workflow:
- One EIP-5792 batch is composed:
[createVault + deposit, createRule(maxPerSwap, maxPerDay, expiry)] - You sign it ONCE in your Base Account (atomic — both calls succeed or both revert)
- From that moment, CTRL's keeper executes your workflow autonomously per the on-chain spending rules
- The keeper physically cannot exceed your caps — they're enforced in the non-custodial vault contract
Kill switches: pauseVault() or revokeRule() anytime from ctrl.build. The workflow stops instantly.
Architecture
- Plugin (
@daxaur/ctrl-mcp) — stdio MCP server using@modelcontextprotocol/sdk. Authenticates to ctrl.build with your API key. Wraps 4 REST endpoints under/api/mcp/*. - Sign-once envelope —
ctrl_activatereturns{ transactions: [{ to, data, value, chainId: 8453 }, ...] }, the canonical Base MCP shape used by Moonwell, Uniswap, and Aerodrome native plugins. - Vault contracts — V3 vault factory at
0x8E547D7758C79e23146f77b783149435feeA3e45on Base. CREATE2 vault addresses are predicted server-side so the batch's second call (createRule) knows its target before the first call (createVault) executes. - Keeper — 8-wallet fleet runs in prod (Render). Watches
trigger_configstable on a 5s tick. Signs and broadcasts the vault execute call when the trigger condition is met.
Environment variables
| Var | Required | Default | Notes |
|-----|----------|---------|-------|
| CTRL_API_KEY | yes | — | Your sk_ctrl_... key from ctrl.build/settings/api-keys |
| CTRL_API_BASE | no | https://ctrl.build | Override for staging / local dev |
Development
git clone https://github.com/ctrl-build/ctrl
cd ctrl/mcp-plugin
npm install
npm run buildTo test against a local CTRL stack:
CTRL_API_BASE=http://localhost:3737 CTRL_API_KEY=sk_ctrl_dev npx tsx src/index.tsLicense
MIT — CTRL Labs
