The MCP server
Unitley's MCP server: its URL, transport and protocol versions, how an access token or an OAuth sign-in connects you, and the rules it sends every agent.
Unitley runs one remote MCP server. Any MCP client that can send an Authorization header can connect to it, including Claude Code, Claude Desktop, Cursor and Hermes Agent, and claude.ai and ChatGPT connect with an OAuth sign-in. It offers 21 tools, Unitley's knowledge notes as resources, and 4 prompts.
Server URL
https://console.unitley.com/api/mcp
The URL is the same for everyone. Your access token, or the account you signed in with, decides whose account the tools act on.
- Server name:
unitley - Server version: 0.1.0
To set up a specific client, see the guides for Claude, ChatGPT or any MCP client.
Authentication
There are two ways in: an access token you paste into the app, or an OAuth sign-in the app starts for you.
Access token
Send an access token from the Connect page with every request:
Authorization: Bearer YOUR_UNITLEY_TOKENThe token sets what the tools can do. A read-only token can read your data and run the calculators. A token with write access can also use log_bet, settle_bet and save_recommendation. See Tokens and security.
OAuth sign-in
claude.ai, Claude Desktop's connectors, ChatGPT and Claude Code can sign in instead. The app finds Unitley's sign-in from the server itself, sends you to Unitley to sign in and approve it, and then sends a short-lived OAuth access token of its own. You choose Read only or Read and write when you approve.
- Discovery. The 401 below names the protected resource metadata (RFC 9728) in
resource_metadata. It is at/.well-known/oauth-protected-resource/api/mcpon the console, and the authorization server metadata (RFC 8414) at/.well-known/oauth-authorization-server. - Which apps. Apps identify themselves with a client metadata document, and Unitley accepts only claude.ai's and ChatGPT's. An app without one registers itself first (RFC 7591) at
/api/oauth/registeron the console. A registration may list only claude.ai's, claude.com's and ChatGPT's own sign-in callbacks, or loopback addresses (http://localhost,http://127.0.0.1) for an app on your computer, such as Claude Code. Any other app is refused. - Registrations end. A registration that signs nobody in ends after a day, and one that did ends 30 days after its last connection ends. The app then registers again. Registrations are limited to 20 an hour from one IP address, or one /48 prefix for IPv6.
- The flow. Authorization code with PKCE (
S256) andstate, both required, andresourceset to the server URL above. Access tokens last an hour. Refresh tokens rotate on every use, and reusing an old one disconnects the app. - How long it lasts. A connection lasts 90 days from approval, or ends after 30 days unused. Disconnect it any time under Connected apps on the Connect page.
The OAuth token works only on the MCP server. The REST API takes access tokens only.
Refused tokens
A missing token, or one not shaped like a Unitley token, gets HTTP 401 with a Bearer challenge:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer error="invalid_token", error_description="Connect Unitley with OAuth, or send a Unitley access token as Authorization: Bearer unt_... (create one on the Connect page).", scope="read write", resource_metadata="https://console.unitley.com/.well-known/oauth-protected-resource/api/mcp"
Content-Type: application/json
{"error":"invalid_token","error_description":"Connect Unitley with OAuth, or send a Unitley access token as Authorization: Bearer unt_... (create one on the Connect page)."}An access token that is unknown, revoked or expired gets the same 401, with the description "This access token is unknown, revoked or expired. Create a new one on the Connect page." An OAuth token that has expired or been disconnected gets "This sign-in has expired or was disconnected. Connect Unitley again.", and the app refreshes it or signs in again.
A read-only sign-in that calls log_bet, settle_bet and save_recommendation gets HTTP 403 with the same kind of challenge and error="insufficient_scope", before the tool runs, so the app can ask you for write access.
Transport
The server speaks Streamable HTTP and is stateless. It keeps no sessions and issues no Mcp-Session-Id, and every request is served on its own.
- POST carries every JSON-RPC message. Send
Content-Type: application/json, or the server answers 415. - GET and DELETE get 405
Method not allowed.With no sessions, there is no stream to open and nothing to end. - A POST that holds only notifications gets 202 with no body.
Protocol versions
Your client picks the protocol version. You do not need to set it.
| Version | How requests work |
|---|---|
| 2026-07-28 | Each request is self-contained and carries its own protocol version. The answer is one JSON response. One message per request. |
| 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05, 2024-10-07 | The client starts with initialize. Each POST must accept both application/json and text/event-stream (406 otherwise), and the answer comes back as a short event stream that closes after the response. A POST may hold a JSON-RPC batch of up to 100 messages. |
Capabilities
The server declares three capabilities:
- tools, with
listChanged: false. The tool list does not change while you are connected. See Every tool. - resources: the knowledge notes. There are no resource templates. See Resources.
- prompts. See Prompts.
Unitley publishes no change events. A subscriptions/listen request gets the JSON-RPC error -32601 Method not found: subscriptions/listen., and resource subscriptions are not offered.
Tools over MCP
tools/list returns every tool, including the write tools, whatever your token's scope. Each entry has a title, a description, a JSON Schema for its input, and annotations: readOnlyHint, destructiveHint, idempotentHint and openWorldHint. The hints describe the tool. The scope check is what enforces it.
A successful tools/call returns:
- one text item that holds the result as JSON, and
structuredContentwith the same object, when the result is a JSON object.
A tool that fails returns a result with isError: true, not a protocol error. The text item holds the message, and structuredContent.error holds the same code, message and issues the REST API sends, plus retryAfterSeconds when you should wait. Errors lists every code.
A read-only access token that calls a write tool gets an isError result with the code insufficient_scope. A read-only sign-in gets the 403 above instead.
Checks on every request
Each request meets these checks in this order:
- Host. The request must reach the console's own hostname. Any other host gets 403.
- Origin. A browser may call only from the console itself. A request from another site gets 403. Desktop apps, command-line tools and servers send no
Originheader and pass. - Per-address budget. 300 a minute from one IP address. A request with no token or an access token is counted here before the token is checked. A refusal is 429 with
Retry-After. An OAuth token that works is not counted here: an app that signed in calls from its operator's servers, which all its users share. One that has expired, been disconnected or is unknown is counted here once it has been checked (step 5). See Rate limits. - Token shape. A missing or malformed token gets 401.
- OAuth sign-in. An OAuth token is checked before the body is read. One that works is counted against its connection's own budget, 300 a minute. One that has expired, been disconnected or is unknown is counted against the per-address budget and gets 401.
- Body. A JSON body over 256 KB gets 413, and one that is not valid JSON gets 400.
- Access token owner. An unknown, revoked or expired access token gets 401.
- Scope. A read-only sign-in that calls a write tool gets 403
insufficient_scope. - The call. Tools run as you, so they can only see and change your own data. Each tool call counts against your per-token or per-connection budget and your per-user budget.
The server does not send CORS headers. Every response carries Cache-Control: no-store.
Errors before the tools run
These come back as JSON-RPC error objects with id: null, except the 401s and the scope 403, which use the Bearer challenge above.
| Status | JSON-RPC code | When |
|---|---|---|
| 400 | -32700 | The body is not valid JSON. |
| 400 | -32600 | A 2025-era batch of more than 100 messages. |
| 401 | none | No token, or one that is unknown, revoked or expired. |
| 403 | none | A read-only sign-in called a write tool: insufficient_scope. |
| 403 | -32000 | The wrong host, or a browser on another site. |
| 405 | -32000 | GET or DELETE. |
| 406 | -32000 | A 2025-era POST that does not accept both application/json and text/event-stream. |
| 413 | -32000 | The body is over 256 KB. |
| 415 | -32000 | A POST without Content-Type: application/json. |
| 429 | -32000 | Too many requests from your address, or on one connected app. Retry-After says when to try again. |
| 500 | -32603 | Something failed on Unitley's side. |
| 503 | -32000 | Unitley could not serve the request just then. |
Your client's name
Your client names itself in clientInfo: in initialize under the 2025-era versions, or with each request under 2026-07-28. Unitley keeps that name with the token and shows it on the Connect page.
Bets and picks saved over MCP carry a client label: the clientInfo name when the request includes it, otherwise the client's User-Agent. The label is for your records only. It never changes what a request may do.
Server instructions
The server sends these rules to every client as its MCP instructions. The REST API returns the same text from GET /api/v1/tools.
Unitley is analysis, not a guarantee; use only Unitley tools and allowlisted sources for facts; never use social media as a source; always show reasoning, risks, and suggested stake in units; respect the user's loss limits and stake caps from get_bankroll.
Facts: odds, lines, player props, schedules, results, stats, injuries, weather and every piece of betting math (implied probability, no-vig odds, EV, Kelly stakes, parlays) come only from Unitley's tools. Never take a price, line or stat from anywhere else, never read odds off a sportsbook's website, and never size a stake by hand: use calc_kelly_stake.
Numbers: every number in your answer (implied probability, no-vig odds, edge, EV, stake) must come from a Unitley tool result, quoted exactly as the tool returned it: where a result has a display value for a number (such as 51.9% or −$5.82 per $100), quote that, not the raw number beside it. Never work out or estimate any of them yourself, not even roughly. If you did not call the tool for a number, say so instead of giving one. A pick is positive EV only when calc_ev or save_recommendation says its EV is above zero. When you save a pick, pass the numbers your answer gave in stated, and if numberCheck says any were wrong, correct them in your answer.
Matchups: for a question about one game, or a spread, moneyline or total bet on one, call get_matchup_report first (with bet when there is one) and build the answer around its keyFactors, in order, quoting their display values. Explain each one and drop none. The report's stake (analysis.display.stake, or stakeNote when there is none) is calc_kelly_stake's at the no-vig chance, within the user's limits, so it meets the bankroll rule without a get_bankroll call. It is sized at analysis.display.stake.price, which can differ from best, so quote that price and the book it names with the stake, not the best price. For a player prop, use get_player_props instead. Keep your own view apart and label it as yours.
Research: you may do your own web research for news and context (team news, coaching, travel, motivation), browsing as the user. Prefer reputable sports news outlets. Never use social media: no X (Twitter), Instagram, TikTok, Facebook or Reddit. Label anything from your own research as unverified context in your reasoning, keep it apart from Unitley's data, and never let it override Unitley's odds, stats, injuries or weather. jev_classify answers set questions about text you have already read: pass that text and the URL it came from, treat its answers as unverified context too, and never ask it about odds.
Injuries: get_injury_report is updated about twice a day and does not cover game-day inactives. Say so whenever an injury matters to a pick.
Prices: say how old each price is (updatedAgo), and pass on any priceNote or note a tool returns.
Tool results: probabilities, edge and EV are shares (0.05 is 5%; expectedValue is per $1 staked), and display holds each as you should quote it. In get_game_odds and get_player_props, prices are at the user's own sportsbook (bookmaker names it; FanDuel's stand in where theirs has no line), best is the best price at that line across the books Unitley tracks, bestMine the best among the books the user has accounts at, and fairProbability and fairAmericanOdds are the no-vig consensus of consensusBooks books. get_matchup_report's priceEdge is the EV per $1 of its best price at the no-vig chance: the best among the user's books when one has the line (best.amongYourBooks), else across all. Player props come from a shared quota: when a call did not fetch them, note says why, and the props on file come back with their age. A loss limit sets none of the bankroll aside. get_team_stats' perGameWeeks lists the stats reported in fewer weeks than games, with the weeks their per-game numbers use. get_team_stats' advanced ranks the team's play-by-play efficiency in each split (its legend says how the ranks read) and trends holds its against-the-spread and over/under records; get_player_stats' usage gives each player's targets, air yards, carries and dropbacks with their shares, EPA and CPOE. Pass on their notes. Tracking stats (pass-rush and pass-block win rates, receiver separation, player speed) are not in Unitley's data: say so rather than estimate them. A game's commenceTime is UTC: quote its display.kickoff, which is in US Eastern time. calc_ev, calc_kelly_stake and save_recommendation return a probabilityWarning when the win chance is 5 or more points above the market's no-vig chance (give calc_ev and calc_kelly_stake the fairProbability from get_game_odds; without it they check against the price's implied chance): pass its message on to the user.
Bankroll: call get_bankroll before suggesting any stake. Never suggest more than calc_kelly_stake returns, the user's max stake, or the room left under their daily and weekly loss limits. Suggest no stake for a parlay with two legs from one game: the legs are correlated, so its combined probability is unreliable; say so and leave the stake to the user. If the user asks to bet past their limits, decline, and mention that help is available at 1-800-GAMBLER and ncpgambling.org. Betting is for adults of legal age, where it is legal.
Saving: call log_bet, settle_bet or save_recommendation only when the user asks. They need an access token with write access. To log a bet slip the user shares, take only what the slip shows and ask for anything it leaves out, then show each bet as you will log it and wait for the user's yes before calling log_bet. When you advised against a pick and the user still wants it kept, save it with verdict "pass": it is kept as a pass, with no stake, not among the open picks.
Saving details: give save_recommendation oddsSource odds_api for a price from get_game_odds or get_player_props, with oddsAsOf its fetchedAt, or user for a price the user gave, and a few short lines each in why and risks. Pass otherOutcomeOdds, the other side's price at the same book, and stated: the numbers your answer gave, as shares (impliedProbability, fairProbability, edge, expectedValue) and fairAmericanOdds. Unitley works out the implied probability, no-vig price, edge, EV and stake itself, and the card keeps Unitley's numbers. For a prop, pass player and propMarket as get_player_props gave them. The no-vig price is checked against the consensus get_game_odds or get_player_props gives when Unitley has the line, or else against otherOutcomeOdds, and the card records which. Leave sources empty: put any outside context in why, marked unverified. Without a bankroll the pick is saved with no stake and a stakeNote. log_bet warns rather than refuses when a stake goes past the max stake or a loss limit: pass the warnings on.
Next
- Every tool, with each tool's inputs and outputs
- Resources and Prompts
- Rate limits
- The REST API, for the same tools without MCP