{
  "markdown": "# AllRatesToday MCP Server — @allratestoday/mcp-server\n\n[![npm version](https://img.shields.io/npm/v/@allratestoday/mcp-server.svg)](https://www.npmjs.com/package/@allratestoday/mcp-server)\n[![npm downloads](https://img.shields.io/npm/dm/@allratestoday/mcp-server.svg)](https://www.npmjs.com/package/@allratestoday/mcp-server)\n[![license](https://img.shields.io/npm/l/@allratestoday/mcp-server.svg)](./LICENSE)\n[![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-1.x-blue.svg)](https://modelcontextprotocol.io)\n[![TypeScript](https://img.shields.io/badge/TypeScript-3178C6.svg)](https://www.typescriptlang.org/)\n\nEnglish | [简体中文](./README-zh-CN.md)\n\n**Give your AI assistant a live window into the foreign-exchange market. A Model Context Protocol server that lets Claude Code, Cursor, Claude Desktop, Windsurf, and any MCP-compatible client fetch real-time currency rates, historical series, and multi-currency lookups from the [AllRatesToday API](https://allratestoday.com).**\n\nAfter installation, your assistant can answer questions like:\n\n- *\"What's the current USD to EUR rate?\"*\n- *\"Show me how GBP/JPY moved over the last 30 days.\"*\n- *\"Convert 250 USD into CAD at a real rate.\"*\n- *\"Compare USD against EUR, GBP, and JPY simultaneously.\"*\n\n## 🚀 Why this server?\n\n- 📡 **Live mid-market rates** — 150+ ISO 4217 currencies, refreshed every ~60 seconds from institutional interbank data\n- 📈 **Historical series built in** — `1d` / `7d` / `30d` / `1y` windows with sensible granularity per period\n- 🧰 **Four focused tools** — `get_exchange_rate`, `get_historical_rates`, `get_rates_authenticated`, `list_currencies`; small surface, easy for the model to use correctly\n- 🔌 **Works everywhere MCP does** — stdio transport, MCP 1.x; Claude Code, Cursor, Claude Desktop, Windsurf, or any generic host\n- 🔓 **Works with no API key** — installs and answers out of the box from the open ECB reference table; a free key unlocks real-time rates for 160+ currencies\n- 🛡️ **Honest about what it returned** — every keyless answer says which rate it is and when it was published; API errors map to clear, actionable messages\n- 🔒 **Nothing leaks** — only the request parameters and your API key ever reach allratestoday.com; never conversation context\n\n## ⚖️ Mid-market vs official central-bank rates\n\nEverything this server returns is a **mid-market rate**: the live interbank midpoint, refreshed every ~60 seconds — the right number for price display, conversion, and anything that should track the market. It is *not* the official rate a tax authority or auditor may require. For those, AllRatesToday also serves **published central-bank and tax-authority rates** (100+ sources — ECB, Fed, HMRC, US Treasury, …) that are fixed once published and carry the institution's own publication date — via the [central bank REST API](https://allratestoday.com/docs/#central-bank) and [per-bank npm SDKs](https://allratestoday.com/central-bank-rates-api/). The two can diverge by several percent, so pick by use case, not convenience.\n\n## 🔓 Keyless mode — what works with no setup\n\nInstall it with no configuration at all and it starts, connects, and answers:\n\n| Tool | Keyless | What you get |\n|---|---|---|\n| `get_exchange_rate` | ✅ | Official **ECB daily reference rate**, ~30 major currencies. The response carries `rate_date` and a note saying so, so the assistant never passes it off as a live quote. |\n| `list_currencies` | ✅ | All 160+ supported ISO 4217 codes. |\n| `get_historical_rates` | 🔑 | Returns one sentence explaining how to get a free key. |\n| `get_rates_authenticated` | 🔑 | Same. |\n\nThe keyless path reads the open, edge-cached `/api/open/central-bank/ecb`\nendpoint — no upstream cost, no rate limit to trip over, nothing to sign up for.\n\n## 🔑 Get your API key (free)\n\nA key unlocks **real-time mid-market rates across 160+ currencies**, historical\nseries, and multi-target / point-in-time lookups. The free tier is enough for\ndevelopment and personal use — **no credit card required**.\n\n1. Register at [allratestoday.com/register](https://allratestoday.com/register) — 30 seconds\n2. Verify your email\n3. Copy your key from the dashboard (format: `art_live_xxxxx`)\n4. Use it as `ALLRATES_API_KEY` in the configs below\n\nWithout one the server prints a short summary of keyless mode on stderr and\nkeeps running — it never exits, because an MCP server that exits breaks the\nhost client's whole configuration.\n\n## 🧩 Easiest install: the Claude Code plugin\n\nIf you use Claude Code, install the plugin instead of configuring this server by\nhand — it bundles both AllRatesToday MCP servers, two skills, and five slash\ncommands (`/rate`, `/convert`, `/official-rate`, `/fx-history`,\n`/add-currency-support`):\n\n```\n/plugin marketplace add AllRates-Today/claude-code-plugin\n/plugin install allratestoday@allratestoday\n```\n\nEverything below still applies for other MCP clients.\n\n## ☁️ Hosted endpoint — nothing to install\n\nThe same tools also run as a hosted **Streamable HTTP** MCP server (together with the tools of the sibling AllRatesToday server, nine in total). Paste the URL into any client that supports remote MCP — Claude.ai and Claude Desktop connectors, ChatGPT, Cursor, VS Code, Codex, Gemini CLI:\n\n```\nhttps://allratestoday.com/api/mcp\n```\n\n```bash\nclaude mcp add --transport http allratestoday https://allratestoday.com/api/mcp\n```\n\nWorks keyless. With a key, send `Authorization: Bearer art_live_…` or, where the client only takes a URL, connect to `https://allratestoday.com/api/mcp?api_key=art_live_…`. Registry name: `com.allratestoday/mcp`. One-click Cursor / VS Code buttons: https://allratestoday.com/mcp/#hosted\n\n## 📦 Installation\n\nThe simplest install is **zero-install via `npx`**, which is what every config below uses:\n\n```bash\n# Run without installing (recommended)\nnpx -y @allratestoday/mcp-server\n```\n\n```bash\n# Or install globally\nnpm install -g @allratestoday/mcp-server\nallratestoday-mcp\n```\n\nBoth commands launch the stdio MCP server and wait for a client to connect — they're not meant to be run interactively from your shell; your MCP client launches them as a subprocess.\n\n## 🏁 Quick setup per client\n\nEach client reads MCP servers from a different config file. Pick yours below.\n\n### Claude Code\n\nThe fastest path uses the built-in CLI:\n\n```bash\nclaude mcp add allratestoday -- npx -y @allratestoday/mcp-server\nclaude mcp env allratestoday ALLRATES_API_KEY=art_live_xxxxx\n```\n\nRestart Claude Code. Verify by asking it: *\"What's the current USD to EUR rate?\"*\n\n### Cursor\n\nEdit `~/.cursor/mcp.json` (or `.cursor/mcp.json` inside your project for project-scoped servers):\n\n```json\n{\n  \"mcpServers\": {\n    \"allratestoday\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@allratestoday/mcp-server\"],\n      \"env\": {\n        \"ALLRATES_API_KEY\": \"art_live_xxxxx\"\n      }\n    }\n  }\n}\n```\n\nRestart Cursor. The four tools should appear in the MCP tool picker.\n\n### Claude Desktop\n\nEdit the config file (path depends on OS):\n\n| OS | Path |\n|---|---|\n| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| Windows | `%APPDATA%\\Claude\\claude_desktop_config.json` |\n| Linux | `~/.config/Claude/claude_desktop_config.json` |\n\n```json\n{\n  \"mcpServers\": {\n    \"allratestoday\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@allratestoday/mcp-server\"],\n      \"env\": {\n        \"ALLRATES_API_KEY\": \"art_live_xxxxx\"\n      }\n    }\n  }\n}\n```\n\n**Fully quit and reopen Claude Desktop** (Cmd+Q on macOS, right-click tray icon → Exit on Windows). Closing the window alone keeps the old config loaded.\n\n### Windsurf\n\nEdit `~/.codeium/windsurf/mcp_config.json` with the same `mcpServers` block as above, then restart Windsurf.\n\n### Generic stdio MCP client\n\nAny MCP host that supports stdio transport works. The launch command is:\n\n```\nnpx -y @allratestoday/mcp-server\n```\n\n…with the environment variable `ALLRATES_API_KEY` set. The protocol version is MCP 1.x.\n\n## ✅ Verify it works\n\nAfter configuring your client, test in this order:\n\n1. **Server starts** — open the client. A red dot or \"failed to connect\" means the API key is missing or wrong (see Troubleshooting below).\n2. **Tools are listed** — most clients have a \"tools\" or \"MCP\" panel showing the four tools.\n3. **A live call returns a number** — ask: *\"What's the current USD to EUR rate?\"* The assistant should call `get_exchange_rate(source: \"USD\", target: \"EUR\")` and reply with a real rate. If it fabricates a number without a tool call, the server isn't connected.\n\n## 📚 Tools reference\n\n- [`get_exchange_rate`](#get_exchange_rate) — current rate for one pair\n- [`get_historical_rates`](#get_historical_rates) — time series over a preset period\n- [`get_rates_authenticated`](#get_rates_authenticated) — multiple targets in one call, optional point-in-time\n- [`list_currencies`](#list_currencies) — all supported currency codes, names, symbols\n\nAll four tools require `ALLRATES_API_KEY`.\n\n---\n\n### `get_exchange_rate`\n\nCurrent mid-market rate between two currencies.\n\n**Input**\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `source` | string | yes | 3-letter ISO 4217 code, e.g. `USD` |\n| `target` | string | yes | 3-letter ISO 4217 code, e.g. `EUR` |\n\n**Example call**\n\n```json\n{ \"source\": \"USD\", \"target\": \"EUR\" }\n```\n\n**Response:**\n\n```json\n{ \"rate\": 0.92145, \"source\": \"wise\" }\n```\n\n### `get_historical_rates`\n\nTime-series data points for a currency pair over a fixed period.\n\n**Input**\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `source` | string | yes | Source currency code |\n| `target` | string | yes | Target currency code |\n| `period` | string | no (default `7d`) | One of `1d`, `7d`, `30d`, `1y` |\n\n**Granularity by period**\n\n| `period` | Data points |\n|---|---|\n| `1d` | Hourly (24 points) |\n| `7d` | Daily (7 points) |\n| `30d` | Daily (30 points) |\n| `1y` | Weekly (52 points) |\n\n**Example call**\n\n```json\n{ \"source\": \"USD\", \"target\": \"INR\", \"period\": \"30d\" }\n```\n\n**Response (truncated):**\n\n```json\n{\n  \"source\": \"USD\",\n  \"target\": \"INR\",\n  \"period\": \"30d\",\n  \"data\": [\n    { \"date\": \"2026-03-27T00:00:00Z\", \"rate\": 83.42, \"timestamp\": 1743033600000 },\n    { \"date\": \"2026-03-28T00:00:00Z\", \"rate\": 83.51, \"timestamp\": 1743120000000 },\n    \"...\"\n  ]\n}\n```\n\n### `get_rates_authenticated`\n\nMultiple targets in one call, with optional historical timestamp or grouping window.\n\n**Input**\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `source` | string | yes | Source currency code |\n| `target` | string | yes | One or more codes, comma-separated (`EUR,GBP,JPY`) |\n| `time` | string (ISO 8601) | no | Historical point in time |\n| `group` | string | no | One of `hour`, `day`, `week`, `month` |\n\n**Example call**\n\n```json\n{ \"source\": \"USD\", \"target\": \"EUR,GBP,JPY\" }\n```\n\n**Response:**\n\n```json\n[\n  { \"rate\": 0.9214, \"source\": \"USD\", \"target\": \"EUR\", \"time\": \"2026-04-26T11:00:00Z\" },\n  { \"rate\": 0.7891, \"source\": \"USD\", \"target\": \"GBP\", \"time\": \"2026-04-26T11:00:00Z\" },\n  { \"rate\": 151.34, \"source\": \"USD\", \"target\": \"JPY\", \"time\": \"2026-04-26T11:00:00Z\" }\n]\n```\n\n### `list_currencies`\n\nAll supported currencies with codes, names, and symbols. Cached upstream for 24 hours — cheap to call for validating user input before the other tools.\n\n**Input** — none.\n\n**Response (truncated):**\n\n```json\n{\n  \"currencies\": [\n    { \"code\": \"USD\", \"name\": \"US Dollar\", \"symbol\": \"$\" },\n    { \"code\": \"EUR\", \"name\": \"Euro\", \"symbol\": \"€\" },\n    { \"code\": \"GBP\", \"name\": \"British Pound\", \"symbol\": \"£\" },\n    \"...\"\n  ],\n  \"count\": 162\n}\n```\n\n---\n\n## ⚙️ Environment variables\n\n| Variable | Default | Required | Purpose |\n|---|---|---|---|\n| `ALLRATES_API_KEY` | — | no | Your API key. Unset ⇒ keyless mode (see above); set ⇒ real-time rates and the historical tools. |\n| `ALLRATES_BASE_URL` | `https://allratestoday.com/api` | no | Override for self-hosted or staging deployments. |\n\nSet these in your MCP client's config (in the `env` block) — not in your shell — because MCP servers are launched as subprocesses with isolated environments.\n\n## 💳 Plans\n\nA free tier and paid plans are available — see [allratestoday.com/pricing](https://allratestoday.com/pricing) for current quotas. All plans include the same currency coverage and historical depth; only the request quotas differ.\n\n## 🛠️ Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| Client shows \"MCP server failed to start\" or red dot | Not a missing key — 0.5.0+ starts fine without one. Usually `npx` cannot reach the registry, or Node is older than 18 | Run `npx -y @allratestoday/mcp-server` in a shell and read stderr |\n| Rates look like yesterday's, response mentions \"keyless mode\" | No key set, so answers come from the ECB daily reference table | Set `ALLRATES_API_KEY` for real-time mid-market rates |\n| Every call returns \"Invalid AllRatesToday API key\" | Key is malformed (missing prefix, truncated, or revoked) | Copy a fresh key from the dashboard |\n| Tools return \"AllRatesToday API quota exceeded\" | Monthly limit hit | Wait until next month or upgrade plan |\n| Historical tool returns \"Bad request\" | Invalid period or unknown currency code | Period must be `1d`/`7d`/`30d`/`1y`; codes must be 3 letters |\n| Server starts but tools never appear | Client didn't reload after config change | Fully quit (not just close) and reopen the client |\n| `npx` runs but hangs forever | The server is waiting for an MCP client to connect — normal when run from a shell | Let your MCP client launch it |\n\nTo inspect what the server is doing, run it manually with the key set:\n\n```bash\nALLRATES_API_KEY=art_live_xxxxx npx -y @allratestoday/mcp-server\n```\n\nNo output means healthy (stdio is reserved for the MCP protocol); errors print to stderr.\n\n## 🛡️ Error reference\n\nThe server maps API errors to clear, actionable messages the assistant can relay to the user:\n\n| HTTP status | Meaning | Tool error message |\n|---|---|---|\n| 200 | Success | (rate returned) |\n| 400 | Bad request — usually unknown currency code | `Bad request — possibly an unknown currency code` |\n| 401 | Invalid or missing API key | `Invalid AllRatesToday API key` |\n| 429 | Quota exceeded | `AllRatesToday API quota exceeded` |\n| 5xx | Server-side issue at allratestoday.com | `HTTP 5xx — <upstream message>` |\n\n## ❓ FAQ\n\n**Is the free plan really enough for normal use?**\nYes for personal/dev use. Heavy interactive use, multiple chat sessions per day, or production should consider the paid tiers.\n\n**Do you store my conversation or query data?**\nNo. Only your API key and the request parameters (source, target, period, time) are sent to allratestoday.com — never the LLM's conversation context.\n\n**What happens to my API key?**\nIt's only sent as a `Bearer` token in the `Authorization` header on requests to the AllRatesToday API. It's never logged or transmitted elsewhere.\n\n**Why is my first call slow?**\nCold-start of `npx` (first run downloads the package) plus the initial cache miss. Subsequent calls are typically <200ms.\n\n**Can I run this without npm/Node?**\nNot currently — Node ≥18 is required. If a standalone binary matters to you, open an issue.\n\n**Is there a self-hosted option?**\nSet `ALLRATES_BASE_URL` to your own AllRatesToday instance. Contact support@allratestoday.com for self-hosted licensing.\n\n**Does this work with ChatGPT?**\nMCP works with any MCP-compatible client. ChatGPT Desktop has experimental MCP support; check OpenAI's docs for current status.\n\n## 👩‍💻 Development\n\n```bash\ngit clone https://github.com/cahthuranag/mcp-server.git\ncd mcp-server\nnpm install\nnpm run build\nALLRATES_API_KEY=art_live_xxxxx node dist/index.js\n```\n\nThe server runs on stdio and waits for an MCP client to connect; Ctrl+C to exit. `npm run dev` watches and rebuilds. To test against a local AllRatesToday instance:\n\n```bash\nALLRATES_BASE_URL=http://localhost:8080/api ALLRATES_API_KEY=test_key node dist/index.js\n```\n\n**Project structure**\n\n```\nsrc/\n├── index.ts      # MCP server, tool registration, request handlers\n└── client.ts     # HTTP client for AllRatesToday API + error mapping\ndist/             # Compiled JS (gitignored)\nserver.json       # MCP registry manifest\n```\n\n**Contributing** — issues and PRs welcome at [github.com/cahthuranag/mcp-server](https://github.com/cahthuranag/mcp-server). Before opening a PR: `npm run build` must succeed, test against a real API key, and update the tool descriptions in `src/index.ts` plus this README's tools reference if you change tool behavior.\n\n## 📝 Changelog\n\nSee [GitHub Releases](https://github.com/cahthuranag/mcp-server/releases) for the full list. Recent highlights:\n\n- **0.5.0** — Keyless mode: the server starts and answers without an API key (`get_exchange_rate` via the open ECB reference table, `list_currencies` unchanged); metered tools return actionable sign-up guidance instead of the process exiting\n- **0.4.x** — README overhaul; registry metadata updates\n- **0.3.x** — API key required for all tools; fail-fast at startup with clear error\n- **0.2.x** — Removed news tool, required auth on `get_historical_rates`\n- **0.1.x** — Initial release with 5 tools\n\n## 🔗 Links\n\n- [API documentation](https://allratestoday.com/docs/) · [Interactive reference](https://allratestoday.com/api-reference/)\n- [Register (free)](https://allratestoday.com/register) · [Pricing](https://allratestoday.com/pricing)\n- [MCP protocol docs](https://modelcontextprotocol.io)\n- [GitHub](https://github.com/cahthuranag/mcp-server) · [Bug reports](https://github.com/cahthuranag/mcp-server/issues)\n- Support: [support@allratestoday.com](mailto:support@allratestoday.com)\n\n## 📜 License\n\nMIT — see [LICENSE](./LICENSE).\n",
  "bytes": 17605,
  "sha": "e55be84b09f7a65d9198bc8ab69d34c47287dd49492a064a99f3fafcfaf7c747",
  "repo_slug": "allrates-today/mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_allratestoday_mcp_d229a9be/readme"
}