OpenFinance MCP Server
The easiest way to let your AI agent trade.
Research, trade and move money across every major market through one remote MCP connection. No install, no keys to juggle.
The OpenFinance MCP server supercharges AI agents with trading skills. Connect Claude, ChatGPT, Cursor, Codex or any MCP client and your agent can:
- Trade crypto spot and perpetuals on Hyperliquid, with limit, market and TWAP orders, leverage and margin control.
- Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps (for example
xyz:NVDA). - Trade prediction markets on Polymarket: sports, politics, crypto and world events, plus trader leaderboards.
- Swap and bridge anything onchain across 40+ EVM chains and Solana, with Relay and Jupiter routing.
- Find and trade memecoins with token search across 200+ chains, live prices and liquidity.
- Launch tokens on Robinhood Chain and Solana, including tokens paired against tokenized stocks.
- Fund the account with fiat, through card, bank transfer or UPI.
There is nothing to install or host. The server runs at one HTTPS endpoint, and your agent connects to it like any other remote MCP server.
https://api.openfinance.tech/agent/mcp
Important
This server can place real orders and move real funds. Every write action is designed to ask you first, and you should keep your client's tool-approval prompts switched on. Read Safety and security before you trade.
Contents
- Quick start
- What your agent can do
- Supported chains
- Authentication
- Install in your AI client
- Use it from your own code
- Tool reference
- Example prompts
- Safety and security
- Pair it with OpenFinance Skills
- Verify the connection
- Troubleshooting
- FAQ
- Links
Quick start
Easy trading for your agent in under a minute.
1. Create your account. Sign in at openfinance.tech. Your trading wallets (one EVM address for every EVM chain, plus a Solana address) are created for you.
2. Add the server to your AI client. In Claude Code, for example:
claude mcp add --transport http openfinance-tech https://api.openfinance.tech/agent/mcp
3. Sign in and approve. The first time your agent uses the server, your client opens an OpenFinance sign-in page. Approve the connection on the consent screen and you're done.
Then ask your agent something like:
"What's BTC's funding rate on Hyperliquid right now, and how has it moved over the last day?"
Using a different client? See Install in your AI client.
What your agent can do
| Market | Venue | What the agent can do | Tool |
|---|---|---|---|
| Crypto perpetuals | Hyperliquid | Prices, order books, candles, funding; market, limit and TWAP orders; leverage and isolated margin | hyperliquid |
| Crypto spot | Hyperliquid, onchain DEXs | Spot orders on Hyperliquid; swaps on any EVM chain or Solana | hyperliquid, relay_*, onchain_jupiter_* |
| Stocks, indices, commodities, FX, pre-IPO | Hyperliquid HIP-3 | Discover markets by category, then trade them like any perp | hyperliquid |
| Prediction markets | Polymarket | Events, odds, order books, positions, PnL, leaderboards; place and cancel orders; redeem winnings | polymarket |
| Hyperliquid outcomes | Hyperliquid HIP-4 | Read outcome markets; split and merge outcome positions | hyperliquid |
| Memecoins and long-tail tokens | 200+ chains | Search by name or address, live price, volume, liquidity, market cap; then swap | onchain_search_tokens, onchain_* |
| Bridging | Relay | Quote and execute cross-chain transfers and swaps, including EVM ↔ Solana | relay_get_quote, relay_execute, relay_get_status |
| Wallet | Your OpenFinance wallets | Addresses, holdings per chain with USD values, token metadata, transfers | get_wallet_addresses, onchain_* |
| Token launches | Robinhood Chain, Solana | Launch on a bonding curve, trade pre-graduation, graduate, claim creator fees | openfinance-launchpad*, openfinance-pons-launch |
| Fiat on-ramp | Card, bank, UPI | Get a checkout link to buy crypto straight into your wallet | get_onramp_url |
Supported chains
| Chain | Read | Trade, swap, send | Notes |
|---|---|---|---|
| Hyperliquid L1 | ✅ | ✅ | Perps, spot, HIP-3 and HIP-4 markets; funded with USDC from Arbitrum |
| Ethereum | ✅ | ✅ | |
| Base | ✅ | ✅ | |
| Arbitrum | ✅ | ✅ | Hyperliquid deposits and withdrawals settle here |
| Polygon | ✅ | ✅ | Polymarket settles here |
| Optimism, BNB Chain, Avalanche, Linea, Blast, Scroll, zkSync, Zora | ✅ | ✅ | Transfers and Relay swaps |
| Robinhood Chain (4663) | ✅ | ✅ | OpenFinance token launches and tokenized-stock pairs |
| Solana | ✅ | ✅ | Jupiter swaps, SPL transfers, Solana launchpad |
| 40+ EVM chains via Relay | ✅ | ✅ | Bridge and swap |
| 200+ chains | ✅ | Token search and prices |
Authentication
Every call to the server is authenticated. You can sign in two ways; both act on your own OpenFinance account.
| OAuth sign-in (recommended) | API key | |
|---|---|---|
| How | Add the URL only. Your client opens an OpenFinance sign-in and consent page. | Send your key in an x-api-key header. |
| Best for | Claude, ChatGPT, Cursor, VS Code, Claude Code, Gemini CLI | Scripts, bots, servers, and clients without OAuth support |
| Secret stored in your client | A token your client manages | Your API key |
| Revoking | Revoke the authorization from your OpenFinance account | Replace the key in OpenFinance; the old one stops working immediately |
OAuth sign-in. The server follows the MCP authorization spec, so supporting clients discover it automatically. When you connect, you sign in to OpenFinance and see which account is being connected; you have to confirm twice before anything is authorized.
API key. Sign in at openfinance.tech, open External AI in the sidebar, and copy the API key shown under Connect OpenFinance to your AI. Keys start with open_.
Warning
Treat your API key like a password. It carries the same permissions as your account, including placing trades and sending funds from your wallets. Keep it in an environment variable or your client's secret prompt, never in a file you commit, and never paste it into a shared chat. If it leaks, replace it straight away.
The examples below read the key from an environment variable:
export OPENFINANCE_API_KEY="open_..." # add to your shell profile, not to a repo
Install in your AI client
Use the server name openfinance-tech and the URL https://api.openfinance.tech/agent/mcp everywhere. Each section shows the OAuth setup first, then the API-key alternative.
Claude Code
OAuth (recommended)
claude mcp add --transport http openfinance-tech https://api.openfinance.tech/agent/mcp
Start Claude Code, run /mcp, choose openfinance-tech and select Authenticate. Add --scope user to make it available in every project.
API key
claude mcp add --transport http openfinance-tech https://api.openfinance.tech/agent/mcp \
--header "x-api-key: $OPENFINANCE_API_KEY"
Shared project config (.mcp.json): Claude Code expands environment variables, so the key never lands in the file:
{
"mcpServers": {
"openfinance-tech": {
"type": "http",
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "${OPENFINANCE_API_KEY}" }
}
}
}
Claude.ai and Claude Desktop
- Open Settings → Connectors and click Add custom connector.
- Name:
OpenFinance. URL:https://api.openfinance.tech/agent/mcp. - Click Add, then Connect, and approve the connection on OpenFinance.
- In a chat, open the tools menu and switch OpenFinance on.
Connectors you add on Claude.ai also appear in Claude Desktop. Custom connectors are available on Claude's paid plans; on Team and Enterprise an owner may need to add them first.
API key alternative (Claude Desktop only). Bridge the server through mcp-remote in claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and reopen Claude:
{
"mcpServers": {
"openfinance-tech": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://api.openfinance.tech/agent/mcp",
"--header", "x-api-key:${OPENFINANCE_API_KEY}"
],
"env": { "OPENFINANCE_API_KEY": "open_..." }
}
}
}
ChatGPT
- Open Settings → Apps & Connectors. If you don't see a Create button, turn on Developer mode under Advanced settings.
- Click Create. Name:
OpenFinance. MCP server URL:https://api.openfinance.tech/agent/mcp. Authentication: OAuth. - Save, sign in to OpenFinance and approve the connection.
- In a new chat, pick OpenFinance from the tools or connectors menu.
Custom connectors need a ChatGPT plan that supports them (Plus, Pro, Business, Enterprise or Edu); workspace admins may need to allow them.
Cursor
Click Add to Cursor, or add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"openfinance-tech": {
"url": "https://api.openfinance.tech/agent/mcp"
}
}
}
Cursor shows Needs login next to the server. Click it to sign in to OpenFinance.
API key
{
"mcpServers": {
"openfinance-tech": {
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "${env:OPENFINANCE_API_KEY}" }
}
}
}
VS Code (GitHub Copilot agent mode)
Click Install in VS Code, or run MCP: Add Server from the Command Palette and paste the URL. VS Code signs you in with OAuth.
API key, with VS Code prompting for the key once and storing it securely (.vscode/mcp.json or your user mcp.json):
{
"inputs": [
{
"type": "promptString",
"id": "openfinance-api-key",
"description": "OpenFinance API key",
"password": true
}
],
"servers": {
"openfinance-tech": {
"type": "http",
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "${input:openfinance-api-key}" }
}
}
}
VS Code uses servers, not mcpServers. Open Copilot Chat, switch to Agent mode, and the OpenFinance tools appear in the tools picker.
Codex (CLI and IDE extension)
codex mcp add openfinance-tech --url https://api.openfinance.tech/agent/mcp
If Codex asks you to sign in, run codex mcp login openfinance-tech.
API key in ~/.codex/config.toml, read from your environment:
[mcp_servers.openfinance-tech]
url = "https://api.openfinance.tech/agent/mcp"
env_http_headers = { "x-api-key" = "OPENFINANCE_API_KEY" }
The CLI and the IDE extension share this config. Run /mcp in Codex to check the server is connected.
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"openfinance-tech": {
"httpUrl": "https://api.openfinance.tech/agent/mcp"
}
}
}
Then run /mcp auth openfinance-tech to sign in. For an API key instead, add "headers": { "x-api-key": "$OPENFINANCE_API_KEY" }.
Windsurf
Open Cascade, click the hammer icon, then Configure, and add:
{
"mcpServers": {
"openfinance-tech": {
"serverUrl": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "${env:OPENFINANCE_API_KEY}" }
}
}
}
Windsurf uses serverUrl rather than url. Refresh the server list after saving.
Cline
In the Cline panel, open MCP Servers → Configure MCP Servers and add:
{
"mcpServers": {
"openfinance-tech": {
"type": "streamableHttp",
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "open_..." }
}
}
}
Cline uses streamableHttp as the transport type. This file is stored on your machine; don't commit it.
Manus
Settings → Connectors → + Add Connectors → Custom MCP → + Add Custom MCP → Direct Configuration:
- Name:
OpenFinance - Transport:
Streamable HTTP - Server URL:
https://api.openfinance.tech/agent/mcp - Header:
x-api-key: open_...
Hermes Agent
hermes mcp add openfinance-tech --url https://api.openfinance.tech/agent/mcp
Or in ~/.hermes/config.yaml:
mcp_servers:
openfinance-tech:
url: "https://api.openfinance.tech/agent/mcp"
headers:
x-api-key: "open_..."
Run /reload-mcp, or restart the agent.
OpenClaw
In ~/.openclaw/openclaw.json (note the nested mcp.servers key):
{
"mcp": {
"servers": {
"openfinance-tech": {
"url": "https://api.openfinance.tech/agent/mcp",
"headers": { "x-api-key": "open_..." }
}
}
}
}
Any other MCP client
| Setting | Value |
|---|---|
| Transport | Streamable HTTP |
| URL | https://api.openfinance.tech/agent/mcp |
| Auth | OAuth 2.1 with dynamic client registration (discovered from the server's WWW-Authenticate header), or header x-api-key: open_... |
If your client only supports local (stdio) servers, bridge it with npx -y mcp-remote https://api.openfinance.tech/agent/mcp.
Use it from your own code
Building your own agent? Connect with the official MCP SDKs.
TypeScript
npm install @modelcontextprotocol/sdk
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://api.openfinance.tech/agent/mcp"),
{ requestInit: { headers: { "x-api-key": process.env.OPENFINANCE_API_KEY! } } },
);
const client = new Client({ name: "my-trading-agent", version: "1.0.0" });
await client.connect(transport);
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));
// Read-only: mid prices for every Hyperliquid market
const mids = await client.callTool({
name: "hyperliquid",
arguments: { action: "get_all_mids" },
});
console.log(mids.content);
Python
pip install mcp
import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
URL = "https://api.openfinance.tech/agent/mcp"
async def main():
headers = {"x-api-key": os.environ["OPENFINANCE_API_KEY"]}
async with streamablehttp_client(URL, headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print([t.name for t in tools.tools])
# Read-only: mid prices for every Hyperliquid market
mids = await session.call_tool("hyperliquid", {"action": "get_all_mids"})
print(mids.content)
asyncio.run(main())
Tip
Each tool's description tells the model exactly how to use it: which action to pick, what to check before an order, and when to ask the user. Pass the descriptions to your model unchanged for the best results.
Tool reference
18 tools. The larger venues (hyperliquid, polymarket and the launchpads) group many operations behind one tool with an action parameter. Actions marked ✍️ change state: they place orders, move funds or sign transactions.
Trading venues
hyperliquid: perps, spot, HIP-3 markets (stocks, FX, commodities, indices, pre-IPO), HIP-4 outcomes · 34 actions
| Group | Actions |
|---|---|
| Market data | get_all_mids, get_market_metas, get_perp_categories, get_l2_book, get_token_details, get_candle_snapshot, get_all_dexs_asset_ctxs, set_all_dexs_asset_ctxs_subscription, get_ws_status, get_outcome_meta |
| Account | get_deposit_address, get_account_summary, get_batch_portfolio_states, get_rate_limit, get_user_fills, get_user_funding_history, get_user_abstraction |
| Orders | ✍️ place_order, ✍️ cancel_order, ✍️ modify_order, get_open_orders, get_historical_orders, get_order_status |
| TWAP | ✍️ place_twap_order, ✍️ terminate_twap_order, get_twap_fills |
| Risk | ✍️ update_leverage, ✍️ update_isolated_margin |