Twisp for AI Agents

Start Twisp on your machine, connect your agent with one URL, and it can design, build, verify, and automate a ledger, with every call it makes recorded.

An AI agent can do real accounting work in Twisp from its first minute: design a chart of accounts for a business, encode its money movements as tran codes, post and verify them, and then build the tools, agents, and MCP servers that automate it. Getting there takes two steps.

1. Start Twisp

docker run -p 3000:3000 -p 8080:8080 -p 8081:8081 public.ecr.aws/twisp/local:latest

The local environment needs no sign-in. When it starts, it prints the URL of its MCP server:

MCP server: http://localhost:8080/mcp/v1/000000000000/default

2. Connect your agent

Add that URL to your agent as an MCP server. In Claude Code:

claude mcp add --transport http twisp http://localhost:8080/mcp/v1/000000000000/default

Or check it into a project's .mcp.json, so every agent working in the project has it:

{
  "mcpServers": {
    "twisp": { "type": "http", "url": "http://localhost:8080/mcp/v1/000000000000/default" }
  }
}

In VS Code, add the same entry under servers in .vscode/mcp.json. Then ask for something real:

We're launching a peer-to-peer wallet. Customers fund it by ACH, send money to each other, and withdraw. Design the ledger in Twisp, post a day of realistic activity, and prove the books balance.

What your agent gets

The default server is the whole of Twisp, offered to an agent:

ToolWhat it does
graphqlRuns any query or mutation of the GraphQL API. The schema documents itself, so the agent learns it by introspection.
celEvaluates a CEL expression, so the agent can try a tran code's expressions before it creates the tran code.
programRuns a Starlark program over these tools in one transaction. With commit: false it previews every row it would write, so a whole design can be checked first.
invokeRuns a tool or agent the agent built. With commit: false, the default, it previews a stored version or a draft and commits nothing, showing the output or error, the calls, and the rows it would write; with commit: true it runs the published version for real.
get_taskReads an agent's run that invoke started, until it finishes.
cancel_taskCancels an agent's run that invoke started.
auditReads back what this session did: each request, with its intent and status. See the default server.

And skills, which carry what an experienced Twisp engineer knows. The agent loads each one when the work calls for it:

SkillWhen
basicsBefore its first call: the ledger model and the API conventions that matter.
designBefore designing accounts and tran codes: following the money, normal balances, layers, limits, and proven patterns.
verifyBefore calling a ledger correct: the trial balance, expected balances, reconciliation, and testing the rules.
actionsBefore building tools and automations that run on ledger changes.
agentsBefore building agents that run inside Twisp.
mcpBefore offering tools to other agents through an MCP server of its own.

Every call is recorded

Each request your agent makes is an execution of the default server, recorded with the reason the agent gave for it: every tool requires an intent. So the whole design and build is an audit trail, which you can read back:

query WhatMyAgentDid($server: UUID!) {
  actions {
    executions(where: { actionId: $server }, first: 50) {
      nodes {
        created
        status
        mcpRequest { method name intent }
      }
    }
  }
}

Find the server's actionId with actions { actions(first: 50) { nodes { actionId definition { name } } } }.

Make it yours

The default server is made of ordinary actions: the server, its tools, and its skills are yours to change. Add your own tools and skills to it, write skills about your business, or build narrower servers for other teams and agents. In the local environment the server runs LIVE, so its writes commit; a server you deploy for others starts in preview mode until you promote it. To connect hosts to servers in your Twisp cloud environment, see Connecting MCP hosts.

Without MCP

An agent that cannot use MCP can still work with Twisp: the GraphQL API is at http://localhost:8080/financial/v1/graphql, and /llms.txt indexes these docs for agents.

Previous
Introduction