Browse all documentation

Connect through MCP

Use the same Narwhal key and public API schemas from an MCP client.

Narwhal exposes one stateless Streamable HTTP MCP endpoint. It uses the same enabled data APIs, response schemas, authentication, and credit as REST.

Connect

Add the remote server https://api.narwhalapi.com/mcp to your MCP client. Choose Connect, sign in with your Narwhal account, and choose Allow on the Narwhal consent screen.

If your client cannot sign in, use your API key instead.

Add the remote server URL and Bearer header to an MCP client that supports authenticated Streamable HTTP.

Client-neutral field map
{
  "url": "https://api.narwhalapi.com/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_NARWHAL_API_KEY"
  }
}

This is a field map, not a copy-paste file. Replace YOUR_NARWHAL_API_KEY through your client's secure secret setting. JSON does not expand shell variables by itself, and MCP clients use different environment-variable syntax.

Do not paste a real key into a shared configuration file.

Available tools

tools/list returns the public read-only tools enabled for this release profile. The catalogue below is the public tool set, not a promise that every source has a value for every input.

economics_get_cpieconomics_get_inflationeconomics_get_unemploymenteconomics_get_labour_force_participationeconomics_get_gdpeconomics_get_gdp_growtheconomics_get_tradeeconomics_get_cpi_historyeconomics_get_inflation_historyeconomics_get_unemployment_historyeconomics_get_labour_force_participation_historyeconomics_get_gdp_historyeconomics_get_gdp_growth_historyeconomics_get_trade_historyeconomics_read_series_observationseconomics_search_catalogueeconomics_read_catalogue_serieseconomics_read_catalogue_observationseconomics_read_catalogue_latest_batcheconomics_get_policy_rateeconomics_get_policy_rate_historyeconomics_get_central_bank_reserveseconomics_get_central_bank_balance_sheeteconomics_get_rate_decisionsfilings_search_companiesfilings_get_companyfilings_get_financialsfilings_list_company_filingsfilings_get_filingfilings_list_latest_filingsfilings_list_holdersfilings_get_as_reportedfx_get_ratesfx_get_rate_historyfx_convert_currencyfx_get_rate_barscommodities_get_spot_pricecommodities_get_price_historycommodities_list_palmoil_physical_seriescommodities_get_palmoil_physical_pricecommodities_get_palmoil_physical_observationscommodities_list_physical_seriescommodities_get_physical_seriescommodities_get_physical_latestcommodities_get_physical_observationseconomics_list_releaseseconomics_get_releaseevents_listevents_getpredictions_list_topicspredictions_get_topicpredictions_list_eventspredictions_get_scalarpredictions_get_extremepredictions_get_timingpredictions_get_binarypredictions_get_scalar_historypredictions_get_extreme_historypredictions_get_timing_historypredictions_get_binary_historypredictions_get_policy_pathpredictions_get_policy_path_historycalendars_list_holidayscalendars_get_holidays_on_datecalendars_get_next_holidayeconomics_get_yield_curveeconomics_get_yield_curve_history

Monitors

A monitor sends a signed JSON event to an HTTPS URL when a new figure arrives. These seven tools create and manage monitors with the same inputs, results and errors as the /v1/webhooks routes. They are not read-only, and they take no credit. A monitor needs a public HTTPS URL that your agent or its backend controls. An agent with no endpoint should poll events_list instead.

ToolWhat it does
monitors_createCreate a monitor from a URL, countries and families. Returns the signing secret once.
monitors_listList the account's monitors and how many it may enable.
monitors_updatePause or resume a monitor, or change its URL, countries or families. What you leave out stays as it is.
monitors_deleteDelete a monitor.
monitors_send_testSend a signed test event to the monitor's URL.
monitors_list_deliveriesList what was sent to the URL, with the status of each attempt.
monitors_replay_deliverySend an earlier delivery again. Its event id stays the same.

The signing secret is shown only in the result of monitors_create. The agent must hand it to the user's backend to store. Each event carries x-narwhal-timestamp and x-narwhal-signature; the backend recomputes the HMAC-SHA256 of the timestamp, a dot and the raw body with the secret and compares it with the signature before it trusts the body. The steps are in the webhooks reference. An account can keep 25 monitors, and all of them can be enabled. A country with no public data stream is refused, and the error names it. An account created by agent sign-up gets account_pending until the user has verified it.

An app sign-in, such as a Claude or ChatGPT connector, cannot manage monitors. The monitor tools are left out of its tool list, and a call answers status 403 with api_key_required. A connection with an API key can manage monitors.

A monitor sends a delivery only when a new figure arrives. A figure changed later, a date change and a cancelled release are not sent and not charged. The families are `gdp`, `prices`, `labour`, `trade`, `policy_rate`, `yield_curve`, `predictions` and `filings`, and any other is refused. A monitor fires only for releases Narwhal has for that country.

A release day can produce a calendar event and a data event for one publication. A monitor that matches both gets one delivery: release.updated carries the release and, when the values can be read, the data, and the linked dataset.published event is not sent to the same monitor when that release carries the figure. Every event type, field and example body is in the receive webhooks guide.

Arguments and results

Latest-release tools accept country, optional period and optional version_id. History tools accept country, optional start and end, plus limit and cursor for pagination.

Tool arguments
{
  "country": "USA",
  "period": "2026-07"
}
ToolPeriodOther arguments
economics_get_cpiYYYY-MMversion_id
economics_get_inflationYYYY-MMversion_id
economics_get_unemploymentYYYY, YYYY-MM, or YYYY-QNversion_id
economics_get_labour_force_participationYYYY, YYYY-MM, or YYYY-QNversion_id
economics_get_gdpYYYY-QNversion_id
economics_get_gdp_growthYYYY-QNversion_id
economics_get_tradeYYYY or YYYY-MMversion_id
economics_get_cpi_historyYYYY-MMstart, end, limit, and cursor
economics_get_inflation_historyYYYY-MMstart, end, limit, and cursor
economics_get_unemployment_historyYYYY, YYYY-MM, or YYYY-QNstart, end, limit, and cursor
economics_get_labour_force_participation_historyYYYY, YYYY-MM, or YYYY-QNstart, end, limit, and cursor
economics_get_gdp_historyYYYY-QNstart, end, limit, and cursor
economics_get_gdp_growth_historyYYYY-QNstart, end, limit, and cursor
economics_get_trade_historyYYYY-MMstart, end, limit, and cursor

Successful tool calls return schema-valid structuredContent plus the same JSON serialized as text for client compatibility. MCP problems use the same public status and code vocabulary as REST.

Credit behavior

Initialization and tool discovery cost nothing. Each successful tools/call takes the same credit as the matching REST call, at the price of its API. A tool that takes several ids costs one call for each id.

First tools/call
{
  "method": "tools/call",
  "params": {
    "name": "fx_get_rates",
    "arguments": { "base": "USD", "currencies": ["EUR", "JPY"] }
  }
}

Free credit gives $10 a month for the first 12 months of an account. The limit is 50 requests a minute on free credit and 500 once the account holds paid credit. X-Narwhal-Cost and X-Narwhal-Balance show what a call cost and what is left. The X-RateLimit-* headers describe the per-minute limit. Too many requests in a minute return 429 rate_limit_exceeded; a balance that cannot pay for the call returns 402 insufficient_credits.

Troubleshooting

SymptomCheck
401 invalid_api_keyConfirm the exact Bearer header and that the key is still active.
Connection follows a redirectUse exactly https://api.narwhalapi.com/mcp without a trailing slash.
Tool is missingOnly the public tools listed above are available.
Tool returns a problemRead its structured status, code, detail, and request ID. See Errors and credits.

Was this page helpful?