The MCP server and the Kiro Power
What the MCP server can read and draft, how its key works, and what is not built yet.
The MCP server lets an AI assistant such as Kiro read one ActionPotential workspace and create drafts for approval. The Kiro Power in power/ packages the server with two skills. Approving, handing over and sending stay clicks in the App.
What it does
Tools
| Tool | What it returns or does |
|---|---|
today | Reviews waiting, follow-ups due, revival candidates, drafts waiting, and the events of the last 30 days and the coming ones, with their dates |
search_people | People by name, organisation, event or tag (hot, warm, cold), matched over the same people the People page lists |
people_without_basis | The people with no consent in force for any purpose, with or without a tag or event, newest first (up to 100) with the total; reads only |
get_timeline | One person's history across sources, with evidence |
import_status | An import's progress and findings |
explain_consent | A person's basis, receipts and history; changes nothing |
revival_candidates | Stalled deals, highest score first (up to 20), with the reason each stalled |
draft_follow_up | Creates a draft. The consent check decides whether it is waiting or blocked |
verify_ledger | Checks the consent chain and names the first break, if any |
A tool whose name asks to approve, hand over, send, withdraw, delete, erase or purge is refused with: "The action is a click in the App. This server can read and draft, and it never approves, hands over, sends, withdraws on someone's behalf or deletes."
A withdrawn or erased person comes back as a status only. In Sandbox_Mode, values a Simulator produced carry "label": "Simulated", and the assistant should say they are Simulated.
The MCP key
- As the owner, open Admin, then the Integrations tab, and press "Create key".
- Copy the key at once. It starts with
apmcp_, is shown once, and cannot be shown again. Only its SHA-256 hash is stored. - Creating a new key stops the old one working. Each creation writes one audit entry, without the key.
- "Revoke" on the same tab stops a key at once. The server then refuses it with: "This MCP key was revoked by the workspace owner. Ask them for a new key." Each revoke writes one audit entry, without the key.
The server process
node --experimental-strip-types mcp/main.ts runs the server over standard input and output (newline-delimited JSON-RPC 2.0, protocol version 2024-11-05). It reads DATABASE_URL (the ap_app role, so row-level security applies), CONSENT_MASTER_KEY, APP_BASE_URL, AUTH_SECRET, SANDBOX_MODE and MCP_KEY from its environment. The key is never taken from the assistant's arguments. Without a valid key every call is refused with the reason.
The Kiro Power
power/ holds plugin.json, mcp.json (which starts mcp/main.ts with environment references only), the agent instructions in power/dev.kiro/INSTRUCTIONS.md, and two skills:
event-follow-up: after an event, lists the hot leads in follow-up order, drafts a follow-up for each person who can be contacted, and reports the consent gaps.consent-audit: verifies the consent chain and lists the people with no basis to contact them.
To use it, set AP_HOME (your checkout), AP_MCP_KEY, AP_DATABASE_URL, AP_APP_BASE_URL, AP_CONSENT_MASTER_KEY, AP_AUTH_SECRET and AP_SANDBOX_MODE where Kiro runs, and approve them in Kiro's MCP environment settings. Never paste a key or a database URL into mcp.json or a chat.
The demo prompt is: "Using ActionPotential, tell me who from yesterday's expo I should follow up first and draft the messages for my approval."
Limits
- The server and the power have not yet been run from Kiro against a real database. The Postgres adapters are tested only where a test database is configured.
- The server needs a direct connection to the App's database, so it runs on a machine that can reach Postgres, not over the public site.
- A key gives read and draft access to the whole workspace. There are no narrower scopes. The tab does not record when a key was last used.
- Drafts made through the server pass the consent check but not the AI draft check, because the assistant writes them.
.kiro/settings/mcp.jsonin the repository configures build-time servers (a read-only Postgres, a browser, fetch and GitHub), not this server. The fetch server is the Pythonmcp-server-fetchstarted withuvx(install uv first). Its--allowed-hostslist in that file names the library documentation sites and the sites with the DPDP Act and Rules; it refuses every other host, redirects included. It runs with--no-readability-js, so it never installs npm packages while it runs. To read another site, add its host to the list.
Troubleshooting
| What you see | What to do |
|---|---|
| Every call is refused for the key | Create a new key in Settings and set AP_MCP_KEY. An older key stops working when a new one is made. |
| The server does not start | Check that Node 22 is installed, AP_HOME points at the checkout, and AP_DATABASE_URL is reachable. Log lines go to standard error. |
| "The action is a click in the App…" | Expected. Approve and hand over on /approvals. |
A draft comes back blocked | The person has no basis on that channel. explain_consent shows why. |
| A person shows only a status | They withdrew or their details were erased. Do not contact them. |
See also The Approval desk and Consent records and the ledger.