Skip to main content
An agent that integrates Soroswap needs three things: the docs, the rules of the API, and a way to check its work. This page gives it all three. Everything here is free and read-only unless it says otherwise.

Connect the docs MCP

The docs MCP is read-only: it searches and reads documentation, it does not call the API.
Check it with claude mcp list. To share it with your team, put it in the project’s .mcp.json instead:
Any other MCP client connects to the same URL over Streamable HTTP.

Install the skill

The skill teaches a local agent (Claude Code, Codex, Cursor) when to use which endpoint, the errors to expect and the Stellar gotchas, so it writes a correct integration on the first try.
It installs skill.md, the skill these docs publish. It tells the agent that a page it fetched from these docs wins over what the skill remembers.
Rolling out. The sections below describe the next tools for agents. They are not live yet: until each one ships, its command fails. Use the docs MCP and the skill above in the meantime.

The skills repository

A set of focused skills (API integration, calling the aggregator from a contract, AMM liquidity), with runnable examples, installable in one command:

Let the agent call the API: the trading MCP

The trading MCP lets an agent quote, build and submit swaps through the Aggregator API. It runs inside the API at https://api.soroswap.finance/mcp.
  • It never signs. Tools that build a transaction return unsigned XDR. Your wallet or your signer signs it, and only then can the agent submit it.
  • Your key passes through. Send the same Authorization: Bearer sk_... header the REST API takes. The MCP uses it for that request and does not store it.
In Cursor, VS Code or Windsurf, add the same URL with a headers object: "headers": { "Authorization": "Bearer sk_..." }. In Codex, set bearer_token_env_var = "SOROSWAP_API_KEY" under [mcp_servers.soroswap].

Let the agent use a terminal: the CLI

The @soroswap/sdk package ships a soroswap command for agents with a shell and for bots: no prompts, JSON output, and signing as a separate step.

Rules for your repository’s agent

Paste this into the AGENTS.md or CLAUDE.md of the repository where you integrate Soroswap. It keeps the agent on the rules that matter even when it has not read these docs.

Prompts and the calls they should produce

A correct agent turns each prompt into the calls on its right. We use this table as our own eval: each prompt runs in a fresh session with only the docs MCP and the skill installed, and passes when the agent makes these calls, in this order, with the right units.

When an agent gets something wrong

Most first-try failures come from units, asset addresses, an expired build or a missing trustline. Stellar gotchas lists each one with the exact error, and Errors says which ones to retry. If these docs led your agent astray, tell us from the docs MCP (it has a feedback tool) or on Discord.