We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lcfranca/frankfurter-forex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
from __future__ import annotations
import pytest
from frankfurter_forex_mcp.models.schemas import HistoryInput
from frankfurter_forex_mcp.tools import exchange_history
class _ClientStub:
async def history(
self,
start_date: str,
end_date: str,
source_currency: str,
destination_currency: str,
) -> dict:
return {
"base": source_currency,
"start_date": start_date,
"end_date": end_date,
"rates": {
"2024-01-02": {destination_currency: 4.91},
"2024-01-03": {destination_currency: 4.93},
},
}
@pytest.mark.asyncio
async def test_history_maps_series() -> None:
input_data = HistoryInput(
start="2024-01-01",
end="2024-01-10",
from_currency="USD",
to_currency="BRL",
)
result = await exchange_history.execute(input_data, _ClientStub())
assert result.total == 2
assert result.points[0].rate == 4.91
assert result.from_currency == "USD"