# Needle — MCP server on mcp.ai > Connect your Needle account and use 16 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Needle provides retrieval-augmented generation (RAG) tools that enable semantic search across your data, facilitating the development of AI agents and applications. By: mcp.ai · official Page: https://mcp.ai/needle ## Connect (MCP protocol) Remote MCP endpoint (HTTP, streamable): https://api.mcp.ai/p_needle?ms=1787293560000 Add it as a custom/remote MCP connector, then authenticate when prompted. ## REST API (no MCP client required) Every tool is also a REST endpoint, authed with a workspace API key. Discover: GET https://api.mcp.ai/api/needle/_endpoints # public; lists every endpoint Call: POST https://api.mcp.ai/api/needle/ Authorization: Bearer sk_live_… # create one at https://mcp.ai/settings/api-keys Content-Type: application/json Body: { …args } → { "ok": true, "tool": "", "result": { … } } ## Developer docs How to use (MCP or REST), markdown: https://mcp.ai/needle/skill.md Postman collection (v2.1): https://mcp.ai/needle/postman.json ## Tools - needle_add_files_to_collection(files: object[], collection_id: string) — Tool to add files to a collection by providing file URLs. Use when you need to add one or more files to an existing collection. URLs can be public or private (generated via the Files API). - needle_add_files_to_local_connector(files: object[], connector_id: string) — Tool to add files to a local connector by providing file metadata. Use when you need to add external files to a connector using their URLs. - needle_create_collection(name: string, metadata?: object, description?: string) — Tool to create a new collection. Use after confirming the collection name. - needle_create_local_connector(os: string, cpu: string, name: string, folders: object[], device_name: string, device_model: string, serial_number: string, collection_ids: string[]) — Tool to create a local connector that monitors specified folders on a device. Use when setting up file indexing from a local machine into Needle collections. - needle_delete_files_from_collection(file_ids: string[], collection_id: string) — Tool to delete files from a specific collection by providing file IDs. Use after confirming valid file IDs to remove from the collection. - needle_delete_files_from_local_connector(by: string, name?: string, file_ids?: string[], connector_id: string) — Tool to delete files from a local connector by filename or file IDs. Use when you need to remove files from a connector's local storage. - needle_get_collection(collection_id: string) — Tool to retrieve details for a specific collection by its ID. Use when you need to get collection metadata including name, creation date, and search query count. - needle_get_collection_stats(collection_id: string) — Tool to retrieve statistics for a specific collection by its ID. Use when you need document count, index size, and timestamps after confirming the collection exists. Zero document count is a valid res - needle_get_file_download_url(file_id: string) — Tool to get a short-lived signed private download URL for a Needle file. Use when you need to retrieve file content but the public storage URL requires authentication. The returned URL should be used - needle_get_file_upload_url(content_type: string[]) — Tool to get signed URLs for uploading local files to Needle. Use when you need to upload files to a collection. The upload URLs are valid for a short time, so upload files immediately after receiving - needle_get_local_connector(connector_id: string) — Tool to retrieve details of a local connector by its ID. Use when you need information about a specific local connector's configuration, device details, and associated folders. - needle_list_collection_files(limit?: integer, offset?: integer, collection_id: string) — Tool to list all files within a specific collection by its ID. Returns file metadata (including file URLs) only — not document text content; fetch file URLs separately to access content. Use when you - needle_list_collections(limit?: integer, offset?: integer) — Tool to list collections. Use after authenticating with your API key to page through collections. Similar collection names can exist; always verify the correct `collection_id` from results before perf - needle_list_connectors() — Tool to list connectors. Use to retrieve all configured connectors in your account. - needle_list_local_connectors() — Tool to list local connectors. Use to retrieve all local connectors configured in your Needle account. - needle_search_collection(text: string, top_k?: integer, offset?: integer, options?: object, max_distance?: string, collection_id: string) — Tool to perform semantic search within a specific Needle collection and return ranked results with source references. Use when you need to retrieve relevant content from a known collection using natur ## Example prompts - "What can I do in Needle?" - "Show me a summary of my Needle account" ## Links Docs: https://mcp.ai/docs/mcps/needle Website: https://mcp.ai/mcps/needle