npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@opensure-mcp/mcp-server-stdio

v2.2.0

Published

Opensure MCP Server - Multi-tenant insurance CRM with API key authentication

Downloads

597

Readme

Opensure MCP Server v2.0.0

Multi-tenant insurance CRM MCP server for Model Context Protocol clients (Claude Desktop, etc.).

Features

  • Multi-Tenant Isolation: Automatic tenant_id filtering on ALL queries
  • API Key Authentication: Secure authentication with Opensure backend
  • 8 CRUD Tools: Complete client and policy management
  • Idempotent Migrations: Safe database schema setup with version tracking
  • PostgreSQL Support: Works with Supabase, AWS RDS, or any PostgreSQL provider

Quick Start

1. Install

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

2. Get API Key

Sign up at https://app.opensure.dev and generate an API key from Settings → API Keys.

3. Set Environment Variables

export OPENSURE_API_KEY="osk_xxxxxxxx_..."  # pragma: allowlist secret
export DATABASE_URL="postgresql://user:password@host:port/database"  # pragma: allowlist secret

4. Run Migrations

npx opensure-mcp-migrate \
  --api-key=$OPENSURE_API_KEY \
  --database-url=$DATABASE_URL

This creates mcp_clients and mcp_policies tables with tenant_id isolation.

5. Configure Claude Desktop

Add to your Claude Desktop MCP settings (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "opensure": {
      "command": "npx",
      "args": ["-y", "@opensure/mcp-server-stdio"],
      "env": {
        "OPENSURE_API_KEY": "osk_xxxxxxxx_...", // pragma: allowlist secret
        "DATABASE_URL": "postgresql://..."
      }
    }
  }
}

6. Test in Claude

"Create a client named 'Apex Manufacturing Ltd' with email [email protected]"

Claude will use the client.create tool to create the client in your database.

Available Tools

Client Tools (4)

  • client.create: Create a new client
  • client.get: Get client by UUID
  • client.list: List clients (max 100)
  • client.update: Update client information

Policy Tools (4)

  • policy.create: Create a new policy (auto-generates policy_number)
  • policy.get: Get policy by UUID
  • policy.list: List policies with optional status filter
  • policy.update: Update policy information

Multi-Tenant Security

CRITICAL: All tools automatically enforce tenant_id isolation.

  • API key validation returns your tenant_id
  • Every query includes WHERE tenant_id = $extracted_from_api_key
  • Cross-tenant data access is IMPOSSIBLE (database-level enforcement)

Example: Tenant A cannot read/write Tenant B's clients or policies.

Database Schema

mcp_clients

CREATE TABLE mcp_clients (
  id UUID PRIMARY KEY,
  uuid UUID UNIQUE NOT NULL,
  tenant_id VARCHAR(26) NOT NULL,
  name VARCHAR(255) NOT NULL,
  email VARCHAR(255),
  phone VARCHAR(50),
  company VARCHAR(255),
  address TEXT,
  city VARCHAR(100),
  region VARCHAR(100),
  country VARCHAR(100),
  postal_code VARCHAR(20),
  created TIMESTAMPTZ,
  modified TIMESTAMPTZ
);

mcp_policies

CREATE TABLE mcp_policies (
  id UUID PRIMARY KEY,
  uuid UUID UNIQUE NOT NULL,
  tenant_id VARCHAR(26) NOT NULL,
  client_id UUID REFERENCES mcp_clients(id),
  policy_number VARCHAR(50),
  status VARCHAR(20),
  start_date DATE,
  end_date DATE,
  premium DECIMAL(12,2),
  service_fee DECIMAL(12,2),
  -- ... 40 total fields
  created TIMESTAMPTZ,
  modified TIMESTAMPTZ
);

Development

Build from Source

git clone https://github.com/opensure-mcp/Opensure-MCP.git
cd Opensure-MCP/mcp-server
npm install
npm run build

Run Locally

export OPENSURE_API_KEY="osk_xxx"  # pragma: allowlist secret
export DATABASE_URL="postgresql://..."
npm run dev

Architecture

Claude Desktop (MCP Client)
    ↓ stdio (JSON-RPC 2.0)
@opensure/mcp-server-stdio (This Package)
    ↓ HTTP (API Key Validation)
Opensure API (api.opensure.dev)
    ← Returns tenant_id
@opensure/mcp-server-stdio
    ↓ PostgreSQL (tenant_id filtered queries)
Your PostgreSQL Database (Supabase, AWS RDS, etc.)

Support

License

UNLICENSED - Proprietary software. Contact [email protected] for licensing.

Version History

v2.0.0 (2025-10-27)

  • 🎉 Fresh build with multi-tenant architecture
  • ✅ API key authentication (replaces v1 DATABASE_URL)
  • ✅ 8 CRUD tools (client + policy)
  • ✅ Automatic tenant_id injection (security by design)
  • ✅ Idempotent migrations with tracking
  • ✅ Auto-generate policy_number and policyholder
  • ✅ TypeScript rewrite with strict types

v1.0.0 (Legacy)

  • Single-tenant DATABASE_URL authentication (deprecated)
  • 12 tools (policy, client, compliance, system)
  • No multi-tenancy support