MCP server
Lets an AI agent inspect the financial state of accounts you've assigned to it — balances, transactions, cards, direct debits, standing orders — under the policy you define. Any MCP-compliant client can connect.
https://mcp.agentis.capital/mcp
# Overview
The agentis MCP server implements Model Context Protocol over Streamable HTTP. See the setup guide for per-client integration steps.
Every session is bound to exactly one agent identity. All tool calls execute against that agent's policy.
# Connection
| Property | Value |
|---|---|
| Base URL | https://mcp.agentis.capital |
| MCP endpoint | POST /mcp, GET /mcp, DELETE /mcp |
| Transport | Streamable HTTP (MCP spec 2025-06-18) |
| Content-Type | application/json on requests |
| Accept | application/json, text/event-stream — both required (server may stream) |
| CORS | Not enabled. Browser calls aren't supported — proxy through your own backend. |
# Sessions
Sessions follow the MCP Streamable HTTP spec (created on initialize, identified by the Mcp-Session-Id header). Agentis-specific behavior:
- One agent identity per session; concurrent tool calls are permitted within a session
- Sessions are ephemeral; clients should re-initialize on
404from/mcp(session unknown or expired)
# Authentication
Two flows are supported. Both terminate at the same resource — a Bearer token bound to a single agent identity.
# OAuth 2.0 (Authorization Code + PKCE)
For interactive clients. Standard Authorization Code flow with PKCE (RFC 6749 + 7636); Dynamic Client Registration per RFC 7591.
| Endpoint | Purpose |
|---|---|
| GET /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414) |
| GET /.well-known/oauth-protected-resource | Protected-resource metadata |
| POST /register | Dynamic Client Registration (RFC 7591) |
| GET /authorize | response_type=code, code_challenge_method=S256 |
| POST /token | grant_type=authorization_code or refresh_token |
| POST /oauth/revoke | Token revocation (RFC 7009) |
Supported scopes: mcp. Token endpoint auth method: none.
Unauthenticated requests to /mcp return 401 Unauthorized with a WWW-Authenticate header that points compliant clients at the protected-resource metadata:
WWW-Authenticate: Bearer resource_metadata="https://mcp.agentis.capital/.well-known/oauth-protected-resource"
Token response
POST /token returns the standard OAuth 2.0 token response:
{
"access_token": "agts_oat_live_…",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "agts_ort_live_…",
"scope": "mcp"
}
Token lifetimes
| Token | Lifetime | Notes |
|---|---|---|
| access_token | 60 minutes | Rotated by exchanging the refresh token at /token. |
| refresh_token (idle) | 90 days | Sliding window; resets on each rotation. |
| refresh_token (absolute) | 180 days | Hard ceiling regardless of activity. Matches PSD2 SCA renewal cadence; the user re-authorizes at most every 180 days. |
Token-endpoint errors follow RFC 6749 §5.2. Only authorization_code and refresh_token grants are accepted.
# Bearer API key
For non-interactive clients. Issue an agent API key from the dashboard and pass it as a Bearer token on every request.
Authorization: Bearer $AGENTIS_API_KEY
Key prefixes
API keys and OAuth tokens carry structured prefixes:
| Prefix | Kind | Notes |
|---|---|---|
| agts_agent_live_… | Agent key | Production |
| agts_agent_test_… | Agent key | Development |
| agts_oat_live_… | OAuth access token | Issued by /token; 60-minute lifetime |
| agts_ort_live_… | OAuth refresh token | Issued by /token |
Agent keys do not expire automatically. Revoke or rotate from the dashboard — a revoked key returns 401 on the next call.
# Tools
# Conventions
Tool inputs and outputs are described by JSON schemas returned by tools/list. The reference below covers what each tool is for and when to call it; for the exact request and response shape your agent will see, call tools/list against the live server.
- Tools return an MCP
CallToolResult. On success the typed payload is instructuredContent(and serialized as JSON text incontent[0].text); on failureisError: trueandcontent[0].textcarries the error string — see Errors. - All monetary amounts are major currency units as decimal strings (
"45.50"= EUR 45.50). Currency is a separate ISO 4217 code. - Dates are
YYYY-MM-DD; timestamps are RFC 3339. - IDs are prefixed ULIDs:
agent_…,org_…,pol_…,bnk_…,pay_…,aud_…. - All current tools are idempotent, but every call is a real bank read; banks may rate-limit. The
rate_limitedstructured error (see Errors) is the canonical signal — agents should route on it rather than assume a fixed quota. accountalways defaults to the agent's default bank connection when omitted.- Fields may be omitted from a response when the agent's
data_accesspolicy masks them (e.g.iban,account_holder_name).
# Self-knowledge
Returns the authenticated agent's identity. Use to confirm which agent the session is bound to before acting, or to surface the agent's name to the user.
Returns the full policy governing this agent: spending limits, beneficiary rules, time windows, escalation thresholds, and data-access settings. Use to check what the agent is allowed to do, or to explain to the user why an operation may be restricted. Policies are authored in the dashboard.
# Accounts
Lists bank accounts assigned to this agent. Use first to discover the available accounts and pick the right bnk_… ID for downstream tools.
Returns available and current balance. Use when the user asks how much money is in an account, or to check spending power before committing to a purchase. available reflects pending transactions, holds, and overdraft; current is the settled ledger balance.
| account | Bank connection ID. string · optional |
Returns transactions for a bank account, filtered by date range and the agent's data-access policy. Use to answer “where did the money go?”, reconcile a specific charge, or summarize spend over a window. Bank consent windows expire periodically under PSD2 SCA rules — fetching older history may require the user to re-authorize the bank connection in the dashboard (a fresh SCA).
Parameters| from | Start date YYYY-MM-DD.string · optional |
| to | End date YYYY-MM-DD.string · optional |
| account | Bank connection ID. string · optional |
Returns direct-debit mandates as exposed by the bank. Use to surface recurring outgoings the user may have forgotten, or to verify whether a vendor's mandate is still active. Coverage varies; banks that don't expose mandates return a data_not_retrievable structured error (see Errors).
| account | Bank connection ID. string · optional |
Returns standing orders as exposed by the bank. Use to surface scheduled outbound transfers (rent, payroll, subscriptions) for cash-flow planning. Same coverage limitation as direct debits.
Parameters| account | Bank connection ID. string · optional |
# Cards
Lists all credit and debit cards linked to a bank connection. Use to discover available cards and pick a card_id for card-scoped tools.
| account | Bank connection ID. string · optional |
Returns balance, credit limit, and payment information for a card. Use when the user asks how much they can still charge to a card, or when the bill is due.
Parameters| card_id | Card account ID from list_cards.account_id.string required |
| account | Bank connection ID. string · optional |
Returns transactions for a specific card. Use to reconcile a card charge, audit card spend, or break down what was bought on a card over a window.
Parameters| card_id | Card account ID. string required |
| from | Start date YYYY-MM-DD.string · optional |
| to | End date YYYY-MM-DD.string · optional |
| account | Bank connection ID. string · optional |
# Payments
Payment tools will ship soon with Agent Accounts.
# Errors
A tool failure returns an MCP CallToolResult with isError: true. The text in content[0].text takes one of two shapes:
- Short form —
Error [code]: message. Used for simple, deterministic failures (e.g.invalid_request,forbidden). - Structured error object — JSON with the fields below. Used when the failure has a recommended remediation (rate-limit waits, expired consent, transient bank errors).
# Structured error object
| Field | Description |
|---|---|
| reason | Closed enum (see below). string |
| action | Recommended next action; closed enum (see below). string |
| retry_after_seconds | Wait before retrying. Omitted when no retry is recommended. integer · optional |
| hint | Plain-language explanation, suitable for surfacing to a human. string |
| correlation_id | Reserved for support workflows; empty today. string · optional |
The structured error rides inside the standard MCP CallToolResult. A full tools/call response carrying a rate-limit error looks like:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{ "type": "text",
"text": "{\"reason\":\"rate_limited\",\"action\":\"wait_then_retry\",\"retry_after_seconds\":21600,\"hint\":\"The bank's rate limit on this account has been reached. Suggested wait: ~6 hours before retrying.\"}" }
],
"isError": true
}
}
#
reason and action
Current values listed below. Additions are backwards-compatible; renames or removals trigger a version bump. Route on action to decide the retry strategy; reason tells you why.
| Reason | Typical action | Meaning |
|---|---|---|
| rate_limited | wait_then_retry | Per-org or upstream-bank rate limit exceeded. Wait retry_after_seconds before retrying. |
| transient_bank_error | retry_with_backoff | Bank had a transient error or timed out. Retry with exponential backoff starting at retry_after_seconds. |
| account_unavailable | wait_then_retry | The specific account is temporarily unavailable; retry later. |
| internal_error | retry_with_backoff | Unhandled error on the agentis side. Safe to retry. |
| invalid_request | correct_and_retry | Malformed parameters. Fix the input and retry — the same input will fail again. |
| consent_revoked | escalate | The bank consent has been revoked. Surface to the admin; re-authorization required. |
| session_expired | escalate | The bank session has expired (PSD2 SCA renewal cadence). Admin re-authorization required. |
| psu_action_required | escalate | The bank requires user action (re-consent, new terms, …) before further reads succeed. |
| policy_denied | escalate | The agent's policy disallowed the operation (e.g. masked field, account not assigned). |
| data_not_retrievable | give_up | The bank doesn't expose the requested resource (e.g. mandates). Permanent for this resource. |
# HTTP status codes
Tool-level failures arrive inside CallToolResult with isError: true and a 200 transport status. The transport statuses below have MCP-specific behavior worth handling explicitly — other codes follow RFC 9110.
| Status | Meaning |
|---|---|
| 401 | Missing, invalid, revoked, or expired Bearer token. WWW-Authenticate header points compliant clients at the protected-resource metadata. |
| 404 | Session ID unknown or expired. Re-initialize and retry. |
| 429 | Rate limit exceeded. Retry-After header carries the wait in seconds; body carries a rate_limited structured error. |
reason + action as the routing keys for retries and escalations. hint is human-facing and may change wording without notice.