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

# EdgeFinder MCP Server: Connect AI Agents to Sports Data

> Run EdgeFinder as an MCP server so any compatible AI agent can call its sports analysis, odds, schedules, and portfolio tools directly.

EdgeFinder ships with a built-in MCP (Model Context Protocol) server that exposes its full sports analysis capability as a set of callable tools. Instead of running CLI commands yourself, you configure any MCP-compatible client — Claude Desktop, Openclaw, or a custom agent — to spin up the EdgeFinder server on demand and call tools like `ask`, `get_odds`, or `analyze_position` directly in conversation.

## What is MCP?

MCP is an open standard that lets AI assistants communicate with external tools over a structured protocol. When you add EdgeFinder to your MCP client config, the client automatically starts the EdgeFinder process, discovers its tools, and can invoke them mid-conversation without you writing any code.

## Prerequisites

* Node.js 18 or later
* An EdgeFinder API key — get one at [chat.edgefinder.io/settings/integrations](https://chat.edgefinder.io/settings/integrations)
* An MCP-compatible AI client (Claude Desktop, Openclaw, or similar)

## Set up the MCP server

<Steps>
  <Step title="Get your API key">
    Sign in at [chat.edgefinder.io/settings/integrations](https://chat.edgefinder.io/settings/integrations) and copy your API key. It starts with `ef_live_`.

    <Tip>
      You can also retrieve a key by running `edgefinder login` in your terminal if you already have the CLI installed. The login flow saves the key automatically.
    </Tip>
  </Step>

  <Step title="Add EdgeFinder to your MCP client config">
    Open your MCP client's configuration file and add the `edgefinder` block under `mcpServers`. Use `npx` so you always run the latest version without a global install.

    <Tabs>
      <Tab title="Claude Desktop">
        Open `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows) and add:

        ```json claude_desktop_config.json theme={null}
        {
          "mcpServers": {
            "edgefinder": {
              "command": "npx",
              "args": ["-y", "@edgefinder/cli", "mcp"],
              "env": {
                "EDGEFINDER_API_KEY": "ef_live_..."
              }
            }
          }
        }
        ```
      </Tab>

      <Tab title="Openclaw">
        Add EdgeFinder to your Openclaw MCP server list:

        ```json openclaw config theme={null}
        {
          "mcpServers": {
            "edgefinder": {
              "command": "npx",
              "args": ["-y", "@edgefinder/cli", "mcp"],
              "env": {
                "EDGEFINDER_API_KEY": "ef_live_..."
              }
            }
          }
        }
        ```

        <Tip>
          Openclaw also supports the native EdgeFinder plugin, which adds slash commands and tighter integration. See the [Openclaw integration guide](/integrations/openclaw).
        </Tip>
      </Tab>

      <Tab title="Other MCP clients">
        Any MCP-compatible client that accepts a `command`-style server config works. Use this block:

        ```json mcp config theme={null}
        {
          "mcpServers": {
            "edgefinder": {
              "command": "npx",
              "args": ["-y", "@edgefinder/cli", "mcp"],
              "env": {
                "EDGEFINDER_API_KEY": "ef_live_..."
              }
            }
          }
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Restart your MCP client">
    Save the config file and restart your AI client completely. Most clients do not hot-reload MCP configuration.

    <Note>
      After restarting, you should see EdgeFinder listed in your client's tool panel or available tool set. If it does not appear, check the troubleshooting section below.
    </Note>
  </Step>

  <Step title="Test the connection">
    Ask your AI assistant a sports question to confirm EdgeFinder is connected:

    > "What does EdgeFinder think about tonight's NBA games?"

    The client will invoke the `ask` tool and stream back an AI-powered analysis.
  </Step>
</Steps>

## Authentication

EdgeFinder authenticates using an API key passed as an environment variable in your MCP config. Set `EDGEFINDER_API_KEY` in the `env` block — never hard-code it elsewhere.

```json theme={null}
"env": {
  "EDGEFINDER_API_KEY": "ef_live_..."
}
```

If the server starts without a key configured, it exits immediately with an error message explaining what to set. Your AI client will surface this as a tool error on the first call.

<Warning>
  If you see "Authentication failed" during a tool call, your key may be invalid or expired. Generate a fresh key at [chat.edgefinder.io/settings/integrations](https://chat.edgefinder.io/settings/integrations) and update the `env` block in your config.
</Warning>

<Warning>
  If you see "Monthly query limit reached," you have exhausted your plan's query allowance. Upgrade your subscription at [chat.edgefinder.io/subscription](https://edgefinder.io/subscription) to restore access.
</Warning>

## Available tools

The MCP server exposes seven tools your AI agent can call. See the [MCP tool reference](/mcp/tools) for full parameter documentation.

| Tool                                              | Description                                                |
| ------------------------------------------------- | ---------------------------------------------------------- |
| [`ask`](/mcp/tools#ask)                           | AI-powered sports analysis for NFL, NBA, or MLB            |
| [`get_schedule`](/mcp/tools#get-schedule)         | Game schedules and live scores for NFL or NBA              |
| [`get_standings`](/mcp/tools#get-standings)       | Current league standings for NFL or NBA                    |
| [`get_odds`](/mcp/tools#get-odds)                 | Polymarket betting odds for NFL or NBA games               |
| [`get_portfolio`](/mcp/tools#get-portfolio)       | Polymarket portfolio summary, positions, and trade history |
| [`analyze_position`](/mcp/tools#analyze-position) | AI analysis of a specific Polymarket position              |
| [`get_status`](/mcp/tools#get-status)             | Your EdgeFinder account status and query usage             |

## Starting the server manually

You can also start the MCP server directly from the command line, which is useful for testing or building a custom integration:

```bash theme={null}
edgefinder mcp
```

Or without a global install:

```bash theme={null}
EDGEFINDER_API_KEY=ef_live_... npx -y @edgefinder/cli mcp
```

The server starts and waits for tool calls. Most users configure this through their MCP client rather than running it directly.
