Documentation

Authentication

Two ways in: API keys for the REST API, sign-in for MCP.

Needle authenticates in two ways. The REST API takes an API key in the Authorization header. MCP apps sign in with OAuth in your browser and send their own token from then on. Missing or invalid credentials return 401.

MCP

Claude, ChatGPT, Grok, Cursor and other MCP apps open a Needle sign-in page in your browser: sign in, click Allow, and the connection is done. Tokens expire after an hour and refresh on their own; the connection shows under Settings, where you can disconnect it.

Name
Needle MCP
Server URL
https://needle.app/mcp/v1
Authentication
OAuth

Add a custom MCP server in your app with these values, then sign in to Needle and click Allow. Step-by-step setup for Claude, ChatGPT, Grok and Cursor is in Needle MCP.

Prefer a key? Any app can send an API key in the same header as the REST API instead of signing in. The tool list at /mcp/v1/tools is public.

REST API

Request header
Authorization: Bearer sk-ndl-…

Send this header on every request to /api/v1. See the API Reference.

Create a key

  1. 1

    Open API keys in the dashboard.

  2. 2

    Create a key. It looks like sk-ndl-….

  3. 3

    Copy it once. The full key is only shown then.

Scope

Each key is bound to one user and one workspace. The dashboard, API, and MCP all work in the workspace the key is bound to.

User

The key acts as the user who created it.

Workspace

Requests run in the workspace the key is bound to.

Example

curl https://needle.app/api/v1/me \
  -H "Authorization: Bearer sk-ndl-…" \
  -H "Content-Type: application/json"

Search docs

Search documentation, API reference, and MCP tools

We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy