Advanced Guide

MCP Intergraiton Guide

Implement MCP securely so AI agents can discover tools, execute workflows, and stay within operational controls. This guide is based on the current Prudens MCP gateway implementation.

How Prudens MCP Works

Two auth layers control access: session token for account management and API key for tool execution.

Session-token layer (Bearer)

  • Use for signup, login, account info, provider listing, and provider connection setup.
  • Endpoints require Authorization: Bearer SESSION_TOKEN after login.
  • Use this layer to rotate API keys and manage account-level integration state.

API-key layer (x-prudens-api-key)

  • Use for tool discovery and execution endpoints.
  • Required header is x-prudens-api-key.
  • MCP JSON-RPC calls (initialize, tools/list, tools/call) execute on this layer.

Hookup Flow: End to End

Follow this sequence to connect Prudens MCP to your AI tools.

01

Check gateway health

GET https://getprudens.ai/ai-tools/mcp-connect/health
02

Create account and login

POST https://getprudens.ai/ai-tools/mcp-connect/signup
POST https://getprudens.ai/ai-tools/mcp-connect/login

Save the returned session token for account setup calls.

03

Get or rotate API key

GET https://getprudens.ai/ai-tools/mcp-connect/me
POST https://getprudens.ai/ai-tools/mcp-connect/api-key/rotate

Use Authorization: Bearer SESSION_TOKEN on both calls.

04

Connect providers

GET https://getprudens.ai/ai-tools/mcp-connect/providers
POST https://getprudens.ai/ai-tools/mcp-connect/providers/__provider__/connect

Provider credentials currently supported by gateway: hubspot: api_key, portal_id nowcerts: username, password wunderite: api_token

05

List available tools

GET https://getprudens.ai/ai-tools/mcp-connect/tools

Use x-prudens-api-key to list connected provider tools plus Prudens core tools.

06

Run MCP JSON-RPC calls

POST https://getprudens.ai/ai-tools/mcp-connect/mcp

Send initialize, tools/list, and tools/call JSON-RPC payloads.

Endpoint Map

Reference map for account, provider, and runtime execution endpoints.

Category Endpoint Auth Purpose
Gateway Health https://getprudens.ai/ai-tools/mcp-connect/health None Service availability check
Auth https://getprudens.ai/ai-tools/mcp-connect/signup / https://getprudens.ai/ai-tools/mcp-connect/login None Create account and start session
Session Profile https://getprudens.ai/ai-tools/mcp-connect/me / https://getprudens.ai/ai-tools/mcp-connect/logout Bearer token Account info and session lifecycle
API Key https://getprudens.ai/ai-tools/mcp-connect/api-key/rotate Bearer token Rotate runtime API key
Provider Management https://getprudens.ai/ai-tools/mcp-connect/providers / https://getprudens.ai/ai-tools/mcp-connect/providers/__provider__/connect Bearer token Discover and connect providers
Runtime Connections https://getprudens.ai/ai-tools/mcp-connect/connections / https://getprudens.ai/ai-tools/mcp-connect/connect/__provider__ x-prudens-api-key Inspect and update runtime connections
Tool Discovery https://getprudens.ai/ai-tools/mcp-connect/tools x-prudens-api-key List callable tools
MCP Runtime https://getprudens.ai/ai-tools/mcp-connect/mcp x-prudens-api-key JSON-RPC methods for initialize, tools/list, tools/call

JSON-RPC Usage Examples

These are the core runtime calls your client uses against the MCP endpoint.

initialize

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {}
}

tools/list

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list",
  "params": {}
}

tools/call

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "quote.compare",
    "arguments": {
      "accountId": "acct_123",
      "lineOfBusiness": "commercial"
    }
  }
}

Hookup Patterns for Different Tools

Any client that supports MCP over HTTP can use the same endpoint and header model.

Claude Desktop style config

{
  "mcpServers": {
    "prudens-connect": {
      "type": "http",
      "url": "https://getprudens.ai/ai-tools/mcp-connect/mcp",
      "headers": {
        "x-prudens-api-key": "YOUR_API_KEY"
      }
    }
  }
}

Cursor / IDE agents

Configure Prudens as an MCP HTTP server using the same endpoint and API key header.

  • Endpoint: https://getprudens.ai/ai-tools/mcp-connect/mcp
  • Header: x-prudens-api-key
  • Methods: initialize, tools/list, tools/call

Custom app or backend agent

Use direct HTTP POST calls to the MCP endpoint and parse JSON-RPC result payloads.

  • Use tools/list at startup and cache tool catalog
  • Use tools/call for task execution
  • Log tool inputs and outputs for audit

Operational Controls and Production Checklist

Before broad rollout, enforce controls for auth, tool scope, and runtime reliability.

Control policies

  • Rotate API keys on a fixed schedule.
  • Connect only required providers for each workflow scope.
  • Audit tool execution logs for sensitive actions.
  • Require approval gates on high-impact tool calls.
  • Use environment-specific keys for dev, staging, and production.

Readiness checklist

  • Health endpoint passes and config endpoint resolves.
  • Session auth flow tested (signup/login/me/logout).
  • Provider connections verified for required integrations.
  • Tools list contains expected Prudens and provider tools.
  • At least one tools/call execution path tested end to end.

Ready to connect your tools?

Use MCP Insurance Connect to manage accounts, provider connections, and runtime keys in one place.

Open MCP Insurance Connect