MCP Server for Claude Code

Calculate U.S. surplus lines taxes directly in Claude Code without leaving your development environment. Our MCP (Model Context Protocol) server brings the full power of the Surplus Lines Tax API to your AI assistant.

What is MCP?

Model Context Protocol (MCP) is an open protocol developed by Anthropic that allows AI assistants like Claude to securely connect to external tools and data sources. With MCP, Claude can call APIs, access databases, and perform actions on your behalf—all within a natural conversation.

Why Use the MCP Server?

  • Stay in Flow — Calculate taxes without switching to a browser or separate tool
  • Natural Language — Just ask Claude: "What's the SL tax on a $50,000 premium in Texas?"
  • Full API Access — All 50 states + DC + territories, all coverage types
  • Instant Results — Get detailed breakdowns in seconds
  • Developer Friendly — Perfect for insurance software development

Prerequisites

Before installing the MCP server, ensure you have:

  1. Node.js 18+

    The MCP server requires Node.js 18 or later. Check your version:

    node --version
  2. Claude Code or Claude Desktop

    You need Claude Code (CLI) or Claude Desktop with MCP support enabled.

  3. API Key

    Get your API key at app.surpluslinesapi.com. New accounts include 100 free queries.

How It Works

The MCP server acts as a bridge between Claude and the Surplus Lines Tax API:

1

You Ask Claude
"Calculate surplus lines tax for $25,000 in California"

2

Claude Calls MCP Server
Invokes calculate_surplus_lines_tax tool

3

MCP Server Calls API
Authenticates and sends request to our API

4

Claude Responds
Presents results in a clear, readable format

Installation

Install the MCP server via npm:

Terminal
# Install globally (recommended)
npm install -g surplus-lines-tax-mcp

# Or install locally in your project
npm install surplus-lines-tax-mcp

The package is available on npm at npmjs.com/package/surplus-lines-tax-mcp

After Installation

The MCP server executable will be available as surplus-lines-tax-mcp. You can verify the installation by running:

surplus-lines-tax-mcp --help

Configuration

Add the MCP server to your Claude Code or Claude Desktop configuration.

Option 1: User Settings (All Projects)

Edit ~/.claude/settings.json to enable the server globally:

~/.claude/settings.json
{
  "mcpServers": {
    "surplus-lines-tax": {
      "command": "npx",
      "args": ["surplus-lines-tax-mcp"],
      "env": {
        "SLAPI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option 2: Project Settings (Specific Project)

Create .claude/settings.local.json in your project root:

.claude/settings.local.json
{
  "mcpServers": {
    "surplus-lines-tax": {
      "command": "npx",
      "args": ["surplus-lines-tax-mcp"],
      "env": {
        "SLAPI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Keep Your API Key Secure

Never commit your API key to version control. Consider using environment variables or a secrets manager for production environments.

Claude Desktop Configuration

For Claude Desktop on macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "surplus-lines-tax": {
      "command": "npx",
      "args": ["surplus-lines-tax-mcp"],
      "env": {
        "SLAPI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Testing the Server

Verify your installation works by running the server directly:

Quick Test

# Test that the server starts (Ctrl+C to exit)
SLAPI_API_KEY="your-api-key" npx surplus-lines-tax-mcp

If configured correctly, the server will start and wait for MCP connections. Press Ctrl+C to exit.

Test with Claude Code

After configuring your settings, restart Claude Code and ask:

"Calculate the surplus lines tax for a $10,000 premium in Texas"

Expected response: Claude will return the tax calculation with state tax ($485), stamping fee ($18), and grand total ($10,503).

Tool: calculate_surplus_lines_tax

The main calculation tool. Returns detailed tax breakdowns for any state and premium amount.

Parameters

Parameter Type Required Description
state string Yes Full U.S. state name (e.g., "Texas", "California")
premium number Yes Premium amount in USD
wet_marine boolean No Wet marine coverage (affects Alaska)
fire_insurance boolean No Fire insurance (affects SD, MT)
electronic_filing boolean No Electronic filing (affects MT stamping fee)
medical_malpractice boolean No Medical malpractice (exempt in PR)
workers_comp boolean No Workers compensation (exempt in VA)
year integer No Tax year (affects Iowa rates 2024-2027)
new_business boolean No New vs renewal policy (affects Oregon $10 fee)

Example Response

{
  "state": "Texas",
  "premium": 10000,
  "sl_tax": 485,
  "tax_rate": 0.0485,
  "stamping_fee": 18,
  "stamping_fee_rate": 0.0018,
  "total_taxes_and_fees": 503,
  "grand_total": 10503
}

Tool: list_supported_states

Returns a list of all supported U.S. states and territories for tax calculations.

Parameters

None required.

Returns

Array of all 50 states plus:

  • District of Columbia
  • Puerto Rico
  • U.S. Virgin Islands

Tool: get_state_tax_info

Get current tax rate information for a specific state without performing a calculation.

Parameters

Parameter Type Required Description
state string Yes Full U.S. state name

Returns

Current tax rates including:

  • Surplus lines tax rate
  • Stamping fee rate (if applicable)
  • Filing fee rate (if applicable)
  • Special rules and notes

Usage Examples

Once configured, just ask Claude naturally:

Basic Calculation

"Calculate the surplus lines tax for a $50,000 premium in Texas"

Claude will return: State tax ($2,425), stamping fee ($90), total due ($52,515)

Special Coverage Type

"What's the SL tax for a wet marine policy in Florida with $100,000 premium?"

Claude will apply wet marine rules and return the correct calculation

State Information

"What is the current surplus lines tax rate in California?"

Claude will return the current rate (3.0%) plus any applicable fees

Multi-State Comparison

"Compare surplus lines taxes for a $25,000 premium in Texas, California, and New York"

Claude will calculate all three and present a comparison

State Lookup

"List all states supported for surplus lines tax calculation"

Claude will return the full list of 53 supported jurisdictions

Troubleshooting

"SLAPI_API_KEY environment variable is required"

Your API key is not configured. Make sure the env section in your settings includes your API key:

"env": {
  "SLAPI_API_KEY": "your-actual-api-key"
}

"API error (401)"

Your API key is invalid or expired. Verify your key at app.surpluslinesapi.com.

"API error (402)"

Your account balance is depleted. Add funds at app.surpluslinesapi.com.

MCP Server Not Appearing in Claude

  • Restart Claude Code or Claude Desktop after editing settings
  • Verify the package is installed: npx surplus-lines-tax-mcp --help
  • Check that Node.js 18+ is installed and in your PATH
  • Try running manually: SLAPI_API_KEY="your-key" npx surplus-lines-tax-mcp

Getting Help

Contact us at support@undtec.com for assistance.

Pricing

MCP server usage follows the same pricing as the REST API:

Free Tier 100 free queries for new accounts
Per Query $0.38 per calculation
Monthly Minimum $18/month (after free tier)
Initial Deposit $50 (credited to your balance)

Get Your API Key View Full Documentation