Glasser

MCP Server

The catalog as a remote Model Context Protocol server — search, inspect and run paid endpoints from any MCP client that can send an Authorization header.

Endpoint

POST https://api.glasser.ai/mcp

Stateless Streamable HTTP with JSON responses. Authentication is the same Bearer Key as the HTTP API — mint one in the console, export it as GLASSER_API_KEY, and reference the variable in your client config instead of pasting the Key. There is no OAuth yet, so clients that only accept a URL (claude.ai web custom connectors, ChatGPT) cannot connect in this phase.

Setup

Claude Code:

bash
claude mcp add-json glasser \
  '{"type":"http","url":"https://api.glasser.ai/mcp","headers":{"Authorization":"Bearer ${GLASSER_API_KEY}"}}'

Cursor:

json
// .cursor/mcp.json
{
  "mcpServers": {
    "glasser": {
      "url": "https://api.glasser.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:GLASSER_API_KEY}" }
    }
  }
}

Codex:

toml
# ~/.codex/config.toml
[mcp_servers.glasser]
url = "https://api.glasser.ai/mcp"
bearer_token_env_var = "GLASSER_API_KEY"

Tools

Seven static tools — the same operations as the CLI and the HTTP API. The catalog itself stays behind search: endpoints are data the agent discovers at run time, never one tool each.

inspectOne endpoint's input schema, exact Price with every charge clause, current version, run mode
runExecute an endpoint and charge per call; requires an idempotency_key you generate
runs_getOne Run by id: status, output, provider_response, charge
runs_listThe Workspace's Runs, newest first, cursor-paginated
runs_stopStop an in-flight Run; before dispatch it becomes STOPPED and free
balanceBalance, held and available; doubles as the auth probe

Rules that keep spending safe

  • run requires an idempotency_key you generate. Retry with the SAME key and the original Run comes back instead of a second charge — the result carries replayed: true.
  • Every Run reports charge_usd as an exact decimal string. Status and charge are independent: a provider 404 is a COMPLETED Run, charged per the endpoint's published clauses from inspect.
  • Refusals the agent can act on — insufficient_balance, rate_limited, policy refusals — come back as tool results with isError, never as protocol errors that abort the loop.

When to prefer the CLI

If your agent has a shell, the CLI plus the Skill at https://glasser.ai/SKILL.md is the recommended path — commands compose with the rest of the shell, and the Skill carries the full working agreement. Use MCP when the runtime cannot shell out.