---
title: "MCP Integration Guide | Narwhal API"
description: "Connect an MCP client, discover public Narwhal tools, and understand results and credit behavior."
url: "https://narwhalapi.com/docs/mcp"
---

# Connect through MCP

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

[Get a free API key](https://narwhalapi.com/signup)

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

## Connect

- [MCP server overview](https://narwhalapi.com/mcp.md)
- [Claude Code setup](https://narwhalapi.com/docs/mcp/claude.md)
- [Cursor setup](https://narwhalapi.com/docs/mcp/cursor.md)
- [VS Code setup](https://narwhalapi.com/docs/mcp/vscode.md)

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_cpi` `economics_get_inflation` `economics_get_unemployment` `economics_get_labour_force_participation` `economics_get_gdp` `economics_get_gdp_growth` `economics_get_trade` `economics_get_cpi_history` `economics_get_inflation_history` `economics_get_unemployment_history` `economics_get_labour_force_participation_history` `economics_get_gdp_history` `economics_get_gdp_growth_history` `economics_get_trade_history` `fx_get_rates` `fx_get_rate_history` `fx_convert_currency` `commodities_list_palmoil_physical_series` `commodities_get_palmoil_physical_price` `commodities_get_palmoil_physical_observations` `calendars_list_holidays` `calendars_get_holidays_on_date` `calendars_get_next_holiday` `economics_get_yield_curve` `economics_get_yield_curve_history` `economics_list_releases` `economics_get_release` `commodities_get_spot_price` `economics_read_series_observations` `predictions_list_topics` `predictions_get_topic` `predictions_list_events` `predictions_get_scalar` `predictions_get_scalar_history` `predictions_get_extreme` `predictions_get_extreme_history` `predictions_get_timing` `predictions_get_timing_history` `predictions_get_binary` `predictions_get_binary_history` `predictions_get_policy_path` `predictions_get_policy_path_history` `economics_get_policy_rate` `economics_get_policy_rate_history` `economics_get_central_bank_reserves` `economics_get_central_bank_balance_sheet` `calendars_get_exchange_closures` `calendars_get_exchange_status` `calendars_list_exchanges` `calendars_get_business_days` `economics_get_population_history` `economics_get_regional_cpi` `economics_get_regional_gdp` `calendars_convert_dates` `calendars_find_dates` `calendars_get_hijri_year` `economics_get_equity_risk_premium` `economics_get_equity_risk_premium_history` `economics_list_equity_risk_premium` `economics_get_rate_decisions` `economics_get_industrial_production` `economics_get_industrial_production_history` `economics_get_retail_sales` `economics_get_retail_sales_history` `economics_get_producer_prices` `economics_get_producer_prices_history` `economics_get_average_wages` `economics_get_average_wages_history` `economics_get_real_gdp` `economics_get_real_gdp_history` `economics_get_gdp_deflator` `economics_get_gdp_deflator_history` `economics_get_household_consumption` `economics_get_household_consumption_history` `economics_get_government_consumption` `economics_get_government_consumption_history` `economics_get_gross_fixed_capital_formation` `economics_get_gross_fixed_capital_formation_history` `economics_get_harmonised_inflation` `economics_get_harmonised_inflation_history` `economics_list_series` `economics_get_current_account` `economics_get_current_account_history` `economics_get_money_supply` `economics_get_money_supply_history` `equities` `economics_get_credit_rating` `economics_list_credit_ratings` `economics_get_inflation_calculator` `economics_get_country_profile` `fx_list_currencies` `economics_get_reference_rates` `predictions_list_accuracy` `predictions_get_accuracy` `economics_get_forecasts` `trade_list_hs_codes` `trade_get_hs_code` `trade_get_coverage` `trade_get_partners` `trade_get_products` `trade_get_product` `trade_get_flows` `filings_search_companies` `filings_get_company` `filings_get_financials` `filings_list_company_filings` `filings_get_filing` `filings_list_latest_filings` `filings_list_holders` `filings_get_as_reported` `filings_screen_companies` `filings_get_screen_filters` `filings_search_line_items` `filings_get_sections` `filings_get_company_sections` `filings_list_section_items` `filings_list_institutional_holders` `filings_list_investor_holdings` `filings_search_investors` `filings_list_investor_filings` `filings_list_fund_holdings` `filings_list_company_funds` `calendars_list_registrations` `filings_list_beneficial_owners` `filings_list_investor_beneficial_ownership` `filings_search_beneficial_ownership_filers` `filings_search_beneficial_ownership_companies` `filings_list_congress_feed` `filings_list_congress_trades` `filings_list_congress_members` `filings_list_congress_member_trades` `filings_list_insider_trades` `filings_list_insider_ownership` `filings_list_insider_feed` `filings_list_insider_person_trades` `filings_list_company_insiders` `filings_get_insider_activity` `filings_list_insider_transaction_codes` `filings_list_insider_statements` `funds` `crypto` `company_calendars` `economics_search_catalogue` `economics_read_catalogue_series` `economics_read_catalogue_observations` `economics_read_catalogue_latest_batch` `commodities_get_price_history` `fx_get_rate_bars` `commodities_list_physical_series` `commodities_get_physical_series` `commodities_get_physical_latest` `commodities_get_physical_observations` `events_list` `events_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.

| Tool | What it does |
| --- | --- |
| `monitors_create` | Create a monitor from a URL, countries and families. Returns the signing secret once. |
| `monitors_list` | List the account's monitors and how many it may enable. |
| `monitors_update` | Pause or resume a monitor, or change its URL, countries or families. What you leave out stays as it is. |
| `monitors_delete` | Delete a monitor. |
| `monitors_send_test` | Send a signed test event to the monitor's URL. |
| `monitors_list_deliveries` | List what was sent to the URL, with the status of each attempt. |
| `monitors_replay_delivery` | Send 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](https://narwhalapi.com/docs/api/webhooks.md). 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](https://narwhalapi.com/how-to/receive-webhooks.md).

## 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.

| Field | What it holds |
| --- | --- |
| `wanted` | Required. What was wanted, in one plain sentence. At most 300 characters. |
| `area` | The area the data belongs to. One of `calendars`, `commodities`, `company_calendars`, `crypto`, `economics`, `equities`, `events`, `filings`, `funds`, `futures`, `fx`, `indices`, `predictions`, `trade`, `other`. |
| `country` | ISO 3166 three-letter country code, when the data is about one country. |
| `tried` | The tool you called that did not have it. |
| `source_url` | A 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.

| Refusal | Detail |
| --- | --- |
| `429 limit_reached` | This account has sent 20 reports today. Send more tomorrow. |
| `403 api_key_required` | Missing 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_query` | A 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"
}
```

| Tool | Period | Other arguments |
| --- | --- | --- |
| [`economics_get_cpi`](https://narwhalapi.com/docs/api/economics/cpi.md) | `YYYY-MM` | `version_id` |
| [`economics_get_inflation`](https://narwhalapi.com/docs/api/economics/inflation.md) | `YYYY-MM or YYYY-QN` | `version_id` |
| [`economics_get_unemployment`](https://narwhalapi.com/docs/api/economics/unemployment.md) | `YYYY, YYYY-MM, or YYYY-QN` | `version_id` |
| [`economics_get_labour_force_participation`](https://narwhalapi.com/docs/api/economics/labour-force-participation.md) | `YYYY, YYYY-MM, or YYYY-QN` | `version_id` |
| [`economics_get_gdp`](https://narwhalapi.com/docs/api/economics/gdp.md) | `YYYY-QN` | `version_id` |
| [`economics_get_gdp_growth`](https://narwhalapi.com/docs/api/economics/gdp-growth.md) | `YYYY-QN` | `version_id` |
| [`economics_get_trade`](https://narwhalapi.com/docs/api/economics/trade.md) | `YYYY or YYYY-MM` | `version_id` |
| [`economics_get_current_account`](https://narwhalapi.com/docs/api/economics/current-account.md) | `YYYY-QN` | `version_id` |
| [`economics_get_harmonised_inflation`](https://narwhalapi.com/docs/api/economics/harmonised-inflation.md) | `YYYY-MM` | `version_id` |
| [`economics_get_industrial_production`](https://narwhalapi.com/docs/api/economics/industrial-production.md) | `YYYY-MM` | `version_id` |
| [`economics_get_money_supply`](https://narwhalapi.com/docs/api/economics/money-supply.md) | `YYYY-MM` | `version_id` |
| [`economics_get_producer_prices`](https://narwhalapi.com/docs/api/economics/producer-prices.md) | `YYYY-MM` | `version_id` |
| [`economics_get_cpi_history`](https://narwhalapi.com/docs/api/economics/cpi-history.md) | `YYYY-MM` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_inflation_history`](https://narwhalapi.com/docs/api/economics/inflation-history.md) | `YYYY-MM or YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_unemployment_history`](https://narwhalapi.com/docs/api/economics/unemployment-history.md) | `YYYY-MM or YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_labour_force_participation_history`](https://narwhalapi.com/docs/api/economics/labour-force-participation-history.md) | `YYYY-MM or YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_gdp_history`](https://narwhalapi.com/docs/api/economics/gdp-history.md) | `YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_gdp_growth_history`](https://narwhalapi.com/docs/api/economics/gdp-growth-history.md) | `YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_trade_history`](https://narwhalapi.com/docs/api/economics/trade-history.md) | `YYYY-MM` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_population_history`](https://narwhalapi.com/docs/api/economics/population-history.md) | `YYYY` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_current_account_history`](https://narwhalapi.com/docs/api/economics/current-account-history.md) | `YYYY-QN` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_harmonised_inflation_history`](https://narwhalapi.com/docs/api/economics/harmonised-inflation-history.md) | `YYYY-MM` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_industrial_production_history`](https://narwhalapi.com/docs/api/economics/industrial-production-history.md) | `YYYY-MM` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_money_supply_history`](https://narwhalapi.com/docs/api/economics/money-supply-history.md) | `YYYY-MM` | `start`, `end`, `limit`, and `cursor` |
| [`economics_get_producer_prices_history`](https://narwhalapi.com/docs/api/economics/producer-prices-history.md) | `YYYY-MM` | `start`, `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

| Symptom | Check |
| --- | --- |
| `401 invalid_api_key` | Confirm the exact Bearer header and that the key is still active. |
| Connection follows a redirect | Use exactly `https://api.narwhalapi.com/mcp` without a trailing slash. |
| Tool is missing | Only the public tools listed above are available. |
| Tool returns a problem | Read its structured status, code, detail, and request ID. See [Errors and credits](https://narwhalapi.com/docs/errors.md). |

Was this page helpful?
