MCP for Agents

Connect Cursor, Claude, VS Code, or Claude Desktop to the PetroBench MCP server

PetroBench MCP

Hosted Model Context Protocol server over streamable HTTP - connect your IDE agent to live PetroBench data without writing glue code.

What it is

A hosted MCP endpoint at app.petrobench.com/mcp. Same auth and abilities as the REST API - packaged as tools your agent can call.

What it does

Exposes scope-gated tools so agents can read wells, simulations, equipment, and account data inside Cursor, Claude, and VS Code.

  • IDE agents

    Cursor, Claude, VS Code, and Claude Desktop

  • Scope-gated tools

    Token abilities control which tools appear

  • OAuth or Bearer

    PATs, service tokens, or OAuth 2.1 clients

MCP endpoint
https://app.petrobench.com/mcp

Install in your client

Pick your agent runtime, paste the config, and replace the token with a PAT or service token that has the abilities you need. Export PB_TOKEN in your shell when a snippet references it.

Config file
.cursor/mcp.json
Endpoint

Also works in ~/.cursor/mcp.json. Settings → Tools & MCP → New MCP Server. Use ${env:PB_TOKEN} so secrets stay out of git.

 {
  "mcpServers": {
    "petrobench": {
      "url": "https://app.petrobench.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:PB_TOKEN}"
      }
    }
  }
}

Service tokens (pb_svc_…) are better for shared agents: they are owned by a division and survive staff offboarding. See Authentication.

What the agent can do today

The public MCP surface is read-only. Tool visibility is gated by token abilities - a token without simulations:read never sees simulation tools.

Ability
Unlocks
  • wells:read
    Well and field-data tools
  • simulations:read
    Simulation and compute-result tools
  • equipment:read
    Equipment catalog tools
  • organization:read
    Account / usage tools

Full tool lists: Wells & field data, Simulations, Equipment, Account.

OAuth clients

Third-party MCP clients (Claude Connectors, Cursor OAuth, VS Code oauth) can use OAuth 2.1 instead of a static Bearer token. Device-code and consent flows are documented under Authentication → OAuth.

Next

On this page