Skip to content

VS Code Setup

Connect HEIR's estate planning tools to Visual Studio Code through the Model Context Protocol.

Quick Install

This will open VS Code settings and configure HEIR MCP integration.

Prerequisites

First, install an MCP extension for VS Code:

  1. Option A: MCP Client Extension (Recommended)
  2. Option B: Codeium with MCP Support

Manual Setup

Step 1: Get Your API Key

  1. Sign up at app.heir.es
  2. Go to API Keys
  3. Create a new key and copy it

Step 2: Configure Settings

Open VS Code settings (Cmd/Ctrl + ,) and add:

json
{
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es",
      "apiKey": "heir_pk_your_key_here"
    }
  }
}

For better security, use an environment variable:

macOS/Linux:

bash
export HEIR_API_KEY="heir_pk_your_key_here"
code  # Launch VS Code with environment

Windows:

cmd
set HEIR_API_KEY=heir_pk_your_key_here
code  # Launch VS Code

Then update settings to:

json
{
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es"
    }
  }
}

Step 4: Reload Window

Press Cmd/Ctrl + Shift + P → "Developer: Reload Window"

Using with GitHub Copilot

HEIR MCP works alongside GitHub Copilot for enhanced estate planning assistance:

settings.json

json
{
  "github.copilot.enable": {
    "*": true
  },
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es"
    }
  }
}

Testing the Connection

Test the integration by asking the AI assistant:

"What are the forced heirship rules in France?"

The assistant should automatically query HEIR's jurisdiction database and return French inheritance law details.

Available Commands

javascript
// Ask in comments or chat
"List all Common Law jurisdictions"
"What are the inheritance tax rates in UK?"
"Compare forced heirship in Germany vs Spain"

Smart Contract Generation

javascript
// Generate smart contracts
"Create an ERC-721 inheritance contract"
"Generate Solana will contract"
"Show gas estimation for Ethereum deployment"
javascript
// Search HEIR knowledge base
"How to handle cryptocurrency in wills?"
"Best practices for Islamic inheritance contracts"
"HEIR API rate limits and pricing"

Advanced Configuration

Workspace Settings

Create .vscode/settings.json in your project:

json
{
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es",
      "timeout": 30000,
      "retryAttempts": 3
    }
  }
}

Custom Context

Provide additional context for better responses:

json
{
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es",
      "context": {
        "project_type": "estate_planning",
        "jurisdiction": "usa-california",
        "blockchain": "ethereum"
      }
    }
  }
}

Proxy Configuration

For corporate networks:

json
{
  "http.proxy": "http://proxy.company.com:8080",
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es"
    }
  }
}

Code Examples

1. Estate Planning Research

javascript
/**
 * Research German inheritance laws
 * AI will automatically query HEIR's jurisdiction database
 */

// Ask: "What are the inheritance rules in Germany?"
// Response: Detailed German BGB inheritance law information

2. Smart Contract Development

solidity
// Ask: "Generate an inheritance smart contract for Ethereum"
// AI will use HEIR's contract generator to create:

pragma solidity ^0.8.0;

contract InheritanceContract {
    address public owner;
    mapping(address => uint256) public beneficiaries;
    uint256 public lockupPeriod;
    
    // ... generated contract code
}

3. Multi-chain Estate Planning

typescript
// Ask: "Compare deployment costs across Ethereum, Polygon, and Base"
// AI will use HEIR's gas estimation tools

interface DeploymentCosts {
  ethereum: { gas: number; usd: number };
  polygon: { gas: number; usd: number };
  base: { gas: number; usd: number };
}

Extension Integrations

With REST Client

Create API requests enhanced with HEIR knowledge:

http
### Get jurisdiction data (auto-generated by AI)
GET https://api.heir.es/api/jurisdictions/germany
Authorization: Bearer {{$dotenv HEIR_API_KEY}}

With Thunder Client

HEIR MCP can help generate Thunder Client collections:

json
{
  "collectionName": "HEIR Estate Planning API",
  "requests": [
    {
      "name": "Get Jurisdiction",
      "url": "https://api.heir.es/api/jurisdictions/{{country}}",
      "headers": {
        "Authorization": "Bearer {{HEIR_API_KEY}}"
      }
    }
  ]
}

Troubleshooting

Extension Not Working

  1. Check extension installation:

    bash
    code --list-extensions | grep mcp
  2. Verify settings:

    • Open settings (Cmd/Ctrl + ,)
    • Search for "mcp"
    • Ensure HEIR is configured
  3. Check output panel:

    • View → Output
    • Select "MCP Client" from dropdown

Authentication Issues

  1. API key format:

    javascript
    // Correct format
    "apiKey": "heir_pk_live_abc123..."
    
    // Incorrect
    "apiKey": "abc123..."  // Missing heir_pk_ prefix
  2. Environment variable:

    bash
    # Check if set correctly
    echo $HEIR_API_KEY
    
    # Should output: heir_pk_...

Connection Problems

  1. Network issues:

    json
    {
      "mcp.servers": {
        "heir": {
          "url": "https://mcp.heir.es",
          "timeout": 60000,  // Increase timeout
          "retryAttempts": 5
        }
      }
    }
  2. Proxy settings:

    json
    {
      "http.proxy": "http://proxy:8080",
      "http.proxyStrictSSL": false
    }

Debug Mode

Enable debug logging:

json
{
  "mcp.debug": true,
  "developer.reload": true
}

Check debug output in VS Code's Developer Console (HelpToggle Developer Tools).

Performance Tips

Optimize Requests

  • Be specific in queries to reduce API calls
  • Cache common jurisdiction data locally
  • Use workspace settings for project-specific context

Rate Limit Management

  • Monitor usage in HEIR dashboard
  • Upgrade to Pro tier for higher limits
  • Implement request debouncing for frequent queries

Best Practices

Security

json
{
  // ✅ Good: Use environment variables
  "mcp.servers": {
    "heir": {
      "url": "https://mcp.heir.es"
    }
  }
}

// ❌ Bad: Hardcode API keys
{
  "mcp.servers": {
    "heir": {
      "apiKey": "heir_pk_actual_key_here"
    }
  }
}

Project Organization

estate-planning-app/
├── .vscode/
│   └── settings.json       # Project-specific MCP config
├── contracts/
│   └── inheritance.sol     # Generated smart contracts
└── legal/
    └── research.md         # AI-generated legal research

Integration Examples

Estate Planning Toolkit

Create a complete estate planning development environment:

extensions.json:

json
{
  "recommendations": [
    "AnthropicAI.mcp-client",
    "GitHub.copilot",
    "ms-vscode.vscode-json",
    "JuanBlanco.solidity"
  ]
}

tasks.json:

json
{
  "tasks": [
    {
      "label": "Research Jurisdiction",
      "type": "shell",
      "command": "echo 'Ask AI: What are the inheritance laws in ${input:jurisdiction}?'"
    }
  ]
}

Support

Need help with VS Code integration?

Next Steps

  1. Explore available tools
  2. Set up authentication
  3. Try Cursor setup
  4. Configure Claude Desktop

Released under the MIT License.