Skip to main content
Glama
UniRate MCP

UniRate MCP

Official
by UniRate-API

UniRate MCP-Server

npm License

Ein Model Context Protocol-Server für die UniRate API – geben Sie Claude, Cursor, Continue und jedem MCP-kompatiblen KI-Assistenten erstklassigen Zugriff auf Währungsumrechnung und Wechselkurse.

  • 🔄 Echtzeit-Umrechnung zwischen über 170 Währungen (Fiat + wichtige Kryptowährungen)

  • 📈 Historische Kurse bis 1999 (Pro-Plan)

  • 🆓 Kostenlose Stufe, keine Kreditkarte erforderlich – holen Sie sich einen Schlüssel unter unirateapi.com

  • 🧩 Vier Tools, vollständig typisierte Eingaben (Zod-Schemas), strukturierte Ausgaben

  • 🌐 Stdio + Streamable HTTP/SSE-Transporte – lokal ausführen oder als Remote-MCP-Endpunkt hosten

  • ⚡ Reines Node 18+, einzige Abhängigkeit von @modelcontextprotocol/sdk

Warum gibt es das?

Die meisten "Währungs-für-KI"-Workflows beinhalten heute manuell erstellte Fetch-Wrapper in benutzerdefinierten Tools oder generische HTTP-MCP-Server, die dem Modell rohes JSON übergeben. Dieser Server bietet Modellen eine kompakte, typisierte, währungsbewusste Tool-Oberfläche – sie fragen "Was waren 100 USD in EUR am 15.03.2020?" und erhalten eine formatierte Antwort sowie eine strukturierte Nutzlast, die sie in andere Tool-Aufrufe einbinden können.

Related MCP server: Currency Exchange MCP Server

Schnellstart

1. Installation

npm install -g @unirate/mcp

Oder führen Sie es bei Bedarf mit npx @unirate/mcp aus (keine Installation).

2. UniRate API-Schlüssel abrufen

Die kostenlose Stufe deckt convert, latest_rate und list_currencies ab. Registrieren Sie sich unter unirateapi.com – keine Kreditkarte erforderlich.

3. In Ihren MCP-Client einbinden

Claude Desktop

Bearbeiten Sie ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) oder %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "unirate": {
      "command": "npx",
      "args": ["-y", "@unirate/mcp"],
      "env": {
        "UNIRATE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Starten Sie Claude Desktop neu. Die vier UniRate-Tools erscheinen in der Tool-Auswahl.

Cursor / Continue / Cline

Fügen Sie es zu Ihrer MCP-Konfiguration hinzu (.cursor/mcp.json, ~/.continue/config.json usw.):

{
  "mcpServers": {
    "unirate": {
      "command": "npx",
      "args": ["-y", "@unirate/mcp"],
      "env": { "UNIRATE_API_KEY": "your-api-key-here" }
    }
  }
}

Aus dem Quellcode

git clone https://github.com/UniRate-API/unirate-mcp.git
cd unirate-mcp
npm install && npm run build
UNIRATE_API_KEY=your-key node dist/index.js

4. Als Remote-Endpunkt ausführen (Streamable HTTP / SSE)

Standardmäßig verwendet der Server stdio, was Claude Desktop und die meisten MCP-Clients erwarten. Um ihn stattdessen als Remote-Endpunkt zu hosten – für die gemeinsame Nutzung, Multi-User-Bereitstellungen oder browserbasierte Clients – starten Sie ihn im HTTP-Modus:

UNIRATE_API_KEY=your-key unirate-mcp --http 3001
# or via env:
UNIRATE_API_KEY=your-key UNIRATE_MCP_HTTP_PORT=3001 unirate-mcp

Das stellt Folgendes bereit:

  • POST /mcp – Streamable HTTP-Endpunkt (SSE-fähig). Zustandslos: Ein neuer Server wird pro Anfrage erstellt, sodass derselbe Prozess viele gleichzeitige Clients bedienen kann.

  • GET /healthz – JSON-Liveness-Probe ({ "status": "ok", "server": "unirate-mcp", "version": "..." }).

Verweisen Sie jeden Streamable-HTTP-fähigen MCP-Client (Claude Desktop mit Remote-Server-Unterstützung, Cursor Remote-MCP usw.) auf http://your-host:3001/mcp. Platzieren Sie es für die Produktion hinter einen Reverse-Proxy + TLS.

Programmatische / Edge-Runtimes (Cloudflare Workers, Deno, Bun)

Das Paket exportiert buildServer(client), sodass Sie es mit jedem Transport verbinden können, den Ihre Runtime bevorzugt. Verwenden Sie für Workers / Deno / Bun den webStandardStreamableHttp-Transport des SDKs mit einer exportierten buildServer-Instanz.

import { UnirateClient } from "@unirate/mcp/dist/client.js";
import { buildServer } from "@unirate/mcp";
// → connect to your runtime's preferred transport

Tools

convert

Rechnet einen Betrag zum aktuellen Kurs von einer Währung in eine andere um.

Parameter

Typ

Erforderlich

Hinweise

from

string

ja

ISO 4217-Code (z. B. USD)

to

string

ja

ISO 4217-Code (z. B. EUR)

amount

number

ja

Positiver Betrag in from

Beispielaufruf:

{ "name": "convert", "arguments": { "from": "USD", "to": "EUR", "amount": 100 } }

Antwort: menschenlesbarer Text plus strukturiertes { from, to, amount, result }.

latest_rate

Aktuellen Wechselkurs(e) abrufen.

Parameter

Typ

Erforderlich

Hinweise

from

string

ja

Basiswährung

to

string

nein

Ziel. Weglassen, um Kurse für alle Währungen zu erhalten

historical_rate (Pro-Plan)

Ruft den Wechselkurs ab, der an einem bestimmten Datum gültig war. Abdeckung bis zum 04.01.1999 für wichtige Fiat-Paare.

Parameter

Typ

Erforderlich

Hinweise

date

string

ja

YYYY-MM-DD (z. B. 2020-03-15)

from

string

ja

Quellwährung

to

string

ja

Zielwährung

amount

number

nein

Standardwert ist 1

Schlüssel der kostenlosen Stufe erhalten eine klare Fehlermeldung mit Verweis auf unirateapi.com für ein Upgrade.

list_currencies

Gibt das Array der unterstützten Währungscodes (170+) ohne Parameter zurück. Nützlich für die Autovervollständigung oder die Validierung vom Benutzer bereitgestellter Codes.

Fehler

Alle UniRate API-Fehler werden auf benutzerfreundliche Tool-Fehler abgebildet:

HTTP

Fehlerklasse

Was das Modell sieht

400

InvalidRequestError

"Ungültige Anfrageparameter"

401

AuthenticationError

"Fehlender oder ungültiger API-Schlüssel"

403

ProPlanRequiredError

"…erfordert Pro… Upgrade unter https://unirateapi.com"

404

InvalidCurrencyError

"Währung nicht gefunden oder keine Daten verfügbar"

429

RateLimitError

"Ratenlimit überschritten"

503

APIError

"Dienst nicht verfügbar"

Netzwerk-/Timeout-Fehler werden in UnirateError gekapselt. Tool-Aufrufe geben immer ein Antwortobjekt mit isError: true zurück, anstatt Fehler auf Protokollebene auszulösen, sodass das Modell sich ordnungsgemäß erholen kann.

Entwicklung

npm install
npm run build       # compile TypeScript to dist/
npm test            # 24 mock tests
UNIRATE_LIVE=1 UNIRATE_API_KEY=... npm run test:live  # +4 live free-tier tests

Verwandte Projekte

UniRate bietet offizielle Client-Bibliotheken in 9 Sprachen:

Sowie einen n8n-Community-Node.

Lizenz

MIT – siehe LICENSE.

Available Tools

4 tools
convertConvert currencyA
Read-only

Convert an amount from one currency to another using the latest exchange rate. Codes are ISO 4217 (e.g. USD, EUR, GBP). Supports 170+ fiat currencies and major cryptocurrencies.

Inputs: from (required), to (required), amount (required).

historical_rateGet historical exchange rate (Pro plan required)A
Read-only

Fetch the exchange rate that was in effect on a specific date. Date format YYYY-MM-DD. Coverage goes back to 1999-01-04 for major fiat pairs. Requires UniRate Pro — free-tier keys will receive a clear upgrade-required error.

Inputs: date (required), from (required), to (required), amount.

latest_rateGet latest exchange rate(s)A
Read-only

Fetch the latest exchange rate for a base currency. If 'to' is provided, returns a single rate; otherwise returns rates for all supported currencies relative to the base.

Inputs: from (required), to.

list_currenciesList supported currenciesA
Read-only

Return the list of currency codes supported by the UniRate API (170+ fiat plus major crypto).

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool serves a distinct purpose: converting amounts, fetching historical rates, getting latest rates, and listing supported currencies. No overlaps.

    Naming Consistency5/5

    All tool names use consistent snake_case and follow a verb_noun or adjective_noun pattern, making them predictable.

    Tool Count5/5

    4 tools is well-scoped for a currency conversion API, covering essential operations without unnecessary complexity.

    Completeness5/5

    The tool set covers conversion, latest rates, historical rates, and currency listing—no obvious gaps for the domain.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables real-time currency exchange rate retrieval and conversion for over 200 currencies. Supports operations like getting rates, converting amounts, and comparing currencies through natural language.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to retrieve live buy and sell exchange rates from 1,219 commercial banks across 124 countries, compare banks, check spreads against central bank official rates, and look up past daily rates.
      7
      179 npm
      MIT