> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Needle in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/needle
Last updated: 2026-11-24

Share Needle with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 13 tools (8 read-only).

---

To give your team Needle in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Needle integration in a Metorial portal, and each person connects with an API key. Agents can manage Needle document collections, add and remove indexed files, retrieve indexing statistics, and search document passages. The integration has 13 tools, 8 read-only, 3 write and 2 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares Needle in a portal and how each person connects
- What Needle asks for when you connect, and where to find it
- How to keep the 8 read-only tools and reject the other 5

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An API key from Needle for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

| Method | Type | What a person provides |
| --- | --- | --- |
| **API Key** | API token | `apiKey` |

### API Key

To connect, a person enters:

- `apiKey`: Needle API key obtained from the Developer Settings page at https://needle.app/dashboard/settings

## Admin: share Needle in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Needle. For how members connect, choose **Each person connects** so everyone enters their own API key, or **Shared connection** to enter one API key for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Needle.

4. **Choose who gets it**

   Add the access groups that should see Needle. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Needle integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search needle
```

## Employee: connect Needle

### In the portal

1. **Open Needle in the catalog**

   Sign in to your portal and open Needle. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your API key (apiKey).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search needle
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Needle connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list needle
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 8 read-only tools, such as `get_collection` and `list_connectors`, and lose the 3 write tools, such as `create_collection` or `get_file_upload_url`, and the 2 destructive tools, such as `delete_collection` or `delete_files_from_collection`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list needle
metorial tools <integration-id>
metorial call <integration-id> list_connectors -d '{}'
```

`metorial tools` lists the 13 tools, minus any you rejected. `list_connectors` takes no input. It lists all configured data source connectors.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (8)

- `list_collection_files`: List files in a collection with pagination support. Needs `collectionId`.
- `list_collections`: List all document collections accessible to the authenticated user.
- `list_connectors`: List all configured data source connectors.
- `get_collection`: Retrieve details and statistics for a specific collection, including file counts, chunk counts, character counts, and indexing status breakdown. Needs `collectionId`.
- `search_collection`: Perform AI-powered semantic search across all documents in a collection. Needs `collectionId` and `query`.
- `get_file_download_url`: Prepare a downloadable file and return its signed download URL. Needs `fileId`.
- `list_connector_files`: List files synchronized by a data source connector, including file IDs, source URLs, sizes, and timestamps.
- `get_collection_stats`: Retrieve collection indexing statistics, including file counts, byte sizes, indexed chunks, characters, and users.

### Write tools (3)

- `get_file_upload_url`: Generate signed upload URLs for uploading local or private files to Needle. Needs `contentTypes`.
- `create_collection`: Create a new document collection. Needs `name`.
- `add_files_to_collection`: Add one or more files to a collection by providing a URL for each file. Needs `collectionId` and `files`.

### Destructive tools (2)

- `delete_collection`: Permanently delete a collection and all its indexed files. Needs `collectionId`.
- `delete_files_from_collection`: Remove one or more files from a collection by their file IDs. Needs `collectionId` and `fileIds`.

## Triggers

Needle has 1 trigger, which fire on events in Needle:

- `inbound_webhook`

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Needle there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Needle on metorial.com](https://metorial.com/integrations/needle): the integration overview