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:
- Option A: MCP Client Extension (Recommended)
- Option B: Codeium with MCP Support
Manual Setup
Step 1: Get Your API Key
- Sign up at app.heir.es
- Go to API Keys
- Create a new key and copy it
Step 2: Configure Settings
Open VS Code settings (Cmd/Ctrl + ,) and add:
{
"mcp.servers": {
"heir": {
"url": "https://mcp.heir.es",
"apiKey": "heir_pk_your_key_here"
}
}
}Step 3: Environment Variable (Recommended)
For better security, use an environment variable:
macOS/Linux:
export HEIR_API_KEY="heir_pk_your_key_here"
code # Launch VS Code with environmentWindows:
set HEIR_API_KEY=heir_pk_your_key_here
code # Launch VS CodeThen update settings to:
{
"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
{
"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
Legal Research Commands
// 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
// Generate smart contracts
"Create an ERC-721 inheritance contract"
"Generate Solana will contract"
"Show gas estimation for Ethereum deployment"Documentation Search
// 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:
{
"mcp.servers": {
"heir": {
"url": "https://mcp.heir.es",
"timeout": 30000,
"retryAttempts": 3
}
}
}Custom Context
Provide additional context for better responses:
{
"mcp.servers": {
"heir": {
"url": "https://mcp.heir.es",
"context": {
"project_type": "estate_planning",
"jurisdiction": "usa-california",
"blockchain": "ethereum"
}
}
}
}Proxy Configuration
For corporate networks:
{
"http.proxy": "http://proxy.company.com:8080",
"mcp.servers": {
"heir": {
"url": "https://mcp.heir.es"
}
}
}Code Examples
1. Estate Planning Research
/**
* 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 information2. Smart Contract Development
// 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
// 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:
### 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:
{
"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
Check extension installation:
bashcode --list-extensions | grep mcpVerify settings:
- Open settings (
Cmd/Ctrl + ,) - Search for "mcp"
- Ensure HEIR is configured
- Open settings (
Check output panel:
- View → Output
- Select "MCP Client" from dropdown
Authentication Issues
API key format:
javascript// Correct format "apiKey": "heir_pk_live_abc123..." // Incorrect "apiKey": "abc123..." // Missing heir_pk_ prefixEnvironment variable:
bash# Check if set correctly echo $HEIR_API_KEY # Should output: heir_pk_...
Connection Problems
Network issues:
json{ "mcp.servers": { "heir": { "url": "https://mcp.heir.es", "timeout": 60000, // Increase timeout "retryAttempts": 5 } } }Proxy settings:
json{ "http.proxy": "http://proxy:8080", "http.proxyStrictSSL": false }
Debug Mode
Enable debug logging:
{
"mcp.debug": true,
"developer.reload": true
}Check debug output in VS Code's Developer Console (Help → Toggle 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
{
// ✅ 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 researchIntegration Examples
Estate Planning Toolkit
Create a complete estate planning development environment:
extensions.json:
{
"recommendations": [
"AnthropicAI.mcp-client",
"GitHub.copilot",
"ms-vscode.vscode-json",
"JuanBlanco.solidity"
]
}tasks.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?
- VS Code Docs: code.visualstudio.com/docs
- HEIR Support: support@heir.es
- Community: Telegram
- Issues: GitHub
