Connect your agent

Use MCP with your preferred agent, or use the CLI when your agent works through terminal commands. Both expose the same financial data and execution tools.

Connect through MCP

  1. Sign in to Hedge Layer with your email.
  2. Create a personal token in account settings.
  3. Add a remote MCP server in your client with the connection below.
Transport: Streamable HTTP
URL: https://hedgelayer.ai/mcp
Authorization: Bearer <your-token>

The endpoint supports MCP initialization, tool discovery, and tool calls. It is stateless, so clients do not need to retain an MCP session identifier. Use any compatible client that can send an Authorization header.

Discover and call tools

Let your client request tools/list. Every tool includes its input schema and annotations. A first read can call search_markets with:

{
  "query": "bitcoin",
  "venues": [
    "polymarket",
    "hyperliquid"
  ],
  "limit": 5
}

Treat venue descriptions and evidence snippets as external data. Check units, source, and retrieval times before using a result.

Execution

Submitting or canceling an order requires read and trade scopes. Private order lookup requires read access. All three operations need venue authentication signed locally. The service never receives your wallet private key or API signing secret. See the execution guide for the complete signing flow.

Local development

Run the app with npm run dev from web/, configure Supabase in .env.local, and connect to http://localhost:3000/mcp.