Model Context Protocol

Connect Openfield to your AI tools.

One endpoint. OAuth 2.1 with PKCE — no Supabase token copying. 3 tools — two read-only tools plus a token-gated generation tool — openfield_models and openfield_pricing — so Claude, Cursor, and friends can list 44 Higgsfield models, inspect token rates, and generate through Openfield without ever seeing your payment keys. Generation checks the wallet first, atomically deducts the quoted cost, then starts the provider request; failed submits are refunded.

NEW · OAUTH 2.0

One-click connect — no token copy needed

Add MCP server URL, click Authenticate, browser opens to Openfield, sign in, Allow, and you're connected. Your client stores the OAuth credentials securely.

1Add URL
2Authenticate
3Allow → Connected
ENDPOINTOAuth 2.0

MCP Server URL

https://openfieldai.vercel.app/api/mcp

Paste this URL in your AI tool's Add MCP Server. Tool will auto-discover OAuth via /.well-known/oauth-protected-resource. No token needed for OAuth.

OAuth 2.0PKCE S256JSON-RPC 2.03 tools
AUTHENTICATIONOAuth only

OAuth — browser flow

No token copy. Your AI tool opens https://openfieldai.vercel.app/login, you sign in, click Allow, OAuth credentials are issued automatically and stored by the client. Works in Cursor, Claude Desktop, VS Code, Windsurf, etc.

Tool→401 + resource_metadata→Browser → Openfield → Allow→OAuth → Connected
STEP 1

Choose your AI tool

Pick your client — Openfield MCP uses OAuth for sign-in and connection.

◐ Cursor

Best for coding with Openfield

Config file
.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
OAuth steps
  1. 1

    In Cursor, open Settings → MCP → Add Server

  2. 2

    Paste MCP URL below, leave auth empty — Cursor will detect OAuth

  3. 3

    Click Authenticate — browser opens to Openfield login

  4. 4

    Sign in and click Allow access

  5. 5

    Cursor redirects back, shows green connected + 3 tools

OAuth config — URL only
{
  "mcpServers": {
    "openfield": {
      "url": "https://openfieldai.vercel.app/api/mcp"
    }
  }
}
OAuth tip: Just URL — no token copy. Your client will open the browser automatically when authentication is required.
TOOLS

3 tools

openfield_models

List 44 Higgsfield models — id, label, surface. Perfect for “which model for 9:16?”.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "openfield_models", "arguments": {} }
}
openfield_pricing

Token packs + per-model costs. Mirrors the homepage #pricing section.

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": { "name": "openfield_pricing", "arguments": {} }
}
openfield_generate

Generate with an Openfield model. Before the provider request starts, Openfield calculates the token cost, verifies your wallet, atomically deducts the cost, and only then submits to Higgsfield. A failed submit is automatically refunded.

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "openfield_generate",
    "arguments": {
      "model": "seedance-2.5",
      "prompt": "Cinematic city at night, rain reflections"
    }
  }
}
DEBUG

Verify & troubleshoot

  • OAuth not opening browser? Ensure client supports MCP OAuth (Cursor 0.45+, Claude Desktop latest, VS Code 1.99+). Check client logs for resource_metadata.
  • Tools not showing? Quit client from tray/dock, reopen. For OAuth, check /api/mcp/.well-known/oauth-protected-resource is reachable.
  • 401 after OAuth? Token expired (24h). Re-authenticate in client, or clear MCP cache and re-add server.
  • Test OAuth discovery:
    curl https://openfieldai.vercel.app/api/mcp/.well-known/oauth-protected-resource
    curl https://openfieldai.vercel.app/api/mcp/.well-known/oauth-authorization-server
  • Test MCP with OAuth token:
    curl -X POST https://openfieldai.vercel.app/api/mcp \
      -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
OAuth 2.0PKCE S256Per-user authToken-gated
QUICK START

OAuth in 3 clicks

1Add server URL

Paste https://openfieldai.vercel.app/api/mcp in your AI tool → Add MCP Server.

2Authenticate

Click Authenticate → browser opens → sign in to Openfield → Allow.

3Ask

Back in tool, ask: “What Openfield models can I use for 9:16 video?”

Works everywhere

From prompt to Seedance in one ask.

Ask your AI tool: “What Openfield models can I use for a 9:16 10s video?” — it calls openfield_models, then you can generate with openfield_generate. Openfield checks and spends the required tokens before the Higgsfield request begins.