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 tools enabled for this release profile. The data tools are read-only; the monitor tools and report_missing_data change state. 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_historyfx_get_ratesfx_get_rate_historyfx_convert_currencycommodities_list_palmoil_physical_seriescommodities_get_palmoil_physical_pricecommodities_get_palmoil_physical_observationscalendars_list_holidayscalendars_get_holidays_on_datecalendars_get_next_holidayeconomics_get_yield_curveeconomics_get_yield_curve_historyeconomics_list_releaseseconomics_get_releasecommodities_get_spot_priceeconomics_read_series_observationspredictions_list_topicspredictions_get_topicpredictions_list_eventspredictions_get_scalarpredictions_get_scalar_historypredictions_get_extremepredictions_get_extreme_historypredictions_get_timingpredictions_get_timing_historypredictions_get_binarypredictions_get_binary_historypredictions_get_policy_pathpredictions_get_policy_path_historyeconomics_get_policy_rateeconomics_get_policy_rate_historyeconomics_get_central_bank_reserveseconomics_get_central_bank_balance_sheetcalendars_get_exchange_closurescalendars_get_exchange_statuscalendars_list_exchangescalendars_get_business_dayseconomics_get_population_historyeconomics_get_regional_cpieconomics_get_regional_gdpcalendars_convert_datescalendars_find_datescalendars_get_hijri_yeareconomics_get_equity_risk_premiumeconomics_get_equity_risk_premium_historyeconomics_list_equity_risk_premiumeconomics_get_rate_decisionseconomics_get_industrial_productioneconomics_get_industrial_production_historyeconomics_get_retail_saleseconomics_get_retail_sales_historyeconomics_get_producer_priceseconomics_get_producer_prices_historyeconomics_get_average_wageseconomics_get_average_wages_historyeconomics_get_real_gdpeconomics_get_real_gdp_historyeconomics_get_gdp_deflatoreconomics_get_gdp_deflator_historyeconomics_get_household_consumptioneconomics_get_household_consumption_historyeconomics_get_government_consumptioneconomics_get_government_consumption_historyeconomics_get_gross_fixed_capital_formationeconomics_get_gross_fixed_capital_formation_historyeconomics_get_harmonised_inflationeconomics_get_harmonised_inflation_historyeconomics_list_serieseconomics_get_current_accounteconomics_get_current_account_historyeconomics_get_money_supplyeconomics_get_money_supply_historyequitieseconomics_get_credit_ratingeconomics_list_credit_ratingseconomics_get_inflation_calculatoreconomics_get_country_profilefx_list_currencieseconomics_get_reference_ratespredictions_list_accuracypredictions_get_accuracyeconomics_get_forecaststrade_list_hs_codestrade_get_hs_codetrade_get_coveragetrade_get_partnerstrade_get_productstrade_get_producttrade_get_flowsfilings_search_companiesfilings_get_companyfilings_get_financialsfilings_list_company_filingsfilings_get_filingfilings_list_latest_filingsfilings_list_holdersfilings_get_as_reportedfilings_screen_companiesfilings_get_screen_filtersfilings_search_line_itemsfilings_get_sectionsfilings_get_company_sectionsfilings_list_section_itemsfilings_list_institutional_holdersfilings_list_investor_holdingsfilings_search_investorsfilings_list_investor_filingsfilings_list_fund_holdingsfilings_list_company_fundscalendars_list_registrationsfilings_list_beneficial_ownersfilings_list_investor_beneficial_ownershipfilings_search_beneficial_ownership_filersfilings_search_beneficial_ownership_companiesfilings_list_congress_feedfilings_list_congress_tradesfilings_list_congress_membersfilings_list_congress_member_tradesfilings_list_insider_tradesfilings_list_insider_ownershipfilings_list_insider_feedfilings_list_insider_person_tradesfilings_list_company_insidersfilings_get_insider_activityfilings_list_insider_transaction_codesfilings_list_insider_statementsfundscryptocompany_calendarseconomics_search_catalogueeconomics_read_catalogue_serieseconomics_read_catalogue_observationseconomics_read_catalogue_latest_batchcommodities_get_price_historyfx_get_rate_barscommodities_list_physical_seriescommodities_get_physical_seriescommodities_get_physical_latestcommodities_get_physical_observationsevents_listevents_get

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 that no event of the chosen families can reach is refused, and the error names it. The dashboard lists the countries each release type can fire for. 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.

Report missing data

Tell Narwhal about data you looked for and did not find. Say what was wanted in one sentence: the figure, the country or market, and the period. Free, 20 a day.

The tool is report_missing_data. It takes no credit and returns no data. Narwhal reads the reports to decide what data to add.

Report call
{ "name": "report_missing_data",
  "arguments": {
    "wanted": "Monthly palm oil stocks in Sabah for 2025" } }

The result is { "status": "recorded" }. The status is already_recorded when this account sent the same report earlier today.

FieldWhat it holds
wantedRequired. What was wanted, in one plain sentence. At most 300 characters.
areaThe area the data belongs to. One of calendars, commodities, company_calendars, crypto, economics, equities, events, filings, funds, futures, fx, indices, predictions, trade, other.
countryISO 3166 three-letter country code, when the data is about one country.
triedThe tool you called that did not have it.
source_urlA public page that publishes the data.

An app sign-in, such as a Claude or ChatGPT connector, cannot report missing data. The tool is left out of its tool list, and a call answers status 403 with api_key_required. A connection with an API key can report.

When a tool answers not_covered or a not-found code to a connection with an API key, its result carries one more line of text: If you expected Narwhal to have this data, call report_missing_data and say what was wanted.

RefusalDetail
429 limit_reachedThis account has sent 20 reports today. Send more tomorrow.
403 api_key_requiredMissing data cannot be reported through an app sign-in. Connect to this MCP server with a Narwhal API key as a Bearer token.
400 invalid_queryA field is missing or not well formed. The detail names the field.

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-MM or YYYY-QNversion_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_current_accountYYYY-QNversion_id
economics_get_harmonised_inflationYYYY-MMversion_id
economics_get_industrial_productionYYYY-MMversion_id
economics_get_money_supplyYYYY-MMversion_id
economics_get_producer_pricesYYYY-MMversion_id
economics_get_cpi_historyYYYY-MMstart, end, limit, and cursor
economics_get_inflation_historyYYYY-MM or YYYY-QNstart, end, limit, and cursor
economics_get_unemployment_historyYYYY-MM or YYYY-QNstart, end, limit, and cursor
economics_get_labour_force_participation_historyYYYY-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
economics_get_population_historyYYYYstart, end, limit, and cursor
economics_get_current_account_historyYYYY-QNstart, end, limit, and cursor
economics_get_harmonised_inflation_historyYYYY-MMstart, end, limit, and cursor
economics_get_industrial_production_historyYYYY-MMstart, end, limit, and cursor
economics_get_money_supply_historyYYYY-MMstart, end, limit, and cursor
economics_get_producer_prices_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"] }
  }
}

Every account gets $10 free every month. 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 your request bucket: Limit is its size (the burst), Remaining is what is left and Reset is when it is full again. It refills at the per-minute rate. Too many requests too fast 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?