Opportunity Zone MCP Server Docs

Complete documentation for integrating with the Opportunity Zone MCP server

Overview

The Opportunity Zone MCP server provides tools for checking whether coordinates fall within designated Opportunity Zones in the United States. It supports both direct API calls and MCP-compatible AI assistants like Claude.

Quick Start
Get up and running with the Opportunity Zone MCP server in minutes
Step 1

Get API Access

Register for an API key to access the MCP server endpoints.

  1. 1. Visit the developer dashboard
  2. 2. Create a new OAuth client
  3. 3. Copy your client credentials
  4. 4. Follow the OAuth flow to get an access token
Step 2

Make Your First Request

Test the API
curl -X POST https://oz-mcp.vercel.app/api/opportunity-zones/check \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "latitude": 38.8977,
    "longitude": -77.0365
  }'
Claude Setup
Configure Claude to use the Opportunity Zone MCP server
MCP Config

Add to Claude Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "opportunity-zones": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"],
      "env": {
        "FETCH_BASE_URL": "https://oz-mcp.vercel.app/api/mcp",
        "FETCH_API_KEY": "YOUR_ACCESS_TOKEN"
      }
    }
  }
}
Usage

Example Claude Prompt

"Check if the coordinates 38.8977, -77.0365 (Washington DC) are in an Opportunity Zone"

OpenAI Function Example
Use the server with OpenAI's function calling feature
Function Definition

Define the Function

Function Schema
const functions = [
  {
    name: "check_opportunity_zone",
    description: "Check if coordinates are in an Opportunity Zone",
    parameters: {
      type: "object",
      properties: {
        latitude: {
          type: "number",
          description: "Latitude coordinate"
        },
        longitude: {
          type: "number", 
          description: "Longitude coordinate"
        }
      },
      required: ["latitude", "longitude"]
    }
  }
];
Implementation

Function Handler

JavaScript Example
async function handleFunctionCall(name, args) {
  if (name === "check_opportunity_zone") {
    const response = await fetch(
      "https://oz-mcp.vercel.app/api/opportunity-zones/check",
      {
        method: "POST",
        headers: {
          "Authorization": "Bearer YOUR_ACCESS_TOKEN",
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          latitude: args.latitude,
          longitude: args.longitude
        })
      }
    );
    return await response.json();
  }
}
REST Endpoint Specification
Complete API reference for all available endpoints
POST

Check Opportunity Zone

/api/opportunity-zones/check

Request Body:

{
  "latitude": number,
  "longitude": number
}

Response:

{
  "isOpportunityZone": boolean,
  "tract": string | null,
  "state": string | null
}
POST

Geocode Address

/api/opportunity-zones/geocode

Request Body:

{
  "address": string
}

Response:

{
  "latitude": number,
  "longitude": number,
  "formattedAddress": string,
  "isOpportunityZone": boolean,
  "tract": string | null,
  "state": string | null
}
POST

MCP Protocol

/api/mcp

Supports full MCP (Model Context Protocol) for AI assistants like Claude.

Available Tools:

  • check_opportunity_zone - Check coordinates
  • geocode_address - Convert address to coordinates