“Did U.S. CPI beat expectations? How did EUR/USD move after the release?” Answering that takes three pieces of data aligned in time: the official release, the consensus before publication, and FX prices measured from the release time. Headline and core CPI can tell different stories, and the first five minutes of trading can look very different from the first hour.

I built FX Context MCP to give AI clients tools for these queries. The Model Context Protocol connects the client to the tools. The server identifies releases, validates consensus snapshots, calculates price changes, and returns the results with their sources and coverage.

Architecture

FX Context MCP architecture. The AI client calls server tools that use official releases, consensus snapshots, and FX prices to return structured results.

The AI client connects to /mcp over Streamable HTTP and selects tools based on the question. For CPI, get_event_context returns the reported figure, consensus, and surprise for each metric. get_market_reaction returns price changes, highs, and lows for a currency pair across standard time windows. The client can use either tool on its own or combine the results.

One event ID ties the results together. The reference month identifies the release, and the publication timestamp anchors the consensus cutoff and price windows. In the example below, the eventId from the release tool matches the targetId from the market reaction tool. Keeping the reference month and publication timestamp separate also makes it clear why August CPI was published in September.

Each price window has its own coverage status. The tool defines five windows: 5 minutes, 15 minutes, 1 hour, 4 hours, and 24 hours. It returns the windows it could calculate and explains gaps such as market closures or missing prices.

A CPI release in practice

Take the August 2026 U.S. CPI release. It was published on September 11 at 12:30 UTC, so the referencePeriod for get_event_context is 2026-08, the month the data covers.

Headline CPI rose 0.4% month over month against a 0.3% pre-release consensus, a surprise of +0.1 percentage points. Core CPI rose 0.3%, in line with the 0.3% consensus. A summary that simply says “CPI beat expectations” misses that distinction. U.S. Bureau of Labor Statistics release

To look up EUR/USD for the same release, call get_market_reaction with:

{
  "targetType": "US_CPI",
  "dateOrPeriod": "2026-08",
  "instrument": "EURUSD"
}

The tool uses OANDA prices to calculate the return relative to the start of each window. These are the returns from that query, rounded to three decimal places.

Time after releaseEUR/USD return
5 minutes−0.129%
15 minutes−0.018%
1 hour+0.067%
4 hours+0.074%
24 hoursUnavailable because the market was closed at the window endpoint

EUR/USD was below its starting price after five minutes and above it after one hour. These windows show what happened after publication. Determining which figures drove the move would require more evidence.

Why the API makes timing and missing data explicit

A consensus snapshot must have a capture timestamp earlier than the release cutoff. The tool exposes that check through capturedAt and releaseCutoffAt, and keeps separate sources for the official figure and market consensus. In the CPI example, the index-derived headline monthly figure was 0.3960%, while the surprise used the published figure of 0.4%. The surprise.basis field records which figure the calculation used.

A verified surprise of zero and a missing consensus are distinct states. For example, the ISM manufacturing and services PMI tools can return the official headline figures, with consensusStatus set to NOT_CAPTURED and the surprise omitted. Historical comparisons also require verified expectations. If a target release lacks them, the tool explains why and can identify an earlier reference period to query explicitly.

What each tool answers

QuestionTool
What did CPI, nonfarm payrolls, PCE, or ISM PMI report?get_event_context
What changed in the Fed, ECB, Bank of England, or Bank of Japan statement?get_central_bank_changes
How did EUR/USD, GBP/USD, or USD/JPY move after the event?get_market_reaction
Which historical releases had surprise profiles like this one?get_historical_analogs
How did prices behave across those comparable releases?get_historical_reaction_context
Which scheduled macro events are coming up?get_upcoming_risks

Historical comparisons currently cover U.S. CPI and nonfarm payrolls. CPI comparisons use headline and core surprise distances. The payrolls comparison uses robust scaling to compare surprises across metrics. The individual results show how each release matched the target, while the aggregate results show the sample size, directional distribution, and median for each window.

Try it

Add a Streamable HTTP server in a client that supports remote MCP, using this endpoint:

https://fx.coco-pier.com/mcp

Then try asking:

Look up the August 2026 U.S. CPI release. Give me the headline and core monthly figures, their pre-release consensus, and the surprises. Then show how EUR/USD moved after 5 minutes, 1 hour, and 24 hours, and explain any missing window.