TL;DR: Two extra interfaces over the same engine. MCP server for AI-agent integration; CLI for shell scripts. Both wrap the REST API with auth + ergonomics.
MCP server
The MCP (Model Context Protocol) server exposes Unstuck Engine actions as tools that AI agents can call.
Install
npx @unstuckengine/mcp-server@latest
Then register in your MCP client:
- Claude Desktop: add to
claude_desktop_config.json - Cursor: add to
~/.cursor/mcp.json - Custom agents: follow your framework's MCP integration docs
{
"mcpServers": {
"unstuck": {
"command": "npx",
"args": ["@unstuckengine/mcp-server"],
"env": {
"UNSTUCK_API_KEY": "<your-api-key>"
}
}
}
}
Tools exposed
The MCP server exposes ~15 tools:
Tool | What it does
`enrich_record` | Single-record enrichment
`enrich_account` | Account-level enrichment
`qualify_record` | Run ICP / Persona scoring on identity hints
`send_signal` | Send a custom signal event
`find_lead` | Lookup leads matching a filter
`find_account` | Lookup accounts matching a filter
`get_record` | Get full lead / account by ID
`list_audiences` | List audiences in workspace
`add_to_audience` | Add a record to a manual-add audience
`list_signals` | List signal types and current status
`get_insights` | Pull aggregated outcome metrics
Full tool schemas in Edge Function Contracts.
Typical agent usage
An agent reasoning over a lead might call:
1. find_lead({ email: "person@company.com" })
→ returns lead_id + current enrichment state
2. enrich_record({ identity_hint: { email: "..." }, channels: ["phone"] })
→ fills the missing phone channel
3. qualify_record({ record_id: "lead_xyz" })
→ returns updated ICP / Persona scores
4. add_to_audience({ record_id: "lead_xyz", audience_id: "aud_outbound_q4" })
→ enrolls in the outbound motion
Compound calls happen in one agent turn; the agent doesn't need to chain manual prompts.
CLI
Same capabilities, command-line interface.
Install
npm install -g @unstuckengine/cli
Authenticate once:
$ unstuck auth login
> API key: <paste your key>
The key is stored in ~/.unstuck/credentials (chmod 600).
Common commands
# Enrich a single record
$ unstuck enrich --email person@company.com
# Send a custom signal
$ unstuck signals send \
--type custom_event \
--source my-system \
--email person@company.com \
--context '{"team_size": 12}'
# Find leads matching a filter
$ unstuck leads find --icp Mid-market_SaaS --persona VP_Sales
# Bulk enrich from a CSV
$ unstuck enrich bulk --input leads.csv --channels work_email,phone
# Get insights
$ unstuck insights --range last_30_days --group-by icp
Every command supports --json for machine-readable output (default is human-readable tables).
Scripting patterns
# Enrich all leads in an audience, output failed ones for review
unstuck audience members aud_outbound_q4 --json | \
jq -r '.[] | select(.work_email == null) | .id' | \
while read id; do
unstuck enrich --record-id "$id" --json | \
jq 'select(.credits_used == 0)' >> failed.jsonl
done
When to use which
Need | Use
AI agent integration | MCP server
Shell scripts, cron jobs | CLI
Bulk operations, web app | REST API
Interactive, one-off lookups | CLI or App UI
The MCP server, CLI, and REST API all share the same auth, rate limits, and credit accounting. You can mix and match within a single workflow.