MCP para agentes
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
https://app.petrobench.com/mcpInstalar en tu cliente
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.
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.
Qué puede hacer el agente hoy
The public MCP surface is read-only. Tool visibility is gated by token abilities - a token without simulations:read never sees simulation tools.
- wells:readWell and field-data tools
- simulations:readSimulation and compute-result tools
- equipment:readEquipment catalog tools
- organization:readAccount / usage tools
Full tool lists: Wells & field data, Simulations, Equipment, Account.
Clientes OAuth
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.