Clients and tools

MCP server

Let AI agents run models on your wallet.

The Astorie MCP server lets an AI agent browse models, check prices and run jobs on your wallet. It is hosted, so there is nothing to install for most clients.

URLhttps://astorie.ai/api/gateway/mcp
TransportStreamable HTTP (no SSE)
AuthAuthorization: Bearer ast_gw_... header. No OAuth.
Warning
The agent spends real money from your wallet. Give it a key with only the scopes it needs, and consider a separate key you can revoke on its own.

Create a key

In API keys, create a key with models:read, quotes:create, jobs:create, jobs:read, jobs:cancel and wallet:read.

Claude Code

  1. Add the server

    Run this in a shell where ASTORIE_API_KEY is set.

    Terminal
    claude mcp add --transport http astorie https://astorie.ai/api/gateway/mcp \
      --header "Authorization: Bearer $ASTORIE_API_KEY"
  2. Try it

    Run /mcp to check that astorie is connected, then ask:

    Prompt
    List the Astorie models, then quote one for a short prompt.

Cursor

Add the server to ~/.cursor/mcp.json, or to .cursor/mcp.json in one project. Keep the file out of version control.

mcp.json
{
  "mcpServers": {
    "astorie": {
      "url": "https://astorie.ai/api/gateway/mcp",
      "headers": {
        "Authorization": "Bearer ast_gw_..."
      }
    }
  }
}

Check that astorie is enabled under Settings › MCP, then ask the agent.

Claude Desktop

Claude Desktop can't send a custom header to a remote server, so this setup uses mcp-remote as a bridge. It runs with npx and needs Node.js. Open Settings › Developer › Edit Config and add:

claude_desktop_config.json
{
  "mcpServers": {
    "astorie": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://astorie.ai/api/gateway/mcp",
        "--header",
        "Authorization:${ASTORIE_AUTH}"
      ],
      "env": {
        "ASTORIE_AUTH": "Bearer ast_gw_..."
      }
    }
  }
}

Restart Claude Desktop, then ask the agent.

Other clients

Most MCP clients accept a config like this:

MCP config
{
  "mcpServers": {
    "astorie": {
      "type": "http",
      "url": "https://astorie.ai/api/gateway/mcp",
      "headers": {
        "Authorization": "Bearer ast_gw_..."
      }
    }
  }
}

ChatGPT and claude.ai connectors sign in with OAuth, which this server doesn't support yet, so they can't connect. Use the API from your own code instead, or the CLI from an agent that can run commands.

Tools

Each tool acts on the key's account with the same scopes, limits and idempotency rules as the API.

ToolWhat it doesScope
list_modelsList modelsmodels:read
quotePrice an input. Spends nothing.quotes:create
submit_jobStart a paid jobjobs:create
get_jobRead a jobjobs:read
wait_jobWait up to 25 seconds for a job to finishjobs:read
cancel_jobCancel a jobjobs:cancel
get_balanceRead the wallet balancewallet:read
get_ledgerList wallet transactionswallet:read

submit_job takes the fields of POST /v1/jobs other than pricing_mode, and max_charge_amount and idempotency_key are always required, even when the key has a per-request spend limit. Agents are told to quote first and use the quote's price as the ceiling. Jobs started by an agent count toward your account's limit of 2 running jobs like any other.