Browse all documentation

Bring economic data into Cursor

Cursor can call Narwhal through a remote MCP server, with one API key and quota shared across REST and MCP. Store the key in your environment before starting Cursor, then ask for economic data while you work. The same connection includes currency rates, commodity data and the other live tool groups.

Quick start

  1. Get your free key from https://narwhalapi.com/signup.
  2. Set NARWHAL_API_KEY in your shell profile or system environment before starting Cursor.
  3. Add the remote server configuration to .cursor/mcp.json for this project or ~/.cursor/mcp.json for all projects.
  4. Enable Narwhal under Customize in the sidebar and check Available Tools.

MCP configuration

The remote entry uses url and headers, with ${env:NARWHAL_API_KEY} in the Authorization header. Cursor reads that reference from its environment; remote MCP servers do not support envFile.

.cursor/mcp.json
{
  "mcpServers": {
    "narwhal": {
      "url": "https://api.narwhalapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:NARWHAL_API_KEY}"
      }
    }
  }
}

Keep the configuration in the project file or the user file for the scope you need. After changing the system or shell environment, restart Cursor so the process has the key before it connects.

Tools you get

Cursor gets every read-only tool group through one Narwhal connection. Initialization and tool discovery cost no quota, while each successful tool call uses one request from the same allowance as REST.

GroupWhat you can ask forTools
Economic indicatorsAsk for CPI, inflation, unemployment, labour force participation, GDP, GDP growth and trade by country; coverage differs by indicator.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 economics_read_series_observations
Currency ratesAsk for current exchange rates, historical rates, currency conversions and rate bars for a currency pair.fx_get_rates fx_get_rate_history fx_convert_currency fx_get_rate_bars
Commodity pricesAsk for spot prices for gold, silver, platinum, palladium, copper, WTI crude oil, and Brent crude oil, their price history, and physical palm oil prices (crude palm oil and fresh fruit bunches).commodities_get_spot_price commodities_get_price_history commodities_list_palmoil_physical_series commodities_get_palmoil_physical_price commodities_get_palmoil_physical_observations commodities_list_physical_series commodities_get_physical_series commodities_get_physical_latest commodities_get_physical_observations
Releases and eventsAsk for official economic release dates and event details before you plan a country briefing.economics_list_releases economics_get_release events_list events_get
Public holidaysAsk for public holidays by country, holidays on a particular date or the next holiday.calendars_list_holidays calendars_get_holidays_on_date calendars_get_next_holiday
Prediction market oddsAsk for prediction market topics and events with scalar, extreme, timing and binary outcomes, their history, and policy paths by authority.predictions_list_topics predictions_get_topic predictions_list_events predictions_get_scalar predictions_get_extreme predictions_get_timing predictions_get_binary predictions_get_scalar_history predictions_get_extreme_history predictions_get_timing_history predictions_get_binary_history predictions_get_policy_path predictions_get_policy_path_history
Government bond yieldsAsk for government bond yield curves for the US, the UK, Germany, Japan, and Canada through the same Narwhal connection.economics_get_yield_curve economics_get_yield_curve_history

Example prompts

  • Get the latest unemployment value for Canada.
  • Show the current GBP/USD exchange rate.
  • Get the available palm oil price history.
  • Find the next official CPI release date for the United States.
  • List the public holidays in Japan for the current year.

Common workflows

Trace Canadian unemployment by period

Ask Cursor for Canada's unemployment observations with economics_get_unemployment_history in the economics group. The history lists observations by period.

Check a rate before a conversion

Is the current GBP/USD rate what you need? Call fx_get_rates with GBP as the base and USD as the quote currency.

Inspect palm oil history in Cursor

Ask Cursor to find a palm oil series using commodities_list_palmoil_physical_series, then read its period observations with commodities_get_palmoil_physical_observations and the selected series ID.

Plan a briefing around release dates

Plan the briefing with economics_list_releases: select the United States and a window no longer than 366 days. The entries include scheduled release dates and times.

Tips

  • Ask for a tool by name when you want Cursor to use a particular operation, or describe the data you need and check Available Tools.
  • Keep the actual key out of .cursor/mcp.json by using the environment reference in the header, including when the project file is shared.
  • Open the Output panel with Cmd+Shift+U and select MCP Logs when you need the connection error details.
  • Use Customize in the sidebar to enable, disable or manage the Narwhal server as your project needs change.

FAQ

How do I connect Cursor to Narwhal MCP?

Add a remote server entry with the Narwhal URL and Authorization Bearer header to your Cursor MCP configuration. Set NARWHAL_API_KEY before starting Cursor, then enable the server and inspect Available Tools.

Can Cursor load my key from an envFile?

No, remote servers in Cursor do not support envFile. Set the variable in your shell profile or system environment and reference it as ${env:NARWHAL_API_KEY} in the header.

What does a Narwhal call cost in Cursor?

Each successful tool call uses one request, and discovery uses no quota. The free plan includes 5,000 successful requests per UTC month with a short-window limit of 30 requests per minute.

Troubleshooting

SymptomCheck
Narwhal does not show under Available ToolsCheck the project or user .cursor/mcp.json, then enable the server under Customize in the sidebar.
Connection returns 401 invalid_api_keyCheck that NARWHAL_API_KEY contains an active key in the environment that starts Cursor, then restart Cursor.
The remote server cannot read an envFileMove the variable to your shell profile or system environment and use ${env:NARWHAL_API_KEY} in the Authorization header.
The connection fails after editing the URLUse exactly https://api.narwhalapi.com/mcp without a trailing slash, then inspect MCP Logs in the Output panel.