@allratestoday/mcp-server 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,14 @@
1
- # AllRatesToday MCP Server
1
+ # AllRatesToday MCP Server — @allratestoday/mcp-server
2
2
 
3
- [![Powered by AllRatesToday](https://img.shields.io/badge/Powered%20by-AllRatesToday-orange.svg)](https://allratestoday.com)
4
-
5
- [![npm version](https://img.shields.io/npm/v/@allratestoday/mcp-server.svg?style=flat-square)](https://www.npmjs.com/package/@allratestoday/mcp-server)
6
- [![npm downloads](https://img.shields.io/npm/dm/@allratestoday/mcp-server.svg?style=flat-square)](https://www.npmjs.com/package/@allratestoday/mcp-server)
7
- [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](./LICENSE)
8
- [![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-1.x-blue.svg?style=flat-square)](https://modelcontextprotocol.io)
3
+ [![npm version](https://img.shields.io/npm/v/@allratestoday/mcp-server.svg)](https://www.npmjs.com/package/@allratestoday/mcp-server)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@allratestoday/mcp-server.svg)](https://www.npmjs.com/package/@allratestoday/mcp-server)
5
+ [![license](https://img.shields.io/npm/l/@allratestoday/mcp-server.svg)](./LICENSE)
6
+ [![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-1.x-blue.svg)](https://modelcontextprotocol.io)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6.svg)](https://www.typescriptlang.org/)
9
8
 
10
9
  English | [简体中文](./README-zh-CN.md)
11
10
 
12
- > Give your AI coding assistant a live window into the foreign-exchange market.
13
-
14
- A Model Context Protocol server that lets **Claude Code**, **Cursor**, **Claude Desktop**, **Windsurf**, and any other MCP-compatible client fetch real-time currency rates, historical data, and multi-currency lookups from the [AllRatesToday API](https://allratestoday.com).
11
+ **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).**
15
12
 
16
13
  After installation, your assistant can answer questions like:
17
14
 
@@ -19,50 +16,17 @@ After installation, your assistant can answer questions like:
19
16
  - *"Show me how GBP/JPY moved over the last 30 days."*
20
17
  - *"Convert 250 USD into CAD at a real rate."*
21
18
  - *"Compare USD against EUR, GBP, and JPY simultaneously."*
22
- - *"List every supported currency."*
23
-
24
- ---
25
-
26
- ## Table of contents
27
-
28
- - [What you get](#what-you-get)
29
- - [Get an API key (required)](#get-an-api-key-required)
30
- - [Install](#install)
31
- - [Quick setup per client](#quick-setup-per-client)
32
- - [Claude Code](#claude-code)
33
- - [Cursor](#cursor)
34
- - [Claude Desktop](#claude-desktop)
35
- - [Windsurf](#windsurf)
36
- - [Generic stdio MCP client](#generic-stdio-mcp-client)
37
- - [Verify it works](#verify-it-works)
38
- - [Tools reference](#tools-reference)
39
- - [Environment variables](#environment-variables)
40
- - [Plans and limits](#plans-and-limits)
41
- - [Troubleshooting](#troubleshooting)
42
- - [Error reference](#error-reference)
43
- - [FAQ](#faq)
44
- - [Development](#development)
45
- - [Changelog](#changelog)
46
- - [Support](#support)
47
- - [License](#license)
48
-
49
- ---
50
-
51
- ## What you get
52
19
 
53
- | Capability | Detail |
54
- |---|---|
55
- | **Currencies** | 150+ ISO 4217 codes, all major and most exotics |
56
- | **Update frequency** | Mid-market rates refresh every ~60 seconds |
57
- | **Data source** | Tier-1 financial data providers (Reuters / Refinitiv-class) |
58
- | **Historical depth** | Up to 1 year via `1d` / `7d` / `30d` / `1y` granularity |
59
- | **Tools exposed** | 4 — `get_exchange_rate`, `get_historical_rates`, `get_rates_authenticated`, `list_currencies` |
60
- | **Transport** | stdio (subprocess), MCP 1.x compatible |
61
- | **Runtime** | Node.js ≥18 |
20
+ ## 🚀 Why this server?
62
21
 
63
- ---
22
+ - 📡 **Live mid-market rates** — 150+ ISO 4217 currencies, refreshed every ~60 seconds from institutional interbank data
23
+ - 📈 **Historical series built in** — `1d` / `7d` / `30d` / `1y` windows with sensible granularity per period
24
+ - 🧰 **Four focused tools** — `get_exchange_rate`, `get_historical_rates`, `get_rates_authenticated`, `list_currencies`; small surface, easy for the model to use correctly
25
+ - 🔌 **Works everywhere MCP does** — stdio transport, MCP 1.x; Claude Code, Cursor, Claude Desktop, Windsurf, or any generic host
26
+ - 🛡️ **Fail-fast and honest** — refuses to start without a key, maps API errors to clear actionable messages the assistant can relay
27
+ - 🔒 **Nothing leaks** — only the request parameters and your API key ever reach allratestoday.com; never conversation context
64
28
 
65
- ## Get an API key (required)
29
+ ## 🔑 Get your API key
66
30
 
67
31
  The server **will not start** without a valid `ALLRATES_API_KEY`. A free key is enough for development and personal use — **no credit card required**.
68
32
 
@@ -71,28 +35,26 @@ The server **will not start** without a valid `ALLRATES_API_KEY`. A free key is
71
35
  3. Copy your key from the dashboard (format: `art_live_xxxxx`)
72
36
  4. Use it as `ALLRATES_API_KEY` in the configs below
73
37
 
74
- If you forget, the server prints clear registration instructions on stderr and exits with code 1.
75
-
76
- ---
38
+ If you forget, the server prints registration instructions on stderr and exits with code 1.
77
39
 
78
- ## Install
40
+ ## 📦 Installation
79
41
 
80
- The server is published as an npm package. The simplest install is **zero-install via `npx`**, which is what every config below uses.
42
+ The simplest install is **zero-install via `npx`**, which is what every config below uses:
81
43
 
82
44
  ```bash
83
45
  # Run without installing (recommended)
84
46
  npx -y @allratestoday/mcp-server
47
+ ```
85
48
 
49
+ ```bash
86
50
  # Or install globally
87
51
  npm install -g @allratestoday/mcp-server
88
52
  allratestoday-mcp
89
53
  ```
90
54
 
91
- Both commands launch the stdio MCP server and wait for a client to connect. They're not meant to be run directly from your shell your MCP client launches them as a subprocess.
92
-
93
- ---
55
+ Both 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.
94
56
 
95
- ## Quick setup per client
57
+ ## 🏁 Quick setup per client
96
58
 
97
59
  Each client reads MCP servers from a different config file. Pick yours below.
98
60
 
@@ -155,23 +117,7 @@ Edit the config file (path depends on OS):
155
117
 
156
118
  ### Windsurf
157
119
 
158
- Edit `~/.codeium/windsurf/mcp_config.json`:
159
-
160
- ```json
161
- {
162
- "mcpServers": {
163
- "allratestoday": {
164
- "command": "npx",
165
- "args": ["-y", "@allratestoday/mcp-server"],
166
- "env": {
167
- "ALLRATES_API_KEY": "art_live_xxxxx"
168
- }
169
- }
170
- }
171
- }
172
- ```
173
-
174
- Restart Windsurf.
120
+ Edit `~/.codeium/windsurf/mcp_config.json` with the same `mcpServers` block as above, then restart Windsurf.
175
121
 
176
122
  ### Generic stdio MCP client
177
123
 
@@ -183,32 +129,25 @@ npx -y @allratestoday/mcp-server
183
129
 
184
130
  …with the environment variable `ALLRATES_API_KEY` set. The protocol version is MCP 1.x.
185
131
 
186
- ---
187
-
188
- ## Verify it works
132
+ ## ✅ Verify it works
189
133
 
190
134
  After configuring your client, test in this order:
191
135
 
192
- 1. **Server starts** — open the client. If the MCP integration shows a red dot or "failed to connect", the API key is missing or wrong (see [Troubleshooting](#troubleshooting)).
193
-
194
- 2. **Tools are listed** — most clients have a "tools" or "MCP" panel. You should see:
195
- - `get_exchange_rate`
196
- - `get_historical_rates`
197
- - `get_rates_authenticated`
198
- - `list_currencies`
136
+ 1. **Server starts** — open the client. A red dot or "failed to connect" means the API key is missing or wrong (see Troubleshooting below).
137
+ 2. **Tools are listed** — most clients have a "tools" or "MCP" panel showing the four tools.
138
+ 3. **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.
199
139
 
200
- 3. **A live call returns a number** — ask the assistant:
140
+ ## 📚 Tools reference
201
141
 
202
- > *What's the current USD to EUR rate?*
142
+ - [`get_exchange_rate`](#get_exchange_rate) current rate for one pair
143
+ - [`get_historical_rates`](#get_historical_rates) — time series over a preset period
144
+ - [`get_rates_authenticated`](#get_rates_authenticated) — multiple targets in one call, optional point-in-time
145
+ - [`list_currencies`](#list_currencies) — all supported currency codes, names, symbols
203
146
 
204
- The assistant will call `get_exchange_rate(source: "USD", target: "EUR")` and reply with a real rate (e.g. `"USD to EUR is currently 0.9214."`). If it fabricates a number without making a tool call, the server isn't connected.
147
+ All four tools require `ALLRATES_API_KEY`.
205
148
 
206
149
  ---
207
150
 
208
- ## Tools reference
209
-
210
- All four tools require `ALLRATES_API_KEY`.
211
-
212
151
  ### `get_exchange_rate`
213
152
 
214
153
  Current mid-market rate between two currencies.
@@ -226,7 +165,7 @@ Current mid-market rate between two currencies.
226
165
  { "source": "USD", "target": "EUR" }
227
166
  ```
228
167
 
229
- **Example response**
168
+ **Response:**
230
169
 
231
170
  ```json
232
171
  { "rate": 0.92145, "source": "wise" }
@@ -259,7 +198,7 @@ Time-series data points for a currency pair over a fixed period.
259
198
  { "source": "USD", "target": "INR", "period": "30d" }
260
199
  ```
261
200
 
262
- **Example response (truncated)**
201
+ **Response (truncated):**
263
202
 
264
203
  ```json
265
204
  {
@@ -293,7 +232,7 @@ Multiple targets in one call, with optional historical timestamp or grouping win
293
232
  { "source": "USD", "target": "EUR,GBP,JPY" }
294
233
  ```
295
234
 
296
- **Example response**
235
+ **Response:**
297
236
 
298
237
  ```json
299
238
  [
@@ -305,11 +244,11 @@ Multiple targets in one call, with optional historical timestamp or grouping win
305
244
 
306
245
  ### `list_currencies`
307
246
 
308
- All supported currencies with codes, names, and symbols. Cached upstream for 24 hours.
247
+ All supported currencies with codes, names, and symbols. Cached upstream for 24 hours — cheap to call for validating user input before the other tools.
309
248
 
310
249
  **Input** — none.
311
250
 
312
- **Example response (truncated)**
251
+ **Response (truncated):**
313
252
 
314
253
  ```json
315
254
  {
@@ -325,49 +264,41 @@ All supported currencies with codes, names, and symbols. Cached upstream for 24
325
264
 
326
265
  ---
327
266
 
328
- ## Environment variables
267
+ ## ⚙️ Environment variables
329
268
 
330
269
  | Variable | Default | Required | Purpose |
331
270
  |---|---|---|---|
332
271
  | `ALLRATES_API_KEY` | — | **yes** | Your API key. The server exits at startup if unset. |
333
272
  | `ALLRATES_BASE_URL` | `https://allratestoday.com/api` | no | Override for self-hosted or staging deployments. |
334
273
 
335
- You set 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.
336
-
337
- ---
338
-
339
- ## Plans
274
+ Set 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.
340
275
 
341
- A 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.
276
+ ## 💳 Plans
342
277
 
343
- ---
278
+ A 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.
344
279
 
345
- ## Troubleshooting
280
+ ## 🛠️ Troubleshooting
346
281
 
347
282
  | Symptom | Likely cause | Fix |
348
283
  |---|---|---|
349
284
  | Client shows "MCP server failed to start" or red dot | `ALLRATES_API_KEY` not set or invalid | Verify the key in your client config; check it matches the dashboard |
350
- | Tools show but every call returns "Invalid AllRatesToday API key" | Key is malformed (missing prefix, truncated, or revoked) | Copy a fresh key from the dashboard |
351
- | Tools return "AllRatesToday API quota exceeded" | Free-tier monthly limit hit | Wait until next month or upgrade plan |
285
+ | Every call returns "Invalid AllRatesToday API key" | Key is malformed (missing prefix, truncated, or revoked) | Copy a fresh key from the dashboard |
286
+ | Tools return "AllRatesToday API quota exceeded" | Monthly limit hit | Wait until next month or upgrade plan |
352
287
  | Historical tool returns "Bad request" | Invalid period or unknown currency code | Period must be `1d`/`7d`/`30d`/`1y`; codes must be 3 letters |
353
- | Server starts but tools never appear in client | Client didn't reload after config change | Fully quit (not just close) and reopen the client |
354
- | `npx` runs but hangs forever | The server is waiting for an MCP client to connect — this is normal when run from a shell | Don't run from a shell; let your MCP client launch it |
288
+ | Server starts but tools never appear | Client didn't reload after config change | Fully quit (not just close) and reopen the client |
289
+ | `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 |
355
290
 
356
- ### Inspect server logs
357
-
358
- To see what the server is doing, run it manually with the API key set:
291
+ To inspect what the server is doing, run it manually with the key set:
359
292
 
360
293
  ```bash
361
294
  ALLRATES_API_KEY=art_live_xxxxx npx -y @allratestoday/mcp-server
362
295
  ```
363
296
 
364
- You should see no output when healthy (stdio is reserved for the MCP protocol). Any errors print to stderr.
365
-
366
- ---
297
+ No output means healthy (stdio is reserved for the MCP protocol); errors print to stderr.
367
298
 
368
- ## Error reference
299
+ ## 🛡️ Error reference
369
300
 
370
- The server maps API errors to clear, actionable messages.
301
+ The server maps API errors to clear, actionable messages the assistant can relay to the user:
371
302
 
372
303
  | HTTP status | Meaning | Tool error message |
373
304
  |---|---|---|
@@ -377,36 +308,30 @@ The server maps API errors to clear, actionable messages.
377
308
  | 429 | Quota exceeded | `AllRatesToday API quota exceeded` |
378
309
  | 5xx | Server-side issue at allratestoday.com | `HTTP 5xx — <upstream message>` |
379
310
 
380
- The LLM will surface these messages in its response, so a user prompt that hits a 429 results in the assistant saying *"the API quota has been exceeded — please try again next month or upgrade your plan."*
381
-
382
- ---
383
-
384
- ## FAQ
311
+ ## FAQ
385
312
 
386
313
  **Is the free plan really enough for normal use?**
387
- Yes for personal/dev use. The free tier covers a few daily questions. Heavy interactive use, multiple chat sessions per day, or running the server in production should consider the paid tiers.
314
+ Yes for personal/dev use. Heavy interactive use, multiple chat sessions per day, or production should consider the paid tiers.
388
315
 
389
316
  **Do you store my conversation or query data?**
390
- No. Only your API key and the request parameters (source, target, period, time) are sent to allratestoday.com — never the LLM's conversation context, sheet contents, or anything else.
317
+ No. Only your API key and the request parameters (source, target, period, time) are sent to allratestoday.com — never the LLM's conversation context.
391
318
 
392
319
  **What happens to my API key?**
393
320
  It's only sent as a `Bearer` token in the `Authorization` header on requests to the AllRatesToday API. It's never logged or transmitted elsewhere.
394
321
 
395
- **Why is my historical request slow on first call?**
396
- Cold-start of `npx` (first run downloads the package) plus the initial AllRatesToday cache miss. Subsequent calls are fast (<200ms typically).
322
+ **Why is my first call slow?**
323
+ Cold-start of `npx` (first run downloads the package) plus the initial cache miss. Subsequent calls are typically <200ms.
397
324
 
398
325
  **Can I run this without npm/Node?**
399
- Not currently — Node ≥18 is required. We've considered a standalone binary; if that matters to you, open an issue.
326
+ Not currently — Node ≥18 is required. If a standalone binary matters to you, open an issue.
400
327
 
401
328
  **Is there a self-hosted option?**
402
- Yes, set `ALLRATES_BASE_URL` to your own AllRatesToday instance. Contact support@allratestoday.com for self-hosted licensing.
329
+ Set `ALLRATES_BASE_URL` to your own AllRatesToday instance. Contact support@allratestoday.com for self-hosted licensing.
403
330
 
404
331
  **Does this work with ChatGPT?**
405
- The Anthropic MCP standard works with any MCP-compatible client. ChatGPT Desktop has experimental MCP support; check OpenAI's docs for current status.
332
+ MCP works with any MCP-compatible client. ChatGPT Desktop has experimental MCP support; check OpenAI's docs for current status.
406
333
 
407
- ---
408
-
409
- ## Development
334
+ ## 👩‍💻 Development
410
335
 
411
336
  ```bash
412
337
  git clone https://github.com/cahthuranag/mcp-server.git
@@ -416,21 +341,13 @@ npm run build
416
341
  ALLRATES_API_KEY=art_live_xxxxx node dist/index.js
417
342
  ```
418
343
 
419
- The server runs on stdio and waits for an MCP client to connect. Hit Ctrl+C to exit.
420
-
421
- To watch and rebuild on changes during development:
422
-
423
- ```bash
424
- npm run dev
425
- ```
426
-
427
- To test against a local AllRatesToday instance:
344
+ The 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:
428
345
 
429
346
  ```bash
430
347
  ALLRATES_BASE_URL=http://localhost:8080/api ALLRATES_API_KEY=test_key node dist/index.js
431
348
  ```
432
349
 
433
- ### Project structure
350
+ **Project structure**
434
351
 
435
352
  ```
436
353
  src/
@@ -438,39 +355,27 @@ src/
438
355
  └── client.ts # HTTP client for AllRatesToday API + error mapping
439
356
  dist/ # Compiled JS (gitignored)
440
357
  server.json # MCP registry manifest
441
- package.json # npm metadata, dependencies, scripts
442
358
  ```
443
359
 
444
- ### Contributing
445
-
446
- Issues and PRs welcome at [github.com/cahthuranag/mcp-server](https://github.com/cahthuranag/mcp-server). Before opening a PR:
360
+ **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.
447
361
 
448
- 1. `npm run build` should succeed with no errors
449
- 2. Test against a real AllRatesToday API key (set in `ALLRATES_API_KEY`)
450
- 3. Update tool descriptions in `src/index.ts` if you change tool behavior
451
- 4. Update this README's "Tools reference" section if you add or rename a tool
452
-
453
- ---
454
-
455
- ## Changelog
362
+ ## 📝 Changelog
456
363
 
457
364
  See [GitHub Releases](https://github.com/cahthuranag/mcp-server/releases) for the full list. Recent highlights:
458
365
 
366
+ - **0.4.x** — README overhaul; registry metadata updates
459
367
  - **0.3.x** — API key required for all tools; fail-fast at startup with clear error
460
368
  - **0.2.x** — Removed news tool, required auth on `get_historical_rates`
461
369
  - **0.1.x** — Initial release with 5 tools
462
370
 
463
- ---
371
+ ## 🔗 Links
464
372
 
465
- ## Support
466
-
467
- - **API issues**: [support@allratestoday.com](mailto:support@allratestoday.com)
468
- - **Bug reports**: [github.com/cahthuranag/mcp-server/issues](https://github.com/cahthuranag/mcp-server/issues)
469
- - **MCP questions**: [modelcontextprotocol.io](https://modelcontextprotocol.io) — protocol docs
470
- - **Status / uptime**: [allratestoday.com](https://allratestoday.com) (status page in development)
471
-
472
- ---
373
+ - [API documentation](https://allratestoday.com/docs/) · [Interactive reference](https://allratestoday.com/api-reference/)
374
+ - [Register (free)](https://allratestoday.com/register) · [Pricing](https://allratestoday.com/pricing)
375
+ - [MCP protocol docs](https://modelcontextprotocol.io)
376
+ - [GitHub](https://github.com/cahthuranag/mcp-server) · [Bug reports](https://github.com/cahthuranag/mcp-server/issues)
377
+ - Support: [support@allratestoday.com](mailto:support@allratestoday.com)
473
378
 
474
- ## License
379
+ ## 📜 License
475
380
 
476
381
  MIT — see [LICENSE](./LICENSE).
package/dist/client.d.ts CHANGED
@@ -5,8 +5,8 @@ export interface ClientOptions {
5
5
  }
6
6
  export declare class AllRatesTodayError extends Error {
7
7
  readonly status?: number | undefined;
8
- readonly body?: unknown | undefined;
9
- constructor(message: string, status?: number | undefined, body?: unknown | undefined);
8
+ readonly body?: unknown;
9
+ constructor(message: string, status?: number | undefined, body?: unknown);
10
10
  }
11
11
  export declare class AllRatesTodayClient {
12
12
  private readonly apiKey?;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allratestoday/mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "mcpName": "io.github.cahthuranag/mcp-server",
5
5
  "description": "MCP server for AllRatesToday — let AI coding tools (Claude Code, Cursor, Claude Desktop) fetch real-time and historical currency exchange rates.",
6
6
  "keywords": [
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@modelcontextprotocol/sdk": "^1.29.0",
45
- "zod": "^3.23.8"
45
+ "zod": "^4.4.3"
46
46
  },
47
47
  "devDependencies": {
48
- "@types/node": "^20.14.0",
49
- "typescript": "^5.5.0"
48
+ "@types/node": "^26.1.1",
49
+ "typescript": "^7.0.2"
50
50
  }
51
51
  }