# How to Connect FXMacroData to Claude / Claude Desktop (MCP)

Canonical: https://fxmacrodata.com/articles/how-to-connect-fxmacrodata-claude-mcp
Author: Robert Tidball
Published: 2026-04-22T09:00:00Z

Step-by-step guide to connecting FXMacroData to Claude Desktop via the Model Context Protocol (MCP). Ask live macro questions — policy rates, CPI, COT positioning, FX spot rates — directly inside Claude conversations.

By the end of this guide Claude Desktop will have live access to macroeconomic indicator series, central-bank release calendars, CFTC COT positioning, precious-metals prices, and FX spot rates across 18 currencies — all queryable in plain English from your Claude Desktop conversations.

What you will achieve

- **Live macro data in every Claude conversation**— ask “What is the latest EUR CPI print?”, “When is the next Fed decision?”, or “Show me COT positioning for JPY” and get answers backed by live data

- **MCP server configuration**— connect Claude Desktop to the FXMacroData MCP server in under five minutes using the native`claude_desktop_config.json`format

- **REST API alternative**— use direct HTTP calls with your API key for scripts, notebooks, or custom Claude workflows

### Prerequisites

- **Claude Desktop**installed — download from[claude.ai/download](https://claude.ai/download) (macOS and Windows supported; version 0.7+ recommended for MCP)

- **A FXMacroData API key**— sign up at[fxmacrodata.com/subscribe](/subscribe) ; USD data is free with no key, but a key unlocks all 18 currencies and the full indicator set

- `uv`installed on your machine — run`pip install uv`or see[docs.astral.sh/uv](https://docs.astral.sh/uv/) (`uvx`is used to launch the MCP server process without a manual install step)

- Network access from your machine to`fxmacrodata.com`

### Why live macro data inside Claude matters

Claude is excellent at reasoning about FX strategy, carry trades, and central-bank policy — but without live data it reasons from training knowledge that may be months out of date. By wiring FXMacroData into Claude Desktop as an MCP server, Claude can fetch the actual latest CPI print, the real COT positioning figure, or the exact release schedule for the week ahead, and weave those live figures directly into its analysis.

This is especially useful for macro research sessions: one prompt can pull the[USD policy rate](/api-data-docs/usd/policy_rate) history, compare it with[EUR rates](/api-data-docs/eur/policy_rate) , overlay the EUR/USD spot series, and produce a carry-trade narrative — all without leaving the Claude conversation.

## Path A — Connect via MCP Recommended

[Model Context Protocol (MCP)](https://modelcontextprotocol.io) is Claude Desktop’s native mechanism for connecting to external data sources. One JSON config block and Claude auto-discovers every tool the FXMacroData server exposes — no schema definitions required, no HTTP boilerplate.

### Step 1 — Open the Claude Desktop config file

Claude Desktop reads MCP server configuration from a JSON file stored at a fixed path on your machine. Open (or create) the file at the location for your operating system:

OS Config file path macOS ~/Library/Application Support/Claude/claude_desktop_config.json Windows %APPDATA%\Claude\claude_desktop_config.json

On macOS you can open the file directly from Terminal:

```
open -a "TextEdit" ~/Library/Application\ Support/Claude/claude_desktop_config.json
```

If the file does not yet exist, create it. If it already exists and contains other MCP server entries, you will add the FXMacroData block alongside them — do not delete existing entries.

### Step 2 — Add the FXMacroData MCP server block

Paste the following JSON into`claude_desktop_config.json`, replacing`YOUR_API_KEY`with your actual FXMacroData key:

```
{
  "mcpServers": {
    "fxmacrodata": {
      "command": "uvx",
      "args": ["mcp-server-fxmacrodata"],
      "env": {
        "FXMACRODATA_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

The`uvx`command downloads and runs the[mcp-server-fxmacrodata](https://pypi.org/project/mcp-server-fxmacrodata/) PyPI package automatically each time Claude Desktop starts — no manual`pip install`needed.

If your config file already has a`mcpServers`key with other servers, merge the`fxmacrodata`block into the existing object:

```
{
  "mcpServers": {
    "some-other-server": {
      "command": "...",
      "args": ["..."]
    },
    "fxmacrodata": {
      "command": "uvx",
      "args": ["mcp-server-fxmacrodata"],
      "env": {
        "FXMACRODATA_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

**Security note:**Treat your API key like a password. Do not share`claude_desktop_config.json`, do not commit it to source control, and do not post it in screenshots. If a key is compromised, rotate it from your[account dashboard](/account) .

### Step 3 — Restart Claude Desktop

Fully quit and reopen Claude Desktop so it picks up the new configuration. On macOS:

```
osascript -e 'quit app "Claude"' && sleep 2 && open -a Claude
```

On Windows, right-click the Claude icon in the system tray, choose**Quit**, then relaunch Claude from the Start menu.

After restart, Claude Desktop will launch the`uvx mcp-server-fxmacrodata`subprocess in the background. If`uv`is not yet installed on your machine, Claude may show an error; install`uv`first with`pip install uv`and then restart Claude.

### Step 4 — Verify the connection

Start a new conversation in Claude Desktop and type:

> “Use the FXMacroData ping tool to check the connection.”

Claude will call the`ping`tool. A`pong`response in Claude’s reply confirms the MCP server is running and reachable. If Claude says the tool is not available, re-check that the JSON is valid (no trailing commas, correct braces) and that Claude Desktop was fully restarted.

Troubleshooting tips

- **Tool not found:**Confirm Claude Desktop was fully quit and relaunched, not just minimised.

- **`uvx`not found:**Run`pip install uv`then restart Claude Desktop.

- **Invalid JSON error:**Validate your config at[jsonlint.com](https://jsonlint.com) before saving.

- **API key errors:**Confirm the key is correct and active in your[account](/account) .

### Step 5 — Explore the available tools

Once connected, Claude can call the following FXMacroData tools directly:

Tool What it does Example prompt indicator_query Fetch historical announcement series for any currency + indicator “What is the latest AUD policy rate?” data_catalogue List available indicators for a currency “What indicators are available for NZD?” release_calendar Upcoming macro releases with scheduled dates “What USD data is coming out this week?” forex FX spot rates with optional technical overlays “What is EUR/USD trading at?” cot_data CFTC Commitments of Traders positioning data “Show me the latest COT report for JPY.” commodities Precious-metals prices (gold, silver, platinum) “What is the current gold price?” market_sessions Live FX session windows (Sydney, Tokyo, London, New York) “Which FX sessions are open right now?” indicator_visual_artifact Generate chart-ready data artifacts for compatible clients “Chart USD inflation over the last 2 years.” ping Verify the MCP server connection is live “Use the FXMacroData ping tool.”

Claude resolves which tool to call from your natural-language prompt — you never need to name a tool or write JSON. Just ask your macro question and Claude handles the tool dispatch automatically.

### Step 6 — Try a real analyst workflow

You are reviewing a potential carry trade on GBP/JPY ahead of the Bank of England’s next decision. In a new Claude Desktop conversation, ask:

> “Fetch the GBP and JPY policy rates for the last 12 months, show me the GBP/JPY spot rate over the same window, and summarise the carry differential and which central bank looks more hawkish heading into the next quarter.”

Claude calls`indicator_query`twice (once per currency) and`forex`once, then synthesises a carry-trade summary entirely from live data. The underlying REST calls that back these tool invocations are:

```
# GBP policy rate
curl "https://fxmacrodata.com/api/v1/announcements/gbp/policy_rate?api_key=YOUR_API_KEY"

# JPY policy rate
curl "https://fxmacrodata.com/api/v1/announcements/jpy/policy_rate?api_key=YOUR_API_KEY"

# GBP/JPY spot rate
curl "https://fxmacrodata.com/api/v1/forex/GBP/JPY?api_key=YOUR_API_KEY"
```

Representative`indicator_query`response:

```
{
  "currency": "GBP",
  "indicator": "policy_rate",
  "data": [
    { "date": "2026-03-20", "val": 4.50, "announcement_datetime": 1742482200 },
    { "date": "2026-02-06", "val": 4.50, "announcement_datetime": 1738836000 },
    { "date": "2025-11-07", "val": 4.75, "announcement_datetime": 1731002400 },
    { "date": "2025-08-01", "val": 5.00, "announcement_datetime": 1722506400 }
  ]
}
```

With the policy rates and spot series in hand, Claude produces a carry analysis grounded in current data rather than training-set knowledge. The[GBP policy rate docs](/api-data-docs/gbp/policy_rate) and[JPY policy rate docs](/api-data-docs/jpy/policy_rate) show the full indicator schema if you want to extend the analysis further.

More things to try

- Show me EUR inflation over the last 6 months

- What macro releases are due this week for AUD?

- What is the COT net position for EUR futures?

- Which FX sessions overlap right now?

Combining tools in one prompt

- Fetch CAD CPI and the next BoC calendar date

- Pull NZD employment + NZD/USD spot and summarise

- Get gold price and COT for JPY in one message

- List indicators for CHF and fetch the latest policy rate

## Path B — Direct REST API calls Alternative

If you prefer to feed FXMacroData directly into a Claude system prompt, use it inside a Python script that calls the Claude API, or experiment with data before setting up MCP, the REST API is the simplest path. Every endpoint accepts a query-parameter API key.

### Fetching indicator data with Python

```
import requests

BASE = "https://fxmacrodata.com/api/v1"
KEY  = "YOUR_API_KEY"

# Latest EUR inflation series
resp = requests.get(
    f"{BASE}/announcements/eur/inflation",
    params={"api_key": KEY},
    timeout=10,
)
data = resp.json()
for row in data["data"][:5]:
    print(row["date"], row["val"])

```

### Checking the release calendar

```
# Upcoming USD releases
resp = requests.get(
    f"{BASE}/calendar/usd",
    params={"api_key": KEY},
    timeout=10,
)
events = resp.json()
for event in events["data"][:3]:
    print(event["indicator"], event["release_date"])

```

### Injecting live data into a Claude API call

You can fetch data from FXMacroData in Python and then pass it to Claude via the Anthropic SDK as part of the user message:

```
import anthropic
import requests

BASE    = "https://fxmacrodata.com/api/v1"
FX_KEY  = "YOUR_FXMACRODATA_API_KEY"
ANT_KEY = "YOUR_ANTHROPIC_API_KEY"

# Pull the latest USD non-farm payrolls
resp  = requests.get(f"{BASE}/announcements/usd/non_farm_payrolls",
                     params={"api_key": FX_KEY}, timeout=10)
nfp   = resp.json()["data"][:6]

client   = anthropic.Anthropic(api_key=ANT_KEY)
message  = client.messages.create(
    model   = "claude-opus-4-5",
    max_tokens = 1024,
    messages = [{
        "role":    "user",
        "content": f"Here are the last six USD non-farm payroll readings: {nfp}. "
                   "Summarise the trend and tell me what this implies for the Fed outlook.",
    }],
)
print(message.content[0].text)

```

A full list of supported currencies and indicators is at[/api-data-docs](/api-data-docs) . For example,[USD non-farm payrolls](/api-data-docs/usd/non_farm_payrolls) and[EUR inflation](/api-data-docs/eur/inflation) pages include the exact endpoint paths, field descriptions, and example responses.

## Summary

You have wired FXMacroData into Claude Desktop in three steps: opened`claude_desktop_config.json`, added the FXMacroData MCP server block with`uvx`, and confirmed the connection with a`ping`call. From here every macro question you ask in Claude Desktop triggers a live data call — no browser tab-switching, no manual data imports, no stale training-set figures.

**Quick-start recap**
1. Open`claude_desktop_config.json`at the OS-specific path.
2. Add the`fxmacrodata`MCP server block (command:`uvx`, arg:`mcp-server-fxmacrodata`).
3. Set`FXMACRODATA_API_KEY`in the`env`object.
4. Fully quit and relaunch Claude Desktop.
5. Ask Claude to “use the FXMacroData ping tool” to confirm the connection.
6. Start querying live macro data in natural English.

Ready to explore what data is available? Browse the[FXMacroData API docs](/api-data-docs) for the full indicator catalogue, or check the[MCP server reference](/docs/mcp-server) for authentication options and the full tool schema. If you do not yet have an API key,[subscribe](/subscribe) to unlock all 18 currencies and the complete indicator set.

Source: FXMacroData
