Connect with MCP
Use your Truman API key with an MCP client that supports Streamable HTTP and custom authorization headers. No local Truman server is required. The same approved agents, permissions, research limits and credit balance apply.
https://staging.truflation.com/truman/v1/mcp
For direct transport access, including all MCP protocol headers, use:
https://truman-external-api-staging-staging.up.railway.app/truman/v1/mcp
Claude Code
Set TRUMAN_API_KEY privately in your local environment, then register the server:
claude mcp add --transport http --scope local truman \
https://staging.truflation.com/truman/v1/mcp \
--header "Authorization: Bearer $TRUMAN_API_KEY"
claude mcp list
The client stores its connection configuration locally. Protect that configuration as a credential; never commit it or paste the key into chat. Revoke the key from Account → Truman API when finished.
Try it
- “List my saved Truman agents and the research options available to my key.”
- “Start a new chat with Phil. Remember cedar, then tell me which agent you are.” Follow up in the same chat: “What word did I give you?”
- “Show the saved results and settled credit usage for that operation.”
The server exposes 15 tools and 72 reviewed workflow actions. Start with truman_workflows for current permissions and prices, then truman_actions and truman_action_schema. Research returns an operation ID; status/result reads do not submit another paid job. Keep the same session for follow-ups and corrections, and reuse the same idempotency key only when retrying the same intended submission.
Downloads return a verified hash, MIME type and authenticated API link. Files up to 256 KiB also include their bytes as base64. Larger files use the same API key in the download header, never in the URL. MCP uploads support up to 256 KiB; use the HTTP API for larger transfers.
This preview uses API keys, not browser-based OAuth. Disconnecting the MCP client does not cancel durable research. Wallet payments, signup-free access and trading-runbook integration are separate follow-ups.
Call your saved agent
1. Approve access and create a key
Sign in to staging and open Account → Truman API. Review the client access offered to your account, approve it, then create a key under that approved access. For this example, choose access that includes saved agents, research and workspace creation. If none is offered, ask your team to enable a staging access template for your account.
Copy the key once and keep it in an environment variable on your server or local machine. Never put it in browser code, a URL, source control or a chat message. Rotate and revoke keys from the same account page.
# Use the origin hosting this page. On the website staging domain:
export TRUMAN_BASE="https://staging.truflation.com/truman/v1"
# Read your key without adding it to shell history (bash/zsh).
read -s TRUMAN_API_KEY
export TRUMAN_API_KEY
2. Check access and list agents
curl --fail-with-body "$TRUMAN_BASE/workflows" \
-H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/agents?limit=20" \
-H "Authorization: Bearer $TRUMAN_API_KEY"
Choose an active agent from items; use its agent_id. Lists return next_cursor when another page exists. Create or edit your agent in the website first. The API currently lists and invokes saved agents; it does not create agent profiles.
3. Create a conversation for that agent
export AGENT_ID="replace-with-an-agent-id"
curl --fail-with-body -X POST "$TRUMAN_BASE/agents/$AGENT_ID/sessions" \
-H "Authorization: Bearer $TRUMAN_API_KEY" \
-H "Idempotency-Key: my-agent-chat-001"
This request has no body. Use the returned session_id below. Creating a new agent conversation requires access to all work owned by your personal account; grants limited to selected resources can use approved existing conversations.
4. Ask a question
export SESSION_ID="replace-with-the-session-id"
curl --fail-with-body -X POST "$TRUMAN_BASE/sessions/$SESSION_ID/research" \
-H "Authorization: Bearer $TRUMAN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: my-agent-question-001" \
-d "{\"agent_id\":\"$AGENT_ID\",\"objective\":\"Introduce yourself and explain how you can help with inflation research.\",\"effort\":\"medium\"}"
202 Accepted returns an operation_id, status_url and result_url. These URLs are relative to the origin, not to TRUMAN_BASE. Follow Location and Retry-After; an accepted job is not a finished answer. Research consumes credits even for a simple greeting.
5. Read progress, then the result
export OPERATION_ID="replace-with-the-operation-id"
curl --fail-with-body "$TRUMAN_BASE/sessions/$SESSION_ID/research/$OPERATION_ID" \
-H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/operations/$OPERATION_ID/result" \
-H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/operations/$OPERATION_ID/usage" \
-H "Authorization: Bearer $TRUMAN_API_KEY"
Read the result after status is completed or partial. Partial means the result has limits; retain those limits in your UI. Result delivery waits for credit settlement. Agent conversation history and the settled answer are projected into the website conversation.
Follow-ups, streaming and recovery
Follow-up: submit another question to the same session with the same agent_id and a new idempotency key. The agent uses bounded conversation history. An agent cannot be substituted into another agent’s conversation.
Clarifications: a waiting_user status includes a suspension with its checkpoint revision and pending interaction. POST the checkpoint_revision, interaction_id and answers to /sessions/{session_id}/research/{operation_id}/resume. Obtain the answer schema from /workflows. Partial answers and an empty answers array are supported; never manufacture a user answer or approval.
curl -N "$TRUMAN_BASE/sessions/$SESSION_ID/research/$OPERATION_ID/stream" \
-H "Authorization: Bearer $TRUMAN_API_KEY" \
-H "Accept: text/event-stream"
The status stream is bounded and reconnectable. Resume with Last-Event-ID. For provisional answer streaming, submit stream_answer: true and use /live/stream when offered by workflow discovery. Provisional text is not a settled final result.
Retries: retain the same idempotency key and identical request after a timeout, 429 or retryable 503. Honor Retry-After. Use a new key for new work. Never retry by changing the key after an uncertain submission.
Stop: POST /operations/{operation_id}/cancel. Cancellation is a request; a provider call already in flight may finish and used credits can still be charged. Poll the operation for its final state.
Errors return error.code, error.message, error.retryable and a request_id. Keep the request ID when reporting a problem. 401 means invalid or expired credentials; 403 means insufficient approved access; 404 can also hide an inaccessible resource; 409 indicates a state or idempotency conflict; 422 means invalid input. Do not retry these unchanged unless the underlying condition has changed.
Discover what your key can do
| Use case | Start here | Permission boundary |
|---|
| Saved agents | GET /agents | agents:read; invoking also needs agents:invoke, research and workspace scopes. |
| Research | GET /workflows and GET /research/options | Inspect the returned workflow scopes and limits. Effort names are API values; medium corresponds to Balanced. |
| Direct tools | GET /capabilities, then GET /capabilities/{capability_ref} | Use only the capability’s returned schema, required scopes and quoted policy. Tool names from the chat are not automatically public contracts. |
| Files and artifacts | GET /sessions/{session_id}/resources; artifact jobs and upload routes below | Pin input versions explicitly. Export downloads require the same bearer access; they are not public links. |
| Skills, memory and connected accounts | GET /skills, GET /memories, GET /connections | Select them explicitly in the research request. A saved agent’s configuration does not automatically grant an API key access to every app, file or memory. |
| Schedules and sharing | Inspect workflow discovery and the route schema | Separate permissions apply. Publishing and email delivery require explicit choices; staging limits remain in effect. |
For saved-agent research, connected-account use must satisfy both the API consent and the agent’s own account permissions. Paused or archived agents cannot run new research. A profile edit does not change an operation already admitted.
Larger file uploads
The website gateway has Vercel’s 4.5 MB request limit. For uploads over 4 MB, use the direct staging API base below for the upload flow, with the same API key. Backend file-type, size, ownership and credit checks still apply. Download responses are streamed.
export TRUMAN_BASE="https://truman-external-api-staging-staging.up.railway.app/truman/v1"
Route reference
This list is generated from the running API. Explore and try requests in the Swagger UI reference, or download the Interactive API referenceOpenAPI schema for request and response fields. A route’s presence does not mean your key has permission to use it.
| Method | Path | Operation |
|---|
GET | /truman/v1/sources | Sources |
GET | /truman/v1/discovery | Browse |
POST | /truman/v1/discovery/search | Search |
GET | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/comments | Get |
PUT | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/comments | Put |
GET | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/state | Get |
PUT | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/state | Put |
GET | /truman/v1/memories | Page |
POST | /truman/v1/memories | Create |
GET | /truman/v1/memories/{memory_id} | Read |
PUT | /truman/v1/memories/{memory_id} | Edit |
POST | /truman/v1/memories/{memory_id}/delete | Delete |
GET | /truman/v1/skills | Page |
POST | /truman/v1/skills | Create |
GET | /truman/v1/skills/{skill_id} | Read |
PUT | /truman/v1/skills/{skill_id} | Replace |
GET | /truman/v1/skills/{skill_id}/document | Read |
POST | /truman/v1/skills/{skill_id}/delete | Remove |
GET | /truman/v1/connections | Page |
GET | /truman/v1/agents | Agents |
GET | /truman/v1/agents/{agent_id} | Agent |
GET | /truman/v1/agents/{agent_id}/sessions | Sessions |
POST | /truman/v1/agents/{agent_id}/sessions | Create Session |
GET | /truman/v1/sessions/{session_id}/reports/{artifact_id}/versions | Versions |
POST | /truman/v1/sessions/{session_id}/documents/query | Documents |
POST | /truman/v1/sessions | Create Session |
GET | /truman/v1/sessions | Sessions |
POST | /truman/v1/sessions/{session_id}/uploads | Create Upload |
GET | /truman/v1/uploads/{upload_id} | Upload Status |
PUT | /truman/v1/uploads/{upload_id}/content | Upload Content |
POST | /truman/v1/uploads/{upload_id}/cancel | Cancel Upload |
DELETE | /truman/v1/sessions/{session_id}/files/{artifact_id} | Remove Attachment |
GET | /truman/v1/sessions/{session_id}/resources | Resources |
GET | /truman/v1/sessions/{session_id}/resources/{kind}/{artifact_id} | Resource |
GET | /truman/v1/sessions/{session_id}/resources/{kind}/{artifact_id}/content | Content |
GET | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/structure | Structure |
POST | /truman/v1/sessions/{session_id}/datasets/{artifact_id}/rows | Rows |
GET | /truman/v1/sessions/{session_id}/datasets/{artifact_id}/export | Dataset Export |
POST | /truman/v1/sessions/{session_id}/files/{artifact_id}/passages | Passages |
POST | /truman/v1/sessions/{session_id}/artifact-jobs | Submit |
GET | /truman/v1/artifact-jobs/{job_id} | Status |
POST | /truman/v1/artifact-jobs/{job_id}/cancel | Cancel |
GET | /truman/v1/artifact-jobs/{job_id}/content | Content |
GET | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/shares | Shares |
POST | /truman/v1/sessions/{session_id}/artifacts/{artifact_id}/shares/{share_id}/revoke | Revoke |
GET | /truman/v1/sessions/{session_id}/runs | Research Runs |
GET | /truman/v1/sessions/{session_id}/runs/{run_id} | Research Status |
GET | /truman/v1/sessions/{session_id}/runs/{run_id}/events | Research Events |
GET | /truman/v1/sessions/{session_id}/runs/{run_id}/audits | Research Audits |
GET | /truman/v1/research/options | Research Options |
POST | /truman/v1/sessions/{session_id}/research | Submit Research |
GET | /truman/v1/sessions/{session_id}/research/{operation_id} | Research Operation |
GET | /truman/v1/sessions/{session_id}/research/{operation_id}/analysts | Research Analysts |
GET | /truman/v1/sessions/{session_id}/research/{operation_id}/stream | Research Stream |
GET | /truman/v1/sessions/{session_id}/research/{operation_id}/live/stream | Research Live |
POST | /truman/v1/sessions/{session_id}/research/{operation_id}/resume | Resume Research |
POST | /truman/v1/sessions/{session_id}/research/{operation_id}/steer | Steer Research |
GET | /truman/v1/usage/export | Usage Export |
GET | /truman/v1/alerts | Alerts |
DELETE | /truman/v1/operations/{operation_id}/result | Delete Result |
GET | /truman/v1/operations/{operation_id}/result | Result |
POST | /truman/v1/schedules | Create |
GET | /truman/v1/schedules | List Schedules |
GET | /truman/v1/schedules/{schedule_id} | Get |
PUT | /truman/v1/schedules/{schedule_id} | Edit |
POST | /truman/v1/schedules/{schedule_id}/control | Control |
POST | /truman/v1/schedules/{schedule_id}/opened | Opened |
GET | /truman/v1/email-deliveries/access | Access |
POST | /truman/v1/email-deliveries/preview | Preview |
POST | /truman/v1/email-deliveries | Create |
GET | /truman/v1/email-deliveries/{delivery_id} | Get |
POST | /truman/v1/email-deliveries/{delivery_id}/cancel | Cancel |
GET | /truman/v1/account/scheduled-deliveries/{execution_id} | Scheduled Delivery |
GET | /truman/v1/account/credits | Credits |
GET | /truman/v1/account | Account |
GET | /truman/v1/account/reports | Reports |
GET | /truman/v1/account/reports/{report_id} | Report |
GET | /truman/v1/account/reports/{report_id}/pdf | Pdf |
GET | /truman/v1/workflows | Workflows |
GET | /truman/v1/capabilities | Capabilities |
GET | /truman/v1/capabilities/{capability_ref} | Describe |
POST | /truman/v1/operations | Submit |
GET | /truman/v1/operations | History |
POST | /truman/v1/programs | Program |
GET | /truman/v1/operations/{operation_id} | Status |
POST | /truman/v1/operations/{operation_id}/cancel | Cancel |
GET | /truman/v1/operations/{operation_id}/usage | Usage |