Skip to content

Connect to Opensure MCP

MCP is the backbone. It connects your database to AI tools without your data ever leaving your machine.

Time: 10 minutes | Difficulty: Intermediate


What You'll Need

  • Node.js 18+
  • A Supabase account (free tier works)
  • A terminal

The Security Model

Before we start: your credentials never leave your machine.

  • ✅ API key validates your tenant access
  • ✅ Database URL stays in your local .env
  • ❌ Opensure never sees your database password
  • ❌ Client data never touches our servers

Open source. Auditable. Your IT team can verify.


Step 1: Get Your API Key

  1. Go to app.opensure.dev
  2. Sign up or log in
  3. Navigate to Settings → API Keys
  4. Click Generate New API Key
  5. Copy it (starts with osk_)

Save this somewhere secure. You'll need it shortly.


Step 2: Set Up Supabase

  1. Go to supabase.com
  2. Create a new project
  3. Wait for provisioning (~2 minutes)
  4. Go to Settings → Database
  5. Copy the Connection string (URI)
  6. Replace [YOUR-PASSWORD] with your actual password

Example:

postgresql://postgres:[email protected]:5432/postgres

Step 3: Apply the Schema

  1. In Opensure dashboard, go to Settings → Database
  2. Click Download Schema SQL
  3. In Supabase, go to SQL Editor
  4. Paste the schema and run it
  5. Verify tables were created

Step 4: Install MCP Server

bash
npm install -g @opensure/mcp-server-stdio

Verify it worked:

bash
opensure-mcp --version

Step 5: Configure Your Environment

Create a .env file in your project:

bash
OPENSURE_API_KEY=osk_your_key_here
DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres

These stay on YOUR machine. Never committed. Never sent anywhere.


Step 6: Connect Claude Desktop

Edit your Claude config file:

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "opensure": {
      "command": "opensure-mcp",
      "env": {
        "OPENSURE_API_KEY": "osk_your_key_here",
        "DATABASE_URL": "postgresql://..."
      }
    }
  }
}

Restart Claude Desktop.


Step 7: Test It

Open Claude Desktop and try:

List my insurance clients

If it responds with data from your database, you're connected.


Available MCP Tools

Once connected, Claude can use:

ToolWhat it does
client.createCreate a new client
client.listList all clients
client.getGet client by ID
policy.createCreate a policy
policy.listList all policies
policy.getGet policy by ID

Full API reference →


What Gets Sent to Opensure

Let's be explicit:

  • ✅ API key (validates your tenant)
  • ✅ Usage metrics (for billing)
  • ❌ Database credentials
  • ❌ Client data
  • ❌ Policy data

Your data stays in your Supabase. Period.


Troubleshooting

"Invalid API key"

  • Check for extra spaces or line breaks
  • Verify the key starts with osk_
  • Generate a new key if needed

"Database connection failed"

  • Verify the connection string is correct
  • Check your Supabase project is active (not paused)
  • Make sure the password is URL-safe (no special characters breaking it)

MCP tools not appearing in Claude?

  • Restart Claude Desktop after config changes
  • Verify opensure-mcp is in your PATH
  • Check Claude Desktop logs for errors

Next Steps


Stuck? Email [email protected] — we actually reply.

Built with VitePress