Cursor MCP Setup Guide

Cursor MCP Setup Guide

Quick Setup (5 minutes)

Step 1: Verify Everything Works

cd /Users/nickjackolaisen/Documents/GitHub/BI/mcp-servers/government-data
python3 test_client.py

You should see: ✅ Test complete! Client is working.

Step 2: Configure Cursor

  1. Open Cursor Settings
    • Press Cmd + , (Mac) or Ctrl + , (Windows/Linux)
    • Or go to: Cursor → Settings → Features → Model Context Protocol
  2. Add MCP Server Configuration

    Find the MCP servers section and add:

    {
      "mcpServers": {
        "government-data": {
          "command": "python3",
          "args": [
            "/Users/nickjackolaisen/Documents/GitHub/BI/mcp-servers/government-data/server.py"
          ],
          "env": {
            "CENSUS_API_KEY": "541100b6baa56ca3bafeffa63e59e80ba1f10d34"
          }
        }
      }
    }
    

    OR if Cursor uses a config file, edit:

    • ~/.cursor/mcp.json (if it exists)
    • Or add to Cursor’s settings JSON
  3. Restart Cursor
    • Close and reopen Cursor completely

Step 3: Test It!

In Cursor, try asking:

"Fetch business startup data for 2023 from the Census BDS API"

Or:

"Get population data for California from the ACS API for 2023"

The AI should now be able to call the MCP tools automatically!

Troubleshooting

“MCP server not found”

  • Check the path is correct: /Users/nickjackolaisen/Documents/GitHub/BI/mcp-servers/government-data/server.py
  • Make sure python3 is in your PATH: which python3

“CENSUS_API_KEY not set”

  • The API key is in the .env file, but Cursor might need it in the env section of the config
  • Add it to the env section in the MCP config (see Step 2)

“Module not found: mcp”

  • Run: pip3 install -r requirements.txt in the mcp-servers/government-data directory

Server starts but tools don’t work

  • Check Cursor’s MCP logs/console
  • Try running the server manually: python3 server.py (it should wait for input, that’s normal)

What You Can Do Now

Once configured, you can ask the AI to:

  • ✅ “Create a stats page about business startups in 2023”
  • ✅ “Get business formation data for California”
  • ✅ “Fetch job creation statistics for 2020-2023”
  • ✅ “Create a comparison of startup rates by state”

The AI will automatically:

  1. Call the MCP tools to fetch real data
  2. Use that data to create content
  3. Follow your existing content patterns

No more manual script running! 🎉