> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventgraph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor & Windsurf

> Use live prediction market data inside your AI coding environment

## Overview

Both **Cursor** and **Windsurf** support MCP servers, letting you bring live EventGraph data into your development workflow. Query markets, pull price data, and build trading-adjacent applications without ever leaving your editor.

***

## Cursor Setup

### 1. Complete the MCP quickstart

<Card title="MCP Quickstart →" icon="bolt" href="/mcp/quickstart">
  Set up the EventGraph MCP server (5 min)
</Card>

### 2. Open Cursor MCP settings

Go to **Cursor Settings → Features → MCP Servers** (or edit `~/.cursor/mcp.json` directly).

### 3. Add EventGraph

```json theme={null}
{
  "mcpServers": {
    "eventgraph": {
      "command": "node",
      "args": ["/absolute/path/to/eventgraph-mcp/server.js"],
      "env": {
        "EVENTGRAPH_API_KEY": "eg_live_your_key_here"
      }
    }
  }
}
```

### 4. Restart Cursor

After restarting, open the chat panel (Cmd+L) and you should see EventGraph tools available.

***

## Windsurf Setup

### 1. Open Windsurf MCP config

Edit `~/.codeium/windsurf/mcp_config.json`:

```json theme={null}
{
  "mcpServers": {
    "eventgraph": {
      "command": "node",
      "args": ["/absolute/path/to/eventgraph-mcp/server.js"],
      "env": {
        "EVENTGRAPH_API_KEY": "eg_live_your_key_here"
      }
    }
  }
}
```

### 2. Restart Windsurf

Cascade (Windsurf's AI) will pick up the new server on restart.

***

## Other MCP clients

The same config pattern works for any MCP-compatible client:

| Client                      | Config file                                       |
| --------------------------- | ------------------------------------------------- |
| **Continue**                | `.continue/config.json` → `mcpServers` block      |
| **VS Code** (MCP extension) | `.vscode/mcp.json`                                |
| **Zed**                     | `~/.config/zed/settings.json` → `context_servers` |
| **Claude Code**             | `claude mcp add` CLI command                      |

For Claude Code (CLI):

```bash theme={null}
claude mcp add eventgraph \
  --command node \
  --args /path/to/eventgraph-mcp/server.js \
  --env EVENTGRAPH_API_KEY=eg_live_your_key
```

***

## Use cases in a coding context

**Building a trading dashboard?**

```
Pull the current order book for the top 5 most-traded Kalshi markets
and generate TypeScript types for the response structure.
```

**Writing analysis scripts?**

```
Fetch price history for market ID abc123 over the last 30 days
and generate a Python script to plot it with matplotlib.
```

**Researching an API integration?**

```
Search for all active sports markets and show me the structure
of a market object so I can design my database schema.
```

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Tools not showing in Cursor">
    1. Check Cursor version — MCP requires Cursor 0.43+
    2. Verify the JSON in `~/.cursor/mcp.json` is valid
    3. Use an absolute path (not `~` or relative paths) for `server.js`
    4. Check **Cursor Settings → MCP** to see server status
  </Accordion>

  <Accordion title="Server disconnects mid-conversation">
    This usually means an unhandled error in the server. Check your Node.js version (`node --version` should be 18+) and ensure the `server.js` file is complete and unmodified.
  </Accordion>
</AccordionGroup>
