Skip to content

Claude Code Integration

Claude Code can connect directly to Forge Pool through the native MCP server.

This allows Claude Code to operate as an execution client over probabilistic workloads while remaining fully integrated into the developer workflow.

Once connected, Claude Code can:

  • discover Forge capabilities
  • inspect execution contracts
  • execute deterministic workloads
  • retrieve compact results
  • analyze uncertainty surfaces
  • preserve replay metadata
  • assist Studio-oriented orchestration
  • integrate Forge execution into development workflows

Forge MCP transforms Claude Code from a coding assistant into an execution-aware engineering tool.


Why Claude Code

Claude Desktop is optimized for conversational workflows.

Claude Code is optimized for operational workflows.

Typical use cases include:

  • quantitative research
  • insurance analytics
  • capital modeling
  • climate analysis
  • scenario exploration
  • enterprise automation
  • infrastructure experimentation
  • internal agent systems

Claude Code is often the preferred environment for teams building repeatable workflows around Forge execution.


Requirements

Before connecting Claude Code, ensure you have:

  • a Forge Pool account
  • a project
  • a project-scoped token
  • Claude Code installed
  • MCP support enabled

Recommended token type:

txt
fpak_...

Project-scoped tokens provide:

  • deterministic project routing
  • isolated execution context
  • cleaner governance boundaries
  • safer billing controls
  • easier credential rotation

MCP Endpoint

Forge Pool MCP endpoint:

txt
https://api.forgepool.io/mcp

Authentication:

txt
Authorization: Bearer fpak_...

Register Forge MCP

Claude Code supports remote MCP servers.

Register Forge as an MCP server.

Example:

json
{
  "mcpServers": {
    "forge": {
      "url": "https://api.forgepool.io/mcp",
      "headers": {
        "Authorization": "Bearer fpak_..."
      }
    }
  }
}

Use your own project-scoped token.


Verify Connection

Ask Claude Code:

txt
Use Forge MCP.

List available Forge tools.

Expected Forge tools:

txt
forge_capabilities_list
forge_capabilities_search
forge_capability_describe

forge_execute
forge_run_status
forge_run_result

If these tools appear, Claude Code is successfully connected.


Claude Code works best when following the standard Forge execution lifecycle:

txt
search

describe

build

execute

retrieve

analyze

This keeps execution deterministic and validation-aware.


Capability Discovery

Example:

txt
Use Forge MCP.

Search for capital stress testing capabilities.
Return the most relevant Monte Carlo profiles.
Do not execute anything.

Expected MCP tool:

txt
forge_capabilities_search

Agents should discover before executing.


Capability Inspection

Example:

txt
Use Forge MCP.

Describe the most relevant capital stress capability.
Explain required arguments and provide a minimum valid payload.
Do not execute.

Expected MCP tool:

txt
forge_capability_describe

Agents should build payloads from contracts rather than assumptions.


Safe Execution

Example:

txt
Use Forge MCP.

Execute the capability in test mode.
Retrieve compact results.

Expected tools:

txt
forge_execute
forge_run_result

Recommended billing mode:

json
{
  "billing": {
    "mode": "test"
  }
}

Production execution should require explicit authorization.


Development Workflow Example

A common Claude Code workflow:

txt
User asks question

Claude searches Forge capabilities

Claude inspects contract

Claude builds payload

Claude executes in test mode

Claude retrieves compact results

Claude summarizes uncertainty and tail risk

This pattern works well for exploratory analysis.


Research Workflow Example

Example prompt:

txt
Use Forge MCP.

Search for insurance catastrophe loss capabilities.

Describe the most relevant direct execution capability.

Build a minimum valid payload.

Execute in test mode.

Retrieve compact results.

Explain expected loss, uncertainty spread, P95, P99, and replay metadata.

Studio-Oriented Workflows

Claude Code can assist with Studio orchestration.

Available capabilities may include:

  • template discovery
  • template inspection
  • graph analysis
  • graph import preparation
  • workboard assistance

Examples:

txt
Use Forge MCP.

List available Studio templates.
txt
Use Forge MCP.

Describe the capital review template.
txt
Use Forge MCP.

Prepare a summary of the execution graph before import.

Replay-Aware Development

Replayability is one of the most important properties of Forge execution.

Claude Code should preserve:

  • job_id
  • trace_id
  • request_id
  • replay tokens
  • execution identifiers

These identifiers enable:

  • reproducibility
  • governance review
  • debugging
  • deterministic verification
  • auditability

Distribution Interpretation

Forge returns uncertainty surfaces rather than single answers.

Claude Code should interpret:

  • mean
  • median
  • percentiles
  • tail behavior
  • volatility
  • uncertainty spread
  • threshold exceedance
  • scenario sensitivity

The average alone is not sufficient.

Tail outcomes frequently contain the most important information.


Security Recommendations

Use project-scoped tokens.

Recommended practices:

  • separate development tokens
  • separate production tokens
  • rotate credentials regularly
  • revoke exposed tokens immediately

Do not:

  • commit tokens
  • paste tokens into prompts
  • share production tokens between projects

Troubleshooting

Forge Tools Are Missing

Verify:

txt
https://api.forgepool.io/mcp

and:

txt
Authorization: Bearer fpak_...

Ensure Claude Code was restarted after configuration changes.


Authentication Errors

Confirm:

  • token is active
  • token is project-scoped
  • authorization header is valid
  • token has not expired

Claude Builds Invalid Payloads

Ask Claude:

txt
Use forge_capability_describe before building payloads.
Do not guess profile-specific arguments.

Capability contracts remain authoritative.


Execution Validation Errors

Validation errors are expected when a payload is incomplete.

Claude should:

  1. inspect the error
  2. revisit the contract
  3. update the payload
  4. retry safely

Validation feedback is part of the execution workflow.


Best Practices

Claude Code should:

  • discover before executing
  • inspect contracts before payload construction
  • execute in test mode first
  • preserve replay metadata
  • explain uncertainty explicitly
  • surface validation feedback

Claude Code should not:

  • invent capability identifiers
  • guess arguments
  • skip contract inspection
  • suppress replay metadata
  • execute production workloads without approval

Enterprise Usage

Many organizations use Claude Code as an operational interface to Forge.

Common patterns include:

  • insurance portfolio analysis
  • capital stress testing
  • climate scenario exploration
  • graph propagation analysis
  • uncertainty exploration
  • replay-aware evidence generation

Claude Code is particularly effective when paired with repeatable Forge workflows and project-scoped execution contexts.


Next

Learn the MCP architecture:

Native MCP Server

Configure additional clients:

CursorClaude DesktopWindsurfVS Code

Or continue with:

Generic MCP Clients

Deterministic execution infrastructure for distributed compute.