Skip to content

MCP Integration Tutorial

Purpose: Connect Fulcrum governance to Claude Desktop via MCP Audience: Developers using Claude Desktop or MCP-compatible applications Verify: tools/list returns Fulcrum governance tools


What You'll Build

In this tutorial, you'll: 1. Configure Claude Desktop to use Fulcrum governance 2. Test governance checks from within Claude 3. View execution traces in the Fulcrum dashboard

Time to complete: 10 minutes


Prerequisites


Understanding MCP

The Model Context Protocol (MCP) allows AI assistants like Claude to interact with external services. Fulcrum provides an MCP endpoint that exposes governance tools.

Canonical MCP Endpoint: POST https://api.fulcrumlayer.io/mcp


Step 1: Configure Claude Desktop

Locate Configuration File

Platform Location
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

Add Fulcrum MCP Server

Edit the configuration file:

{
  "mcpServers": {
    "fulcrum-governance": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-client",
        "--transport", "http",
        "--url", "https://api.fulcrumlayer.io/mcp"],
      "env": {
        "FULCRUM_API_KEY": "your-api-key",
        "FULCRUM_TENANT_ID": "your-tenant-id"
      }
    }
  }
}

Alternative: Direct HTTP Configuration

If using the HTTP transport directly:

{
  "mcpServers": {
    "fulcrum-governance": {
      "transport": "http",
      "url": "https://api.fulcrumlayer.io/mcp",
      "headers": {
        "X-API-Key": "your-api-key",
        "X-Tenant-ID": "your-tenant-id"
      }
    }
  }
}

Restart Claude Desktop

After saving the configuration, restart Claude Desktop to load the MCP server.


Step 2: Verify Connection

Check MCP Health

In a terminal:

curl -X POST https://api.fulcrumlayer.io/mcp \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'

Expected Response:

{
  "jsonrpc": "2.0",
  "result": {
    "tools": [
      {
        "name": "check_governance",
        "description": "Check if an action is allowed by governance policies"
      },
      {
        "name": "log_event",
        "description": "Log an event for audit trail"
      },
      {
        "name": "get_policies",
        "description": "List active governance policies"
      }
    ]
  },
  "id": 1
}

Verify in Claude Desktop

Ask Claude: "What MCP servers are connected?"

Claude should list fulcrum-governance among the connected servers.


Step 3: Use Governance in Claude

Check Action Permissions

Ask Claude to check governance:

Can you check with Fulcrum if the action "send_email" with content
"Send quarterly report to investors@company.com" is allowed?

Claude will use the check_governance tool and report the policy decision.

View Active Policies

Ask Claude:

What governance policies are currently active in Fulcrum?

Claude will use the get_policies tool to list active policies.


Step 4: View Traces in Dashboard

  1. Open fulcrumlayer.io dashboard
  2. Navigate to Traces
  3. You'll see entries from Claude's MCP calls
  4. Click a trace to see:
  5. Tool calls made
  6. Policy evaluations
  7. Decisions and reasons

MCP Tools Reference

check_governance

Evaluate policies before executing an action.

Input:

{
  "action": "send_email",
  "input_text": "Email content here",
  "metadata": {
    "recipient": "user@example.com"
  }
}

Output:

{
  "decision": "ALLOW",
  "reason": "All policies passed",
  "trace_id": "trc_abc123"
}

log_event

Record an event for audit purposes.

Input:

{
  "event_type": "action_completed",
  "payload": {
    "action": "send_email",
    "success": true,
    "duration_ms": 150
  }
}

get_policies

List active governance policies.

Input: (none required)

Output:

{
  "policies": [
    {
      "id": "pol_abc123",
      "name": "cost-limit",
      "type": "cost_limit",
      "enabled": true
    }
  ]
}


Self-Hosted MCP Server

For self-hosted Fulcrum deployments, configure Claude to connect to your server:

{
  "mcpServers": {
    "fulcrum-governance": {
      "transport": "http",
      "url": "http://localhost:8080/mcp",
      "headers": {
        "X-API-Key": "dev-key"
      }
    }
  }
}

Troubleshooting

MCP Server Not Connecting

  1. Check API key is valid:

    curl https://api.fulcrumlayer.io/health \
      -H "X-API-Key: your-api-key"
    

  2. Verify configuration file syntax:

  3. JSON must be valid
  4. Check for trailing commas

  5. Check Claude Desktop logs:

  6. macOS: ~/Library/Logs/Claude/
  7. Look for MCP connection errors

Tools Not Appearing

  1. Restart Claude Desktop after config changes
  2. Check tenant ID is correct
  3. Verify MCP endpoint:
    curl https://api.fulcrumlayer.io/mcp/health
    

Policy Decisions Not As Expected

  1. Check policy is enabled in dashboard
  2. Review trace details for evaluation logic
  3. Verify tenant ID matches policy scope

Next Steps

Guide Description
First Policy Create governance policies
Policy Authoring Advanced policy patterns
Troubleshooting Common issues and solutions

Document created: 2026-02-01 Diátaxis category: Tutorial (learning-oriented)