|
| 1 | +--- |
| 2 | +description: "Connect SharpAPI to AI assistants like Claude using the Model Context Protocol (MCP). Query live odds, find +EV opportunities, and compare sportsbooks through natural language." |
| 3 | +--- |
| 4 | + |
| 5 | +import { Callout, Tabs } from 'nextra/components' |
| 6 | + |
| 7 | +# MCP Server (AI Assistants) |
| 8 | + |
| 9 | +<Callout type="info"> |
| 10 | +SharpAPI includes a built-in MCP server at `https://api.sharpapi.io/mcp` — connect Claude Desktop, Claude Code, or any MCP-compatible AI assistant to query live odds and opportunities through natural language. |
| 11 | +</Callout> |
| 12 | + |
| 13 | +## What is MCP? |
| 14 | + |
| 15 | +The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) lets AI assistants call external tools directly. Instead of copying data from our API into a chat, your AI assistant can query SharpAPI in real-time: |
| 16 | + |
| 17 | +> *"Find me the best +EV opportunities in NBA right now"* |
| 18 | +> |
| 19 | +> *"Compare moneyline odds for the Lakers game across all sportsbooks"* |
| 20 | +> |
| 21 | +> *"What arbitrage opportunities are available in soccer?"* |
| 22 | +
|
| 23 | +## Setup |
| 24 | + |
| 25 | +Add SharpAPI to your MCP client configuration: |
| 26 | + |
| 27 | +<Tabs items={['Claude Desktop', 'Claude Code', 'Other MCP Clients']}> |
| 28 | +<Tabs.Tab> |
| 29 | + |
| 30 | +Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows): |
| 31 | + |
| 32 | +```json |
| 33 | +{ |
| 34 | + "mcpServers": { |
| 35 | + "sharpapi": { |
| 36 | + "type": "streamable-http", |
| 37 | + "url": "https://api.sharpapi.io/mcp", |
| 38 | + "headers": { |
| 39 | + "X-API-Key": "sk_live_..." |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +Restart Claude Desktop after saving. |
| 47 | + |
| 48 | +</Tabs.Tab> |
| 49 | +<Tabs.Tab> |
| 50 | + |
| 51 | +Add to your Claude Code MCP settings: |
| 52 | + |
| 53 | +```json |
| 54 | +{ |
| 55 | + "mcpServers": { |
| 56 | + "sharpapi": { |
| 57 | + "type": "streamable-http", |
| 58 | + "url": "https://api.sharpapi.io/mcp", |
| 59 | + "headers": { |
| 60 | + "X-API-Key": "sk_live_..." |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +</Tabs.Tab> |
| 68 | +<Tabs.Tab> |
| 69 | + |
| 70 | +Any MCP client that supports Streamable HTTP transport can connect: |
| 71 | + |
| 72 | +- **Endpoint:** `POST https://api.sharpapi.io/mcp` |
| 73 | +- **Auth:** `X-API-Key` header, `Authorization: Bearer` header, or `api_key` query parameter |
| 74 | +- **Protocol:** JSON-RPC 2.0 over HTTP (MCP Streamable HTTP transport) |
| 75 | +- **Version:** `2025-03-26` |
| 76 | + |
| 77 | +</Tabs.Tab> |
| 78 | +</Tabs> |
| 79 | + |
| 80 | +## Available Tools |
| 81 | + |
| 82 | +The MCP server exposes 12 tools that map to SharpAPI's REST API: |
| 83 | + |
| 84 | +### Reference Data |
| 85 | + |
| 86 | +| Tool | Description | |
| 87 | +|------|-------------| |
| 88 | +| `get_sports` | List all sports with event and live counts | |
| 89 | +| `get_leagues` | List leagues, filterable by sport | |
| 90 | +| `get_sportsbooks` | List all sportsbooks with metadata | |
| 91 | + |
| 92 | +### Odds & Events |
| 93 | + |
| 94 | +| Tool | Description | |
| 95 | +|------|-------------| |
| 96 | +| `get_events` | Search events by sport, league, or team name | |
| 97 | +| `get_odds` | Get current odds with filters | |
| 98 | +| `get_best_odds` | Best odds across all books for each selection | |
| 99 | +| `compare_odds` | Side-by-side odds comparison for an event | |
| 100 | + |
| 101 | +### Opportunities |
| 102 | + |
| 103 | +| Tool | Description | Min Tier | |
| 104 | +|------|-------------|----------| |
| 105 | +| `find_ev_opportunities` | +EV bets using Pinnacle as reference | Pro | |
| 106 | +| `find_arbitrage` | Cross-book arbitrage with stake sizing | Hobby | |
| 107 | +| `find_middles` | Middle opportunities (win both sides) | Pro | |
| 108 | +| `find_low_hold` | Tightest lines across books | All | |
| 109 | + |
| 110 | +### Account |
| 111 | + |
| 112 | +| Tool | Description | |
| 113 | +|------|-------------| |
| 114 | +| `get_account_info` | Your tier, rate limits, and features | |
| 115 | + |
| 116 | +## Sportsbook Access by Tier |
| 117 | + |
| 118 | +Odds, best odds, and comparison results are automatically filtered to the sportsbooks your tier can access: |
| 119 | + |
| 120 | +| Tier | Books | Examples | |
| 121 | +|------|-------|---------| |
| 122 | +| **Free** | 2 | DraftKings, FanDuel | |
| 123 | +| **Hobby** | 5 | + BetMGM, Caesars, Fanatics | |
| 124 | +| **Pro** | 15 | + Pinnacle, Bet365, BetOnline, ... | |
| 125 | +| **Sharp** | All 30+ | Every sportsbook | |
| 126 | +| **Enterprise** | All 30+ | + Futures, Historical, Gamestate | |
| 127 | + |
| 128 | +## Rate Limits |
| 129 | + |
| 130 | +Each MCP tool call counts as one API request against your tier's rate limit. The initial handshake (initialize + tools/list) costs 2-3 requests — this happens once per session. |
| 131 | + |
| 132 | +| Tier | Requests/min | |
| 133 | +|------|-------------| |
| 134 | +| Free | 12 | |
| 135 | +| Hobby | 120 | |
| 136 | +| Pro | 300 | |
| 137 | +| Sharp | 1,000 | |
| 138 | +| Enterprise | 10,000 | |
| 139 | + |
| 140 | +Use `get_account_info` to check your current usage and limits. |
| 141 | + |
| 142 | +## Example Conversations |
| 143 | + |
| 144 | +Once connected, you can ask your AI assistant questions like: |
| 145 | + |
| 146 | +- *"What sports have live events right now?"* |
| 147 | +- *"Show me NBA odds for tonight's games on DraftKings"* |
| 148 | +- *"Find arbitrage opportunities in soccer with at least 1% profit"* |
| 149 | +- *"Compare the odds for the Chiefs game across all books"* |
| 150 | +- *"What's my current API tier and how many requests do I have left?"* |
| 151 | + |
| 152 | +The AI will automatically call the appropriate SharpAPI tools and present the results in a readable format. |
0 commit comments