CSPR[dot]trade MCP
# CSPR.trade MCP
[](https://glama.ai/mcp/servers/make-software/cspr-trade-mcp)
AI agent integration for [CSPR.trade](https://cspr.trade), the leading DEX on the Casper Network.
[![CSPR[dot]trade MCP server](https://glama.ai/mcp/servers/make-software/cspr-trade-mcp/badges/card.svg)](https://glama.ai/mcp/servers/make-software/cspr-trade-mcp)
**🔗 Public endpoint:** [`https://mcp.cspr.trade/mcp`](https://mcp.cspr.trade/mcp) — connect any MCP client, no setup required.
The hosted endpoint runs with file-based deploy input **disabled**. `submit_transaction` accepts inline signed JSON only; it will not read deploy files from the server filesystem.
**📖 Documentation:** [mcp.cspr.trade](https://mcp.cspr.trade)
## Connect Your Agent
Add to Claude Desktop, Cursor, or any MCP client config:
```json
{
"mcpServers": {
"cspr-trade": {
"url": "https://mcp.cspr.trade/mcp"
}
}
}
```
That's it. Your agent now has access to **23 public tools** for market data, swaps, liquidity management, trade analysis, portfolio tracking, and account queries on the Casper Network.
## What's Available
### Public MCP surface: 23 tools
| Category | Tools | Wallet Required |
|----------|-------|----------------|
| **Market Data** | `get_tokens`, `get_pairs`, `get_pair_details`, `get_quote`, `get_currencies`, `get_pair_price_history`, `get_token_price_history` | No |
| **Trading** | `build_swap`, `build_approve_token`, `submit_transaction` | Yes |
| **Liquidity** | `build_add_liquidity`, `build_remove_liquidity` | Yes |
| **Trade Analysis** | `estimate_price_impact`, `estimate_slippage`, `analyze_trade`, `optimal_liquidity_amounts` | No |
| **Account** | `get_token_balance`, `get_liquidity_positions`, `get_impermanent_loss`, `get_swap_history`, `get_portfolio_value`, `get_position_status` | No |
### Read-only endpoint
`https://mcp.cspr.trade/mcp/read-only` serves the same server without the transaction tools (`build_*` and `submit_transaction`): market data, account lookups and trade analysis only, every tool annotated `readOnlyHint: true`. Use it where a client or directory must not build or broadcast transactions. Sessions are bound to the endpoint they were created on.
### Optional local signer: +1 tool
Run a second local MCP instance in `--signer` mode to add:
- `sign_deploy` — local-only deploy signing with keys loaded from your machine
That gives you **24 total tools across the full two-server setup**.
**Non-custodial by design.** The public MCP server never handles private keys. Transactions are built remotely and signed locally when you enable signer mode.
## OpenClaw Skill
Using [OpenClaw](https://openclaw.ai)? Install the agent skill from [ClawHub](https://clawhub.com):
```bash
npx clawhub@latest install cspr-trade-mcp
```
The skill teaches your agent the full workflow — intent classification, quote-before-swap patterns, price-impact warnings, local signing flows, price-history lookups, portfolio checks, and error recovery. Works with any OpenClaw-compatible agent.
## Self-Hosting
Want testnet access or a private instance? Install the npm packages:
```bash
npm install @make-software/cspr-trade-mcp
```
```json
{
"mcpServers": {
"cspr-trade": {
"command": "npx",
"args": ["@make-software/cspr-trade-mcp"],
"env": { "CSPR_TRADE_NETWORK": "testnet" }
}
}
}
```
See the [Self-Hosting guide](https://mcp.cspr.trade/docs/self-hosting) for HTTP server setup, local signer mode, production deployment, and the optional file-path workflow.
## Agentic.Market / x402 Discovery
HTTP deployments can expose Agentic.Market discovery metadata and optionally require x402 payments through Coinbase's CDP Facilitator.
| Env var | Default | Purpose |
|---------|---------|---------|
| `CSPR_TRADE_X402_ENABLED` | `false` | Enables x402 payment middleware for `/mcp` when set to `true` |
| `CSPR_TRADE_X402_PAYTO` | none | Base/EVM address receiving x402 settlements; required when x402 is enabled |
| `CSPR_TRADE_CDP_FACILITATOR_URL` | `https://api.cdp.coinbase.com/platform/v2/x402` | CDP Facilitator endpoint |
| `CDP_API_KEY_ID`, `CDP_API_KEY_SECRET` | none | CDP API key pair; required when payments use the CDP Facilitator |
| `CSPR_TRADE_PUBLIC_URL` | `https://mcp.cspr.trade` | Public base URL used in x402 `resource` metadata |
| pricing | built in | Premium MCP tools cost `$0.001`; discovery, balances, transaction builders, and `submit_transaction` stay free |
`GET /cdp-resource` returns Bazaar discovery metadata for the 23 public MCP tools. The optional local signer tool is intentionally excluded from the Agentic.Market manifest.
## Packages
| Package | Description |
|---------|-------------|
| [`@make-software/cspr-trade-mcp`](https://www.npmjs.com/package/@make-software/cspr-trade-mcp) | MCP server — 23 public tools over stdio or HTTP, plus optional `sign_deploy` in local signer mode |
| [`@make-software/cspr-trade-mcp-sdk`](https://www.npmjs.com/package/@make-software/cspr-trade-mcp-sdk) | TypeScript SDK — market data, price history, quotes, analysis, and transaction building |
## Development
```bash
npm install # Install dependencies
npm run build # Build all packages
npm test # Run tests
```
## License
MIT
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose with no overlap: transaction-building tools (build_*), data retrieval tools (get_*), and a submission tool (submit_transaction). The descriptions clearly differentiate between constructing transactions, fetching information, and submitting signed transactions.
Tool names follow a highly consistent verb_noun pattern throughout: all start with either 'build_' or 'get_' except 'submit_transaction', which still follows the same convention. This predictability makes it easy for agents to understand the action each tool performs.
With 13 tools, the count is well-scoped for a DeFi trading platform, covering core operations like swapping, liquidity management, data queries, and transaction submission. Each tool earns its place without redundancy or obvious omissions.
The toolset provides complete coverage for the DeFi trading domain: it supports full swap and liquidity workflows (quote, build, submit), comprehensive data access (tokens, pairs, history, positions), and utility functions (impermanent loss, currencies). No significant gaps are apparent for typical agent tasks.