Skip to content

feat(adapters): add FXMacroData adapter for macro releases, calendars and FX rates - #892

Open
roberttidball wants to merge 1 commit into
HelpCode-ai:mainfrom
fxmacrodata:add-fxmacrodata-adapter
Open

roberttidball wants to merge 1 commit into
HelpCode-ai:mainfrom
fxmacrodata:add-fxmacrodata-adapter

Conversation

@roberttidball

Copy link
Copy Markdown

Summary

Adds an FXMacroData adapter to the catalog: official macroeconomic releases, central-bank policy rates, release calendars and FX rates for 22 currencies over the FXMacroData REST API (api.fxmacrodata.com/v1). Five read-only GET tools. It follows the shape of the Serply adapter (#765), and for the optional key it uses the pattern you added for Agent Skills Finder in #709.

Changes

  • packages/backend/src/adapters/intl/fxmacrodata.json: five tools.
    • fxmacrodata_data_catalogue is GET /data_catalogue/{currency}: indicator slugs with unit, frequency, source and coverage. It is also the probe, since it answers for every currency without a key.
    • fxmacrodata_latest_announcements is GET /announcements/{currency}/latest.
    • fxmacrodata_indicator_history is GET /announcements/{currency}/{indicator} with start_date, end_date, limit (1-100) and offset.
    • fxmacrodata_release_calendar is GET /calendar/{currency} with indicator, start_date, end_date.
    • fxmacrodata_fx_rates is GET /forex/{base}/{quote} (always needs a key).
  • Auth: authType: NONE, FXMACRODATA_API_KEY in optionalEnvVars, sent per tool as "X-API-Key": "${FXMACRODATA_API_KEY}" so the header is left out when the key is unset. The API answers an empty or wrong key with 401 invalid_api_key even on the free routes, so a static API_KEY authConfig would break keyless installs. envVarMeta marks the key as a secret credential and rejects whitespace in it at setup.
  • Currency parameters are enums of the 22 supported codes, dates carry a YYYY-MM-DD pattern, and every path uses encodePathParams, so an indicator value cannot be used to reach a different route.
  • No responseMapping, on purpose: keyless responses carry freemium_window (90-day cutoff) and freemium_delay (15-minute delay, withheld_count, message), and the instructions tell the model to surface those instead of presenting delayed data as current. The instructions also say that date is the reference period and that release timing is announcement_datetime.
  • fxmacrodata.live.spec.ts: static checks always run with mocked axios (no header without a key, header with one, URL and query for every tool, encoded path values, a 401 is raised and not returned as data, enum/date/limit constraints, read-only annotations, instructions only name tools that exist). Live calls run behind RUN_FXMACRODATA_LIVE=1, same pattern as agent-skills.live.spec.ts.
  • catalog.ts entry, logo at logos/connectors/fxmacrodata.svg (the FXMacroData mark), and counts bumped to 263 adapters / 16 keyless per adapter-count.mjs --check.

Without a key the API serves the data catalogue for every currency, the USD release calendar, and USD announcements for the most recent 90 days on a 15-minute delay (fair use 100 requests a day). Other currencies, FX rates, full history and real-time releases need a key.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)
$ node scripts/validate-adapters.mjs --warn
Validated 269 adapters: 269 passed, 0 failed   (no warnings for fxmacrodata.json)
$ node scripts/adapter-count.mjs --check
OK: every quoted count equals 263 adapters (16 keyless, 2483 tools).
$ node scripts/regenerate-catalog.mjs && git diff --exit-code -- packages/backend/src/adapters/catalog.ts
(no diff)
$ node --test scripts/validate-adapters.test.mjs
pass 24, fail 0
$ jest src/adapters/catalog.spec.ts src/adapters/intl/fxmacrodata.live.spec.ts src/adapters/intl/serply.live.spec.ts src/adapters/env-var-meta.spec.ts
Tests: 3341 passed, 9 skipped
$ RUN_FXMACRODATA_LIVE=1 jest src/adapters/intl/fxmacrodata.live.spec.ts
Tests: 22 passed, 1 skipped   (catalogue, USD latest/history/calendar answer keyless; FX rates get 401 without a key; the keyed EUR/USD test is skipped)

I ran these in a throwaway container with only the backend test dependencies installed, not a full npm ci, so the Prisma client and bcrypt were stubbed (neither is reached by these specs), and tsc --noEmit showed no errors in the touched files. I did not run eslint or the full backend suite.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable): setup and parameters are in the adapter's instructions, as with the other adapters
  • All existing tests pass (npm test): I ran the catalog, env-var-meta, Serply and new adapter suites, not the whole backend suite
  • This PR has a descriptive title

Related Issues

None. Nothing changes for anyone who doesn't install the adapter.

AI tools helped draft this; I reviewed and tested it.

Disclosure: I run FXMacroData. Happy to adjust scope or naming, or drop this if it isn't a fit for the catalog.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

👋 Welcome, @roberttidball, and thanks for opening your first PR on AnythingMCP!

A few quick pointers:

  • Make sure CI is green before requesting review (Backend, Frontend, Playwright, CodeQL, Trivy).
  • If this is a new adapter, the parametrised catalog.spec.ts test will validate it automatically.
  • Sign off your commits if you can — it's not blocking, just nice to have.

Someone from the core team will look at this within ~48h. If you don't hear back, please ping us in Discussions / Q&A.

⭐ While you wait — if you find AnythingMCP useful, a star helps others discover it.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant