Browse all documentation

Connect Cursor to Narwhal MCP

Add Narwhal's hosted Streamable HTTP MCP server to Cursor and sign in with your Narwhal account.

Cursor accepts hosted HTTP MCP servers in .cursor/mcp.json. Add the Narwhal server and sign in with your Narwhal account.

Configure Cursor

Choose Add to Cursor. Cursor opens and asks you to confirm the Narwhal server.

Add to Cursor

In Cursor's MCP settings, choose Connect next to the Narwhal server, sign in with your Narwhal account, and choose Allow on the Narwhal consent screen.

To add the server by hand instead, create or open .cursor/mcp.json in the project or your user configuration, then add:

.cursor/mcp.json
{
  "mcpServers": {
    "narwhal": {
      "url": "https://api.narwhalapi.com/mcp"
    }
  }
}

If your client cannot sign in, use your API key instead. Replace the entry with this configuration:

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

Make sure the variable is available to the client that launches Cursor. Restart or reload MCP servers after saving the file. See Cursor's MCP configuration guide for current client behavior.

Verify the connection

Open the client's MCP server list and confirm that narwhal is connected. For a command-line check, run agent mcp list.

Then ask the client to list the available Narwhal tools. Tool discovery costs nothing; each successful tools/call costs one call at the price of its API.

Use the main MCP guide for the public tool list, arguments, response shape and credit rules.

Keep the key private

If you use an API key, use Cursor's or VS Code's secure variable/input storage for the placeholder. Do not commit a real key to mcp.json, paste it into a prompt, put it in a URL, or expose it in browser code.

Every request requires the Authorization: Bearer header. See the authentication guide for key storage and rotation.

Was this page helpful?