Contents

Documentation Exchange latest

exchange-latest

Free Read-only

Get the latest reference exchange rates of a currency.

When to use it. Rates are published once per working day. Multiply an amount by a rate.

Ask your assistant

Once the server is connected, a request in plain words is enough. For example:

Example request
Use Mairies de France to get the latest reference exchange rates of a currency.

Examples

Most clients only need the server address and a sign-in: see Connect. Clients configured by a file take the first block. Your assistant then writes the second one by itself.

Client configuration
{
  "mcpServers": {
    "mairies-de-france": {
      "url": "https://mairies.vosfichiers.com/mcp"
    }
  }
}
What the assistant sends
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "exchange-latest",
    "arguments": {
      "base": "EUR"
    }
  }
}

Put an API key in the API_KEY environment variable first. Create a key

bash
curl -X POST https://mairies.vosfichiers.com/api/v1/exchange-latest \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "base": "EUR"
}'

Put an API key in the API_KEY environment variable first. Create a key

python
import json
import os
import urllib.request

payload = {
    "base": "EUR",
}
request = urllib.request.Request(
    "https://mairies.vosfichiers.com/api/v1/exchange-latest",
    data=json.dumps(payload).encode(),
    headers={
        "Authorization": "Bearer " + os.environ["API_KEY"],
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))

Put an API key in the API_KEY environment variable first. Create a key

javascript
const response = await fetch("https://mairies.vosfichiers.com/api/v1/exchange-latest", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "base": "EUR"
  }),
});
console.log(await response.json());

Input

Fields this tool accepts
Field Type Required Default Description
base string optional "EUR" Code to convert from. pattern ^[A-Z]{3}$
symbols string optional none Targets, e.g. USD,GBP. pattern ^[A-Z]{3}(,[A-Z]{3}){0,19}$

Output

A JSON object whose fields depend on the request; this tool declares no fixed shape.

Try it

Run this tool from your account, with a form built from the fields above. A run is a real call; this tool is free.

Open in the playground