Get started
Early accessBuild with AI
The Terra MCP server lets your AI assistant read these docs, fetch code samples and look up API operations while it writes your integration. The Docs tier needs no sign-in and is read-only.
Add it to your assistant#
Claude Code#
Shell
claude mcp add --transport http terra https://mcp.terrawallet.us/mcpCursor#
Open this link to install it in Cursor:
Text
cursor://anysphere.cursor-deeplink/mcp/install?name=terra&config=eyJ1cmwiOiJodHRwczovL21jcC50ZXJyYXdhbGxldC51cy9tY3AifQ==The config value is the base64 of {"url":"https://mcp.terrawallet.us/mcp"}. Or add it to .cursor/mcp.json yourself:
JSON
{ "mcpServers": { "terra": { "url": "https://mcp.terrawallet.us/mcp" } }}VS Code#
Open this link to install it in VS Code (for VS Code Insiders, start the link with vscode-insiders: instead):
Text
vscode:mcp/install?%B%name%22%A%terra%22%C%type%22%A%http%22%C%url%22%A%https%A%F%Fmcp.terrawallet.us%Fmcp%22%DIt is encodeURIComponent of {"name":"terra","type":"http","url":"https://mcp.terrawallet.us/mcp"}. VS Code shows the configuration for you to review before it installs anything. Or add it to .vscode/mcp.json:
JSON
{ "servers": { "terra": { "type": "http", "url": "https://mcp.terrawallet.us/mcp" } }}Windsurf#
Add this to Windsurf's mcp_config.json (Windsurf uses serverUrl for remote servers):
JSON
{ "mcpServers": { "terra": { "serverUrl": "https://mcp.terrawallet.us/mcp" } }}Any other MCP client#
Most clients that support remote servers over Streamable HTTP accept this shape:
JSON
{ "mcpServers": { "terra": { "type": "http", "url": "https://mcp.terrawallet.us/mcp" } }}Local install (later)#
A local helper that detects your AI clients and writes their config after you confirm is planned. It is not published:
Shell
# npx @terrawallet/mcp init (not published yet; name may change)What the Docs tier can do#
Every tool is read-only (readOnlyHint: true), reaches no outside system (openWorldHint: false) and needs no sign-in. The docs are bundled into the server, so nothing is fetched at request time.
| Tool | What it does |
|---|---|
search_docs | Searches these docs and returns the best matching sections with their page slugs |
get_doc_page | Returns one docs page as Markdown, by slug |
get_code_sample | Returns a code sample for a framework (nextjs, react, html, react-native, node, python, php) and a product (connect, pay, subscriptions, webhooks) |
get_api_operation | Looks up a /v1 operation by method and path (for example POST /v1/payment_intents), by operation id, or lists a resource's operations |
list_supported_networks | Lists networks and their verified USDT and USDC contracts, filtered by family or asset |
get_sdk_info | Describes each planned SDK package and its status. None is published yet |
Resources. Every page is also a resource at terra://docs/{slug}, for example terra://docs/pay-payment-intents.
Prompts. Four ready-made prompts:
- "Add Terra Pay checkout to my app"
- "Set up crypto subscriptions"
- "Connect Terra Wallet to my dApp"
- "Debug a failed webhook"
Protocol details#
- Transport: MCP Streamable HTTP at
/mcp,POSTonly. The server is stateless: it issues no session ids, andGETandDELETEon/mcpreturn 405. - Protocol revision:
2025-11-25(theinitializehandshake), with earlier revisions supported by the official SDK for older clients. - Responses are JSON, size-capped, and requests are rate limited per client IP. A
429means wait and retry.
What no AI can ever do with Terra#
Not through the MCP server and not through any other AI path:
- move or sign funds (refunds are drafts that a person signs in their own wallet);
- change payout wallets;
- create or reveal live secret keys or webhook secrets;
- change team roles or two-factor settings;
- delete an organization.
These limits are built into what the tools can reach, not left to the model's judgement.
Prompt-injection defence#
- Tool definitions are static and reviewed. Nothing a user types can change the list of tools or their descriptions.
- The Docs tier returns only Terra's own documentation. Later tiers return merchant and customer text (names, memos, webhook payloads) only in clearly labelled, length-capped data fields marked as untrusted.
- Treat text that arrives from customers, webhooks or chain data as data, never as instructions, in your own AI features too.
The Account tier (later)#
A second tier will connect to your own account through OAuth 2.1 with PKCE and a consent screen on dashboard.terrawallet.us:
- read: projects, payments with their verified on-chain status, payment links, invoices, plans, subscriptions, webhook deliveries, events, the audit log;
- sandbox writes: test payment links, invoices and plans, a simulated payment, a test webhook;
- live writes, only if you enable them per connection with an authenticator code: a payment link or invoice (paid only to your verified payout wallet), cancelling a subscription, a refund draft.
Every write asks a person to confirm. Tokens are sandbox-only by default, short-lived and revocable, and an org-wide switch turns all AI access off.
AI-readable docs#
These pages are plain Markdown with front matter, so any assistant can read them. On the landing site, llms.txt, llms-full.txt and a Markdown twin of every page are available for the same reason.