FundingScope MCP
# FundingScope MCP
**Live crypto funding data for AI agents.** A hosted [Model Context Protocol](https://modelcontextprotocol.io) server that answers the questions a perp trader actually asks: where is funding paying, how much annualised, how much can I move before slippage, and is the token behind it safe.
- **Endpoint:** `https://fundingscope.tech/mcp` (Streamable HTTP, JSON-RPC 2.0)
- **Auth:** `X-API-Key: <your key>` — free trial key, 1 000 calls, no card
- **Exchanges:** Binance, Bybit, OKX (perpetual funding, tickers, order books)
- **Human pages:** <https://fundingscope.tech/tools>
This repository is the public documentation and client-config home of the hosted server. The server itself runs on our infrastructure; nothing here needs to be installed to use it.
It also contains a **stdio bridge** (`src/fundingscope_mcp`, `Dockerfile`, `pyproject.toml`): a 200-line, dependency-free package that lets stdio-only clients and MCP catalogs talk to the hosted endpoint. The tool catalog is answered locally from `tools.json`, so listing the server never depends on the network; only `tools/call` goes upstream.
## Why it exists
Funding rates are the cheapest edge in crypto and the most annoying to collect: three exchanges, three payload shapes, different funding intervals (4h on OKX for some pairs, 8h on Binance, 1h for a few), and a rate that means nothing until you annualise it. Handing that to an agent normally produces a mess of ad-hoc HTTP calls and arithmetic errors. This server does the normalisation once and returns one comparable number.
## Tools
| Tool | Cost | What it returns |
| --- | --- | --- |
| `funding_rates` | 1 | Current rate, next funding time and annualised % for the symbols you name, per exchange |
| `funding_spread` | 3 | Pairs ranked by annualised spread between the best-paying venue and the cheapest, with volume filter and outlier cutoff |
| `basis` | 1 | Perp price vs spot index, the basis in % and annualised — the other half of a carry trade |
| `open_interest` | 2 | Open interest per venue plus the long/short ratio where the exchange publishes it |
| `vwap` | 2 | Walks the real order book for a notional size and returns the execution VWAP and slippage in bps |
| `token_risk` | 2 | Ticker or contract address → safety verdict (GoPlus): mintable, pausable, proxy, owner share, holder concentration |
| `token_security` | 3 | Contract address → raw security facts plus a rule-based risk level |
| `cbr_rates` | 1 | Official Bank of Russia rates for a date (nominal handled: JPY and KZT quote per 100) |
| `steam_price` | 2 | Steam store price by name, app id or link, per region |
| `ping` | 1 | Health check that also echoes your quota |
Costs are in units; every plan includes all tools. See [pricing](https://fundingscope.tech/#pricing).
## Install
### Claude Code
```bash
claude mcp add --transport http fundingscope \
https://fundingscope.tech/mcp \
--header "X-API-Key: cd_trial_your_key"
```
### Cursor / any client that reads `mcp.json`
```json
{
"mcpServers": {
"fundingscope": {
"url": "https://fundingscope.tech/mcp",
"headers": { "X-API-Key": "cd_trial_your_key" }
}
}
}
```
### Any client, raw JSON-RPC
```bash
curl -s https://fundingscope.tech/mcp \
-H 'Content-Type: application/json' \
-H 'X-API-Key: cd_trial_your_key' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"funding_spread","arguments":{"limit":5}}}'
```
`initialize`, `tools/list`, `tools/call` and `ping` are all supported, so any spec-compliant client works without a wrapper.
### stdio clients (Claude Desktop, catalogs that only speak stdio)
```bash
docker build -t fundingscope-mcp .
docker run -i --rm -e FUNDINGSCOPE_API_KEY=cd_trial_your_key fundingscope-mcp
```
Claude Desktop entry (`claude_desktop_config.json`):
```json
{
"mcpServers": {
"fundingscope": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "FUNDINGSCOPE_API_KEY", "fundingscope-mcp"],
"env": { "FUNDINGSCOPE_API_KEY": "cd_trial_your_key" }
}
}
}
```
From source, no Docker and no dependencies (Python 3.9+):
```bash
pip install -e .
FUNDINGSCOPE_API_KEY=cd_trial_your_key fundingscope-mcp
```
The bridge (`python -m fundingscope_mcp`) answers `initialize`, `ping` and `tools/list` from the bundled `tools.json`, forwards everything else to `https://fundingscope.tech/mcp`, and rewrites the response `id` so clients always see their own. `FUNDINGSCOPE_URL` points it at another deployment, `FUNDINGSCOPE_TIMEOUT` (seconds, default 45) caps an upstream call.
Note that catalogs usually run introspection with no key: `tools/list` works anonymously, `tools/call` returns the standard "get a free key" error pointing at the sign-in page.
## Getting a key
1. Open <https://fundingscope.tech/auth/login> and sign in with Telegram (email and OAuth are being wired up).
2. Press **Get a free key** — 1 000 calls, valid 7 days, no card, one per account.
3. Copy the `cd_trial_…` key into `X-API-Key`.
Plans: trial 0, free 0, pro $19/25 000 units, desk $49/250 000, team $99/1 000 000. Paid top-ups are USDT (TRC-20) with a watcher that credits the balance on confirmation.
## REST fallback
Same data, one HTTP call, no protocol:
```bash
curl -s -X POST https://fundingscope.tech/v1/tools/funding_spread \
-H 'Content-Type: application/json' -H 'X-API-Key: cd_trial_your_key' \
-d '{"args":{"limit":5}}'
```
`GET /v1/tools` lists every tool with its parameters, `GET /v1/plans` the plans, `GET /health` liveness.
## Notes on the data
- Everything comes from public exchange endpoints; no user accounts, no trading keys, no order placement. The server is read-only by design.
- Responses carry `as_of` timestamps, and per-exchange `errors` are reported instead of being silently swallowed — if OKX times out you see it, not a quietly shorter list.
- Figures that cannot be computed honestly (missing order book, unknown funding interval) are returned as `null` with a reason, never as a plausible-looking guess.
## Development
```bash
pip install -e . pytest
python -m pytest -q # 10 tests, no network: a stub HTTP server stands in for the endpoint
python sync_tools.py # refresh src/fundingscope_mcp/tools.json from the live endpoint
```
The bridge is stdlib-only on purpose: a Docker image that builds in seconds and cannot rot when a transitive dependency moves.
## License
MIT for this repository's contents. The hosted service is proprietary; use of the endpoint is governed by the terms on the site.
TDQS
Scored across 10 tools
Most tools target a clear, distinct data product (funding rates, cross-exchange spread ranking, basis, open interest, execution VWAP), and their descriptions spell out the different arguments and outputs. The one genuinely confusable pair is token_risk (DEX pair liquidity/volume screening) versus token_security (GoPlus contract audit) — both take a token address and return risk flags, so an agent may pick the wrong one; funding_rates vs funding_spread is a milder near-overlap but readable from the descriptions.
Every tool is lowercase snake_case, mostly a noun or noun_compound (funding_rates, funding_spread, open_interest, token_risk, cbr_rates), with only the conventional single-word 'ping' and 'basis'/'vwap' as short forms. No camelCase/snake_case mixing and no competing verb styles, so the pattern is fully predictable.
Ten read-only tools sit squarely in the well-scoped range, and each covers a distinct market-data product (funding, basis, OI, execution cost, token risk/security) or a discrete lookup (FX rates, Steam prices, health). Nothing looks redundant or padded.
For a funding/derivatives analytics surface it covers the core spot-vs-perp picture but has notable gaps: no historical/time-series funding or OI, no supported-symbols/exchange listing, no liquidation or volume/depth data beyond a single notional VWAP. The inclusion of cbr_rates and steam_price also makes the domain a grab-bag, so coverage of the broader 'data lookup' purpose is partial.