UniRate MCP
OfficialUniRate MCP Server
Сервер Model Context Protocol для UniRate API — предоставьте Claude, Cursor, Continue и любому другому ИИ-ассистенту с поддержкой MCP первоклассный доступ к конвертации валют и обменным курсам.
🔄 Конвертация в реальном времени между 170+ валютами (фиат + основные криптовалюты)
📈 Исторические курсы с 1999 года (тариф Pro)
🆓 Бесплатный тариф, кредитная карта не требуется — получите ключ на unirateapi.com
🧩 Четыре инструмента, полностью типизированные входные данные (схемы Zod), структурированные выходные данные
🌐 Stdio + Streamable HTTP/SSE транспорты — запускайте локально или размещайте как удаленную конечную точку MCP
⚡ Чистый Node 18+, единственная зависимость от
@modelcontextprotocol/sdk
Зачем это нужно
Большинство рабочих процессов «валюта для ИИ» сегодня включают в себя самописные обертки fetch в пользовательских инструментах или общие HTTP MCP-серверы, которые передают модели «сырой» JSON. Этот сервер предоставляет моделям компактный, типизированный и «валютно-ориентированный» интерфейс инструментов — они спрашивают «сколько было 100 USD в EUR на 2020-03-15?» и получают обратно отформатированный ответ плюс структурированные данные, которые можно использовать в других вызовах инструментов.
Related MCP server: FX Currency MCP Server
Быстрый старт
1. Установка
npm install -g @unirate/mcpИли запустите по требованию с помощью npx @unirate/mcp (без установки).
2. Получите API-ключ UniRate
Бесплатный тариф включает convert, latest_rate и list_currencies. Зарегистрируйтесь на unirateapi.com — кредитная карта не требуется.
3. Подключите к вашему MCP-клиенту
Claude Desktop
Отредактируйте ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"unirate": {
"command": "npx",
"args": ["-y", "@unirate/mcp"],
"env": {
"UNIRATE_API_KEY": "your-api-key-here"
}
}
}
}Перезапустите Claude Desktop. Четыре инструмента UniRate появятся в меню выбора инструментов.
Cursor / Continue / Cline
Добавьте в вашу конфигурацию MCP (.cursor/mcp.json, ~/.continue/config.json и т.д.):
{
"mcpServers": {
"unirate": {
"command": "npx",
"args": ["-y", "@unirate/mcp"],
"env": { "UNIRATE_API_KEY": "your-api-key-here" }
}
}
}Из исходного кода
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.js4. Запуск в качестве удаленной конечной точки (Streamable HTTP / SSE)
По умолчанию сервер использует stdio, что и требуется для Claude Desktop и большинства MCP-клиентов. Чтобы разместить его как удаленную конечную точку — для совместного использования, многопользовательских развертываний или браузерных клиентов — запустите его в режиме HTTP:
UNIRATE_API_KEY=your-key unirate-mcp --http 3001
# or via env:
UNIRATE_API_KEY=your-key UNIRATE_MCP_HTTP_PORT=3001 unirate-mcpЭто открывает:
POST /mcp— Streamable HTTP конечная точка (с поддержкой SSE). Без сохранения состояния: новый сервер создается для каждого запроса, поэтому один и тот же процесс может обслуживать множество одновременных клиентов.GET /healthz— JSON-проверка работоспособности ({ "status": "ok", "server": "unirate-mcp", "version": "..." }).
Укажите любому MCP-клиенту с поддержкой Streamable-HTTP (Claude Desktop с поддержкой удаленного сервера, Cursor remote MCP и т.д.) адрес http://your-host:3001/mcp. Для продакшена разместите его за обратным прокси-сервером с TLS.
Программные / edge-среды выполнения (Cloudflare Workers, Deno, Bun)
Пакет экспортирует buildServer(client), поэтому вы можете подключить его к любому транспорту, который предпочитает ваша среда выполнения. Для Workers / Deno / Bun используйте транспорт webStandardStreamableHttp из SDK с экспортированным экземпляром buildServer.
import { UnirateClient } from "@unirate/mcp/dist/client.js";
import { buildServer } from "@unirate/mcp";
// → connect to your runtime's preferred transportИнструменты
convert
Конвертирует сумму из одной валюты в другую по последнему курсу.
Параметр | Тип | Обязателен | Примечания |
| string | да | Код ISO 4217 (например, |
| string | да | Код ISO 4217 (например, |
| number | да | Положительная сумма в |
Пример вызова:
{ "name": "convert", "arguments": { "from": "USD", "to": "EUR", "amount": 100 } }Ответ: текст, понятный человеку, плюс структурированный { from, to, amount, result }.
latest_rate
Получение текущего обменного курса (курсов).
Параметр | Тип | Обязателен | Примечания |
| string | да | Базовая валюта |
| string | нет | Целевая валюта. Пропустите, чтобы получить курсы для всех валют |
historical_rate (Тариф Pro)
Получение обменного курса, действовавшего на определенную дату. Покрытие с 1999-01-04 для основных фиатных пар.
Параметр | Тип | Обязателен | Примечания |
| string | да |
|
| string | да | Исходная валюта |
| string | да | Целевая валюта |
| number | нет | По умолчанию 1 |
Ключи бесплатного тарифа получат четкую ошибку со ссылкой на unirateapi.com для обновления.
list_currencies
Возвращает массив поддерживаемых кодов валют (170+) без параметров. Полезно для автодополнения или проверки кодов, предоставленных пользователем.
Ошибки
Все сбои UniRate API отображаются в понятные ошибки инструментов:
HTTP | Класс ошибки | Что видит модель |
400 |
| "Неверные параметры запроса" |
401 |
| "Отсутствующий или неверный API-ключ" |
403 |
| "…требуется Pro… обновитесь на https://unirateapi.com" |
404 |
| "Валюта не найдена или данные недоступны" |
429 |
| "Превышен лимит запросов" |
503 |
| "Сервис недоступен" |
Ошибки сети/тайм-аута оборачиваются в UnirateError. Вызовы инструментов всегда возвращают объект ответа с isError: true вместо выброса ошибок уровня протокола, чтобы модель могла корректно обработать ситуацию.
Разработка
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Связанные проекты
UniRate предлагает официальные клиентские библиотеки на 9 языках:
Плюс сообщество n8n.
Лицензия
MIT — см. LICENSE.
Available Tools
4 toolsconvertConvert currencyARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Source currency code, e.g. 'USD' | |
| to | Yes | Target currency code, e.g. 'EUR' | |
| amount | Yes | Amount in the source currency |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint and openWorldHint. The description adds that it uses the latest exchange rate and supports 170+ fiat and crypto currencies with ISO 4217 codes, which is helpful context beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded, no redundant words. Every sentence adds value: first explains action, second defines scope and standard.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description covers core function, supported currencies, and code standard. Could mention precision or source but not necessary for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters. The description does not add new information about individual parameters beyond the schema's examples and hints; baseline is 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'convert' and identifies resource as currency amount using latest rate. It clearly distinguishes from sibling tools like historical_rate and list_currencies by focusing on conversion rather than rate lookup or listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for converting amounts, but does not explicitly state when to use it versus alternatives like latest_rate (for rate only) or historical_rate. No when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
historical_rateGet historical exchange rate (Pro plan required)ARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date in YYYY-MM-DD format, e.g. '2020-03-15' | |
| from | Yes | Source currency code | |
| to | Yes | Target currency code | |
| amount | No | Optional amount to convert at the historical rate. Defaults to 1. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint and openWorldHint; description adds coverage start date (1999-01-04) and error behavior for free-tier keys. Does not disclose behavior for out-of-range dates or missing data, but key behavioral context is added beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences: first states purpose, second gives format, third adds coverage and requirement. No wasted words, front-loaded with action verb. Perfect structure for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Lacks description of return value (e.g., what is returned if amount is provided). No output schema, so description should hint at response shape. Also, does not specify behavior for missing or invalid dates beyond coverage range. Completeness is adequate but has notable gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with clear descriptions. Description adds value by stating the coverage start date for the date parameter, which is not in schema. Also reinforces date format. Does not add to other parameters, but schema already sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it fetches the exchange rate for a specific date, using strong verb 'Fetch' and specific resource. Differentiates from siblings (convert, latest_rate, list_currencies) by focusing on historical data. Mentions date format and coverage range, solidifying purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly notes that the tool requires UniRate Pro, including that free-tier keys will receive an error. This is a critical usage condition. Also provides date format and coverage range, helping decide when to use. Does not need to list alternatives as purpose is self-evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
latest_rateGet latest exchange rate(s)ARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Base currency code, e.g. 'USD' | |
| to | No | Optional target currency. Omit to get rates for all currencies. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint and openWorldHint. Description adds scoping (base currency, single/all rates) but doesn't elaborate on data freshness, caching, or external dependencies. Adequate given annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loads the main action, no unnecessary words. Perfectly concise while conveying the two use cases.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity (2 params, no output schema), description is mostly complete. Could briefly mention return format (e.g., object with rates) but not essential. Agent can infer from typical usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already describes both params clearly (100% coverage). Description adds value by explaining the behavioral switch when 'to' is omitted, which is not in the schema descriptions. Enhances understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Fetch the latest exchange rate' with distinct behaviors: single rate if 'to' provided, all rates if omitted. Differentiates from siblings through scope (latest vs. historical, conversion, currency list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Describes when to provide 'to' vs omit, but does not explicitly compare to sibling tools like convert or historical_rate. Agent can infer from sibling names, but no direct usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_currenciesList supported currenciesARead-only
Return the list of currency codes supported by the UniRate API (170+ fiat plus major crypto).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint and openWorldHint; the description adds the count and types of currencies, providing useful context beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is direct and front-loaded, with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and no output schema, the description fully informs the agent about the tool's purpose and output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so the schema covers 100%; baseline for zero parameters is 4, and the description omits irrelevant parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Return the list of currency codes' and specifies the scope '170+ fiat plus major crypto', distinguishing it from sibling tools for conversion and rates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
While no explicit when-to-use guidance is given, the simple nature and clear context make it obvious this tool is for obtaining supported currencies before using other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.2.2- First observed
convert - First observed
historical_rate - First observed
latest_rate - First observed
list_currencies
TDQS
Each tool serves a distinct purpose: converting amounts, fetching historical rates, getting latest rates, and listing supported currencies. No overlaps.
All tool names use consistent snake_case and follow a verb_noun or adjective_noun pattern, making them predictable.
4 tools is well-scoped for a currency conversion API, covering essential operations without unnecessary complexity.
The tool set covers conversion, latest rates, historical rates, and currency listing—no obvious gaps for the domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Live & historical FX rates and currency conversion for AI agents. No API keys.
Live & historical FX rates and currency conversion for AI agents. No API keys.
51Free, keyless real-time currency conversion and exchange rates for any currency pair.
Norges Bank exchange rates for your AI — 38 currencies vs NOK, history to 1980, convert & chart
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides access to currency exchange rates and conversion tools using the Frankfurter API, including latest rates, historical data, and time series from sources like the European Central Bank.5MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time and historical foreign exchange rates for 31+ currencies, enabling currency conversion, historical rate lookups, and time series analysis using data from the Frankfurter API.-
- AlicenseAqualityBmaintenanceProvides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.4127MIT
- AlicenseNot gradedqualityCmaintenanceProvides real-time exchange rates for any currency pair using open.er-api.com, simplifying currency conversion with a single tool.14MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/UniRate-API/unirate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server