From cd16b45bca3bb06ddb0804121f64bc700cbd4f29 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 8 Jun 2026 12:00:51 +0200 Subject: [PATCH 1/8] feat(mcp): setup mcp plugins --- mcp/plugins/docsearch/README.md | 66 ++++++++++++++ .../.claude-plugin/plugin.json | 8 ++ .../claude/algolia-docsearch/.mcp.json | 6 ++ .../claude/algolia-docsearch/README.md | 60 +++++++++++++ .../claude/algolia-docsearch/commands/docs.md | 32 +++++++ .../claude/algolia-docsearch/marketplace.json | 14 +++ .../skills/algolia-docsearch-mcp/SKILL.md | 88 +++++++++++++++++++ .../.cursor-plugin/plugin.json | 12 +++ .../cursor/algolia-docsearch/README.md | 53 +++++++++++ .../cursor/algolia-docsearch/mcp.json | 5 ++ .../rules/use-algolia-docsearch.mdc | 22 +++++ .../skills/algolia-docsearch-mcp/SKILL.md | 88 +++++++++++++++++++ 12 files changed, 454 insertions(+) create mode 100644 mcp/plugins/docsearch/README.md create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/README.md create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json create mode 100644 mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/README.md create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md diff --git a/mcp/plugins/docsearch/README.md b/mcp/plugins/docsearch/README.md new file mode 100644 index 000000000..a101694cc --- /dev/null +++ b/mcp/plugins/docsearch/README.md @@ -0,0 +1,66 @@ +# Algolia DocSearch MCP Plugins + +This directory contains client plugin packages for the public Algolia DocSearch MCP endpoint: + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` + +The plugins connect AI coding clients to the public DocSearch documentation corpus. They do not expose crawler operations, DocSearch administration, private documentation, or Algolia index credentials. + +## Packages + +- `cursor/algolia-docsearch` - Cursor plugin package with MCP config, rule, skill, and README. +- `claude/algolia-docsearch` - Claude Code plugin package with MCP config, skill, command, and README. + +## Public MCP Tools + +### algolia_docsearch_resolve_docset + +Finds matching documentation sets and returns candidates with: + +- `docset_id` +- `targetIndex` +- optional quality signals such as `trustScore`, `benchmarkScore`, and `popularityScore` + +Use concise keyword-only queries, for example: + +```text +Next.js middleware +Stripe webhooks +Algolia InstantSearch React +``` + +### algolia_docsearch_query_docs + +Queries documentation content for selected docsets. + +Use the selected `docset_id` values as `docsetIds`. Pass each selected `targetIndex` as `indexName` in the `targets` array: + +```json +{ + "query": "middleware matcher config", + "docsetIds": ["nextjs"], + "targets": [ + { + "docsetId": "nextjs", + "indexName": "nextjs_docs" + } + ] +} +``` + +## Claude Desktop And claude.ai + +Claude Desktop and claude.ai can connect directly to the same remote MCP endpoint when remote connectors are available in the client: + +```json +{ + "algolia-docsearch": { + "type": "http", + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } +} +``` + +No user authentication is required for the public DocSearch MCP endpoint. diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json new file mode 100644 index 000000000..81679d9b4 --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "algolia-docsearch", + "description": "Algolia DocSearch MCP plugin for searching up-to-date public developer documentation from the DocSearch corpus.", + "version": "1.0.0", + "author": { + "name": "Algolia" + } +} diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json new file mode 100644 index 000000000..6a7d1b768 --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json @@ -0,0 +1,6 @@ +{ + "algolia-docsearch": { + "type": "http", + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } +} diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md new file mode 100644 index 000000000..883731419 --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md @@ -0,0 +1,60 @@ +# Algolia DocSearch Plugin for Claude Code + +Algolia DocSearch connects Claude Code to the public DocSearch MCP endpoint for current public developer documentation. + +## What's Included + +- **MCP Server** - Connects Claude Code to `https://mcp.algolia.com/1/docsearch/mcp`. +- **Skill** - Auto-triggers documentation lookups for public developer docs questions. +- **Command** - `/algolia-docsearch:docs` for manual documentation queries. + +## Installation + +For local beta testing, install this plugin package from: + +```text +plugins/docsearch/claude/algolia-docsearch +``` + +The MCP server config is also available at: + +```text +plugins/docsearch/claude/algolia-docsearch/.mcp.json +``` + +## Available Tools + +### algolia_docsearch_resolve_docset + +Finds matching documentation sets and returns `docset_id` plus `targetIndex` values. + +Use keyword-only queries: + +```text +Next.js middleware +Stripe webhooks +Algolia InstantSearch React +``` + +### algolia_docsearch_query_docs + +Queries documentation content for selected docsets. + +Use the `docset_id` values returned by `algolia_docsearch_resolve_docset`, and pass each selected `targetIndex` as the `indexName` in `targets`. + +## Usage Examples + +Ask Claude questions like: + +- "How do I configure middleware in Next.js?" +- "Show me Stripe webhook signature verification from the docs." +- "What is the current Algolia InstantSearch React setup?" + +Or use the manual command: + +```text +/algolia-docsearch:docs Next.js middleware matcher +/algolia-docsearch:docs Stripe webhook signature verification +``` + +The plugin is for public developer documentation only. It does not expose crawler operations, DocSearch administration, private docs, or Algolia index credentials. diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md b/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md new file mode 100644 index 000000000..a5deccf33 --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md @@ -0,0 +1,32 @@ +--- +description: Look up public developer documentation with Algolia DocSearch +argument-hint: [query] +--- + +# /algolia-docsearch:docs + +Fetch current public developer documentation from the Algolia DocSearch MCP corpus. + +## Usage + +```text +/algolia-docsearch:docs [topic] +``` + +The command should use the DocSearch two-step flow: + +1. Call `algolia_docsearch_resolve_docset` with a concise keyword query for the library, product, API, or framework. +2. Pick the best matching `docset_id` and `targetIndex`. +3. Call `algolia_docsearch_query_docs` with a concise keyword query, `docsetIds`, and `targets`. +4. Answer using the returned docs and include source URLs when available. + +## Examples + +```text +/algolia-docsearch:docs Next.js middleware matcher +/algolia-docsearch:docs Stripe webhook signature verification +/algolia-docsearch:docs Algolia InstantSearch React configure search client +/algolia-docsearch:docs React Server Components data fetching +``` + +Use keyword-only tool queries. Do not pass full sentences or conversational phrasing to the MCP tools. diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json new file mode 100644 index 000000000..9d38e55da --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json @@ -0,0 +1,14 @@ +{ + "name": "algolia-docsearch-marketplace", + "owner": { + "name": "Algolia" + }, + "plugins": [ + { + "name": "algolia-docsearch-plugin", + "source": ".", + "description": "up-to-date public developer documentation from the DocSearch corpus.", + "version": "1.0.0" + } + ] +} diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md b/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md new file mode 100644 index 000000000..5f6a2c5fa --- /dev/null +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md @@ -0,0 +1,88 @@ +--- +name: algolia-docsearch-mcp +description: Use this skill when the user asks about public developer documentation, SDKs, APIs, libraries, frameworks, setup, configuration, or code examples. Fetch current docs from Algolia DocSearch MCP and cite source URLs. +--- + +When the user asks about public developer documentation, use Algolia DocSearch MCP instead of relying only on training data. + +## When To Use + +Use this skill when the user: + +- Asks setup or configuration questions for a public library, framework, SDK, API, or developer tool. +- Requests code examples that should match current docs. +- Needs API reference details, migration guidance, or command syntax. +- Mentions a library or framework whose docs may have changed recently. +- Asks for sources or citations from public documentation. + +Do not use this skill for private company docs, internal repositories, unpublished APIs, or questions where the user already supplied the relevant docs. + +## Tool Flow + +### Step 1: Resolve The Docset + +Call `algolia_docsearch_resolve_docset` first. + +Use a concise keyword-only query, not the user's full sentence. Good examples: + +- `Next.js middleware` +- `React Server Components` +- `Stripe webhooks` +- `Algolia InstantSearch React` + +Input: + +- `query`: concise keywords for the library, product, API, or concept. +- `topN`: optional. Use the default unless the initial result is ambiguous. + +### Step 2: Select The Best Candidate + +Choose the candidate that best matches the user's target docs. + +Prefer: + +- Exact product, library, or framework name matches. +- Official or primary documentation when the title/description makes that clear. +- Higher `trustScore`, `benchmarkScore`, or `popularityScore` when multiple candidates look similar. + +Keep the selected candidate's: + +- `docset_id` +- `targetIndex` + +Convert that pair into a `targets` entry for the next tool: + +```json +{ + "docsetId": "", + "indexName": "" +} +``` + +### Step 3: Query The Docs + +Call `algolia_docsearch_query_docs`. + +Use a concise keyword-only query for the specific documentation content. Good examples: + +- `middleware matcher config` +- `server components data fetching` +- `webhook signature verification` +- `configure search client` + +Input: + +- `query`: concise keywords for the docs content. +- `docsetIds`: an array containing the selected `docset_id` values. +- `targets`: an array of `{ "docsetId": "...", "indexName": "..." }` entries built from the selected candidates. + +### Step 4: Answer With Sources + +Use the returned documentation content to answer the user directly. + +Guidelines: + +- Include source URLs from the tool result when available. +- Say when DocSearch does not return a relevant result. +- Do not invent source citations. +- Keep the answer focused on the user's question. diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json b/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json new file mode 100644 index 000000000..cd6d147ec --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "algolia-docsearch", + "version": "1.0.0", + "description": "Algolia DocSearch MCP plugin for searching up-to-date public developer documentation from the DocSearch corpus.", + "author": { + "name": "Algolia", + "url": "https://www.algolia.com" + }, + "keywords": ["documentation", "mcp", "algolia", "docsearch", "developer-docs"], + "logo": "https://www.algolia.com/favicon.ico", + "primaryColor": "#003DFF" +} diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md new file mode 100644 index 000000000..511676ffe --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md @@ -0,0 +1,53 @@ +# Algolia DocSearch Plugin for Cursor + +Algolia DocSearch connects Cursor to the public DocSearch MCP endpoint for current public developer documentation. + +## What's Included + +- **MCP Server** - Connects Cursor to `https://mcp.algolia.com/1/docsearch/mcp`. +- **Rule** - Nudges the agent to use DocSearch for public developer docs instead of guessing from training data. +- **Skill** - Documents the two-step `resolve_docset` then `query_docs` lookup flow. + +## Installation + +For local beta testing, install this plugin package from: + +```text +plugins/docsearch/cursor/algolia-docsearch +``` + +The MCP server config is also available at: + +```text +plugins/docsearch/cursor/algolia-docsearch/mcp.json +``` + +## Available Tools + +### algolia_docsearch_resolve_docset + +Finds matching documentation sets and returns `docset_id` plus `targetIndex` values. + +Use keyword-only queries: + +```text +Next.js middleware +Stripe webhooks +Algolia InstantSearch React +``` + +### algolia_docsearch_query_docs + +Queries documentation content for selected docsets. + +Use the `docset_id` values returned by `algolia_docsearch_resolve_docset`, and pass each selected `targetIndex` as the `indexName` in `targets`. + +## Usage Examples + +Ask Cursor questions like: + +- "How do I configure middleware in Next.js?" +- "Show me Stripe webhook signature verification from the docs." +- "What is the current Algolia InstantSearch React setup?" + +The plugin is for public developer documentation only. It does not expose crawler operations, DocSearch administration, private docs, or Algolia index credentials. diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json b/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json new file mode 100644 index 000000000..d9b3d01a7 --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json @@ -0,0 +1,5 @@ +{ + "algolia-docsearch": { + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } +} diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc b/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc new file mode 100644 index 000000000..501eb3c71 --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc @@ -0,0 +1,22 @@ +--- +description: Use Algolia DocSearch MCP for current public developer documentation instead of guessing from training data. +alwaysApply: true +--- + +When the user asks about public developer documentation, APIs, SDKs, libraries, frameworks, configuration, or code examples, use Algolia DocSearch MCP to fetch current documentation before answering. + +Use Algolia DocSearch when: +- The user asks about a public library, framework, SDK, API, or developer tool. +- The user needs syntax, configuration, migration, setup, or code examples from docs. +- The question may depend on recent documentation changes. +- You need source URLs to support an answer. + +Do not use Algolia DocSearch for: +- Private company docs, internal repos, or unpublished APIs. +- Questions already answered by code or docs the user provided. +- Crawler operations, DocSearch administration, or MCP server implementation details. +- General programming concepts that do not require external docs. + +Use keyword-only queries with the MCP tools. Do not send full sentences or conversational phrasing as tool queries. + +See the `algolia-docsearch-mcp` skill for the exact two-step lookup flow. diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md b/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md new file mode 100644 index 000000000..5f6a2c5fa --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md @@ -0,0 +1,88 @@ +--- +name: algolia-docsearch-mcp +description: Use this skill when the user asks about public developer documentation, SDKs, APIs, libraries, frameworks, setup, configuration, or code examples. Fetch current docs from Algolia DocSearch MCP and cite source URLs. +--- + +When the user asks about public developer documentation, use Algolia DocSearch MCP instead of relying only on training data. + +## When To Use + +Use this skill when the user: + +- Asks setup or configuration questions for a public library, framework, SDK, API, or developer tool. +- Requests code examples that should match current docs. +- Needs API reference details, migration guidance, or command syntax. +- Mentions a library or framework whose docs may have changed recently. +- Asks for sources or citations from public documentation. + +Do not use this skill for private company docs, internal repositories, unpublished APIs, or questions where the user already supplied the relevant docs. + +## Tool Flow + +### Step 1: Resolve The Docset + +Call `algolia_docsearch_resolve_docset` first. + +Use a concise keyword-only query, not the user's full sentence. Good examples: + +- `Next.js middleware` +- `React Server Components` +- `Stripe webhooks` +- `Algolia InstantSearch React` + +Input: + +- `query`: concise keywords for the library, product, API, or concept. +- `topN`: optional. Use the default unless the initial result is ambiguous. + +### Step 2: Select The Best Candidate + +Choose the candidate that best matches the user's target docs. + +Prefer: + +- Exact product, library, or framework name matches. +- Official or primary documentation when the title/description makes that clear. +- Higher `trustScore`, `benchmarkScore`, or `popularityScore` when multiple candidates look similar. + +Keep the selected candidate's: + +- `docset_id` +- `targetIndex` + +Convert that pair into a `targets` entry for the next tool: + +```json +{ + "docsetId": "", + "indexName": "" +} +``` + +### Step 3: Query The Docs + +Call `algolia_docsearch_query_docs`. + +Use a concise keyword-only query for the specific documentation content. Good examples: + +- `middleware matcher config` +- `server components data fetching` +- `webhook signature verification` +- `configure search client` + +Input: + +- `query`: concise keywords for the docs content. +- `docsetIds`: an array containing the selected `docset_id` values. +- `targets`: an array of `{ "docsetId": "...", "indexName": "..." }` entries built from the selected candidates. + +### Step 4: Answer With Sources + +Use the returned documentation content to answer the user directly. + +Guidelines: + +- Include source URLs from the tool result when available. +- Say when DocSearch does not return a relevant result. +- Do not invent source citations. +- Keep the answer focused on the user's question. From 2068fc054945332c60259d3ef9e1cc8700c4eeda Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 8 Jun 2026 12:17:00 +0200 Subject: [PATCH 2/8] fix(mcp): correct plugin paths and improve discoverability Align install docs with the mcp/plugins layout, unify Claude marketplace naming, and link the public MCP packages from the repo README. Co-authored-by: Cursor --- README.md | 4 ++++ mcp/README.md | 9 +++++++++ mcp/plugins/docsearch/README.md | 4 ++-- .../docsearch/claude/algolia-docsearch/README.md | 11 +++++++++-- .../claude/algolia-docsearch/marketplace.json | 2 +- .../docsearch/cursor/algolia-docsearch/README.md | 4 ++-- 6 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 mcp/README.md diff --git a/README.md b/README.md index 8f1ca5519..453c317bc 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,10 @@ export default App; [Read documentation →](https://docsearch.algolia.com/docs/styling) +## MCP plugins + +Client plugins for the public DocSearch MCP endpoint are in [`mcp/plugins/docsearch`](mcp/plugins/docsearch). They connect Cursor and Claude Code to `https://mcp.algolia.com/1/docsearch/mcp` for current public developer documentation. + ## Related projects DocSearch is made of the following repositories: diff --git a/mcp/README.md b/mcp/README.md new file mode 100644 index 000000000..b2614568c --- /dev/null +++ b/mcp/README.md @@ -0,0 +1,9 @@ +# DocSearch MCP + +Client plugin packages for the public Algolia DocSearch MCP endpoint live in [`plugins/docsearch`](plugins/docsearch). + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` + +The plugins connect AI coding clients to the public DocSearch documentation corpus. They do not expose crawler operations, DocSearch administration, private documentation, or Algolia index credentials. diff --git a/mcp/plugins/docsearch/README.md b/mcp/plugins/docsearch/README.md index a101694cc..302eec998 100644 --- a/mcp/plugins/docsearch/README.md +++ b/mcp/plugins/docsearch/README.md @@ -10,8 +10,8 @@ The plugins connect AI coding clients to the public DocSearch documentation corp ## Packages -- `cursor/algolia-docsearch` - Cursor plugin package with MCP config, rule, skill, and README. -- `claude/algolia-docsearch` - Claude Code plugin package with MCP config, skill, command, and README. +- `mcp/plugins/docsearch/cursor/algolia-docsearch` - Cursor plugin package with MCP config, rule, skill, and README. +- `mcp/plugins/docsearch/claude/algolia-docsearch` - Claude Code plugin package with MCP config, skill, command, and README. ## Public MCP Tools diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md index 883731419..37990b764 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md @@ -13,13 +13,20 @@ Algolia DocSearch connects Claude Code to the public DocSearch MCP endpoint for For local beta testing, install this plugin package from: ```text -plugins/docsearch/claude/algolia-docsearch +mcp/plugins/docsearch/claude/algolia-docsearch ``` The MCP server config is also available at: ```text -plugins/docsearch/claude/algolia-docsearch/.mcp.json +mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json +``` + +For Claude Code marketplace install from this repository: + +```bash +claude plugin marketplace add algolia/docsearch +claude plugin install algolia-docsearch@algolia-docsearch-marketplace ``` ## Available Tools diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json index 9d38e55da..0377ea83a 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json @@ -5,7 +5,7 @@ }, "plugins": [ { - "name": "algolia-docsearch-plugin", + "name": "algolia-docsearch", "source": ".", "description": "up-to-date public developer documentation from the DocSearch corpus.", "version": "1.0.0" diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md index 511676ffe..c95809ee8 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md @@ -13,13 +13,13 @@ Algolia DocSearch connects Cursor to the public DocSearch MCP endpoint for curre For local beta testing, install this plugin package from: ```text -plugins/docsearch/cursor/algolia-docsearch +mcp/plugins/docsearch/cursor/algolia-docsearch ``` The MCP server config is also available at: ```text -plugins/docsearch/cursor/algolia-docsearch/mcp.json +mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json ``` ## Available Tools From f6d7b5c60ec15acabb334a34d3dd82229909f7ad Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 8 Jun 2026 12:23:39 +0200 Subject: [PATCH 3/8] fix: links --- mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json index 0377ea83a..1b083d56f 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json @@ -11,4 +11,4 @@ "version": "1.0.0" } ] -} +} \ No newline at end of file From 8d50fa42283bf7e86ddf12283f97792af2047255 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 8 Jun 2026 14:12:41 +0200 Subject: [PATCH 4/8] docs(mcp): add public MCP website docs (#2894) --- .../claude/algolia-docsearch/README.md | 6 +- packages/website/docs/mcp/installation.mdx | 142 ++++++++++++++++++ packages/website/docs/mcp/overview.mdx | 58 +++++++ packages/website/docs/mcp/usage.mdx | 125 +++++++++++++++ packages/website/sidebars.js | 5 + 5 files changed, 333 insertions(+), 3 deletions(-) create mode 100644 packages/website/docs/mcp/installation.mdx create mode 100644 packages/website/docs/mcp/overview.mdx create mode 100644 packages/website/docs/mcp/usage.mdx diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md index 37990b764..5225301a6 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md @@ -24,9 +24,9 @@ mcp/plugins/docsearch/claude/algolia-docsearch/.mcp.json For Claude Code marketplace install from this repository: -```bash -claude plugin marketplace add algolia/docsearch -claude plugin install algolia-docsearch@algolia-docsearch-marketplace +```text +/plugin marketplace add algolia/docsearch +/plugin install algolia-docsearch@algolia-docsearch-marketplace ``` ## Available Tools diff --git a/packages/website/docs/mcp/installation.mdx b/packages/website/docs/mcp/installation.mdx new file mode 100644 index 000000000..d0b449387 --- /dev/null +++ b/packages/website/docs/mcp/installation.mdx @@ -0,0 +1,142 @@ +--- +title: Install DocSearch MCP +sidebar_label: Installation +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +DocSearch MCP is available at: + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` + +No authentication is required for the public endpoint. + +## Plugins + +Plugins install the MCP server config plus client-specific guidance, such as rules, skills, and commands. + + + + +The Cursor plugin package lives in this repository: + +```text +mcp/plugins/docsearch/cursor/algolia-docsearch +``` + +It includes: + +- `mcp.json` with the public DocSearch MCP endpoint. +- A Cursor rule that asks the agent to use DocSearch MCP for public developer documentation questions. +- A skill that explains the two-step `resolve_docset` then `query_docs` flow. + + + + +The Claude Code plugin package lives in this repository: + +```text +mcp/plugins/docsearch/claude/algolia-docsearch +``` + +It includes: + +- `.mcp.json` with the public DocSearch MCP endpoint. +- A Claude Code skill that triggers for public developer documentation questions. +- `/algolia-docsearch:docs` for manual documentation lookups. + +If you install from the Claude Code marketplace, add the marketplace and install the plugin from Claude Code: + +```text +/plugin marketplace add algolia/docsearch +/plugin install algolia-docsearch@algolia-docsearch-marketplace +``` + + + + +## Manual installation + +Use manual installation when you only want the MCP tools, or when your client does not support DocSearch plugins yet. + + + + +Go to `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`. + +You can also add it to `~/.cursor/mcp.json` for a global install, or `.cursor/mcp.json` for a project install: + +[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=algolia-docsearch&config=eyJ1cmwiOiJodHRwczovL21jcC5hbGdvbGlhLmNvbS8xL2RvY3NlYXJjaC9tY3AifQ%3D%3D) + +```json +{ + "mcpServers": { + "algolia-docsearch": { + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } + } +} +``` + + + + +Add the remote HTTP server with the Claude Code CLI: + +```bash +claude mcp add --scope user --transport http algolia-docsearch https://mcp.algolia.com/1/docsearch/mcp +``` + +Use `--scope project` instead of `--scope user` if you want the configuration stored with a specific project. + + + + +Open Claude Desktop, then go to `Settings` -> `Connectors` -> `Add Custom Connector`. + +Use: + +```text +Name: Algolia DocSearch +URL: https://mcp.algolia.com/1/docsearch/mcp +``` + + + + +For clients that support remote HTTP MCP servers, configure a server named `algolia-docsearch` with this URL: + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` + +Many clients use a JSON shape similar to: + +```json +{ + "mcpServers": { + "algolia-docsearch": { + "type": "http", + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } + } +} +``` + +If your client uses a different MCP config format, keep the same server name and URL, and follow that client's remote HTTP MCP documentation. + + + + +## Verify the install + +Ask your MCP client a public documentation question, for example: + +```text +Use DocSearch MCP to find the current Next.js middleware matcher docs. +``` + +The client should call `algolia_docsearch_resolve_docset`, then `algolia_docsearch_query_docs`, and answer with content from the matching documentation. diff --git a/packages/website/docs/mcp/overview.mdx b/packages/website/docs/mcp/overview.mdx new file mode 100644 index 000000000..cfe277fff --- /dev/null +++ b/packages/website/docs/mcp/overview.mdx @@ -0,0 +1,58 @@ +--- +title: DocSearch MCP +sidebar_label: Overview +--- + +DocSearch MCP lets AI clients search current public developer documentation from the DocSearch corpus. + +Use it when you want an assistant to answer questions from public docs instead of relying only on model training data. The public endpoint does not require authentication: + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` + +## What it does + +DocSearch MCP exposes documentation search through the [Model Context Protocol](https://modelcontextprotocol.io/). MCP-compatible clients can connect to the endpoint and call DocSearch tools while answering your questions. + +The endpoint is focused on public developer documentation. You do not need an Algolia application ID, search API key, or DocSearch application to use it. + +## How it works + +DocSearch MCP uses a two-step lookup flow: + +1. Resolve the documentation set that best matches the library, framework, API, or product you asked about. +2. Query that documentation set for the specific topic. + +For example, if you ask about Next.js middleware, the client first resolves the Next.js docs, then searches those docs for middleware-specific pages. + +## Available tools + +### `algolia_docsearch_resolve_docset` + +Finds matching documentation sets. It returns candidates with a `docset_id` and `targetIndex`, plus ranking signals that help the client choose the best match. + +Good queries are short and keyword-based: + +```text +Next.js middleware +Stripe webhooks +Algolia InstantSearch React +``` + +### `algolia_docsearch_query_docs` + +Searches inside one or more resolved documentation sets. The client passes the selected `docset_id` values and their matching `targetIndex` values. + +Good queries are specific to the docs content you want: + +```text +middleware matcher config +webhook signature verification +configure search client +``` + +## Next steps + +- [Install DocSearch MCP](/docs/mcp/installation) +- [Use DocSearch MCP](/docs/mcp/usage) diff --git a/packages/website/docs/mcp/usage.mdx b/packages/website/docs/mcp/usage.mdx new file mode 100644 index 000000000..b0536c40a --- /dev/null +++ b/packages/website/docs/mcp/usage.mdx @@ -0,0 +1,125 @@ +--- +title: Use DocSearch MCP +sidebar_label: Usage +--- + +DocSearch MCP works best when your client knows to search public documentation before answering library, framework, API, or SDK questions. + +## Ask documentation questions + +After installation, ask your client about public developer docs: + +```text +How do I configure middleware matchers in Next.js? +``` + +```text +Show me the current Stripe webhook signature verification docs. +``` + +```text +What is the current setup for Algolia InstantSearch React? +``` + +If your client does not automatically use MCP tools, mention DocSearch MCP explicitly: + +```text +Use DocSearch MCP to look up React Server Components data fetching. +``` + +## Use the Claude Code command + +The Claude Code plugin includes a manual command: + +```text +/algolia-docsearch:docs [topic] +``` + +Examples: + +```text +/algolia-docsearch:docs Next.js middleware matcher +/algolia-docsearch:docs Stripe webhook signature verification +/algolia-docsearch:docs Algolia InstantSearch React configure search client +``` + +## Query style + +DocSearch MCP tools work best with short keyword queries. + +Good tool queries: + +```text +Next.js middleware +middleware matcher config +Stripe webhooks +webhook signature verification +``` + +Avoid sending full conversational prompts as tool queries: + +```text +Can you please explain how I should configure middleware in the latest version of Next.js? +``` + +Your MCP client can still answer conversationally. The keyword guidance only applies to the tool calls it makes behind the scenes. + +## Tool flow + +DocSearch MCP exposes two tools. + +### 1. Resolve a docset + +The client first calls `algolia_docsearch_resolve_docset` with a keyword query for the documentation source: + +```json +{ + "query": "Next.js middleware" +} +``` + +The result includes candidates with `docset_id` and `targetIndex` values. The client should choose the candidate that best matches the requested public docs. + +### 2. Query the docs + +The client then calls `algolia_docsearch_query_docs` with the selected docset and a topic-specific query: + +```json +{ + "query": "middleware matcher config", + "docsetIds": ["nextjs"], + "targets": [ + { + "docsetId": "nextjs", + "indexName": "nextjs_docs" + } + ] +} +``` + +The `docsetIds` and `targets` values should come from the resolve step. + +## Tips + +- Be specific about the product and topic you want. +- Include a version when it matters. +- Ask for source URLs if you want the client to show where the answer came from. +- If the first result is too broad, ask for a narrower topic. + +## Troubleshooting + +### The client does not call DocSearch MCP + +Make sure the MCP server is enabled in your client and named `algolia-docsearch`. If you installed the plugin, check that the plugin is enabled too. + +### The result is about the wrong product + +Ask with more specific keywords. For example, use `Algolia InstantSearch React routing` instead of `routing`. + +### The client cannot connect + +Confirm that your client supports remote HTTP MCP servers and that the configured URL is: + +```text +https://mcp.algolia.com/1/docsearch/mcp +``` diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index a708f5162..8f4c56536 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -21,6 +21,11 @@ export default { label: 'DocSearch v4', items: ['docsearch', 'docusaurus-adapter', 'composable-api', 'styling', 'api', 'examples', 'migrating-from-v3'], }, + { + type: 'category', + label: 'MCP', + items: ['mcp/overview', 'mcp/installation', 'mcp/usage'], + }, { type: 'category', label: 'Algolia Ask AI', From 0e84cb1944132c8593d35af367a2f0de3a5b0f00 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Thu, 18 Jun 2026 15:41:04 +0200 Subject: [PATCH 5/8] feat: updae install isntructions --- .cursor/settings.json | 1 + .tool-versions | 4 +- mcp/plugins/docsearch/README.md | 41 +- .../.claude-plugin/plugin.json | 3 +- .../claude/algolia-docsearch/README.md | 18 +- .../claude/algolia-docsearch/commands/docs.md | 13 +- .../skills/algolia-docsearch-mcp/SKILL.md | 60 +- .../.cursor-plugin/plugin.json | 7 +- .../cursor/algolia-docsearch/README.md | 18 +- .../assets/docsearch-monogram.svg | 1 + .../rules/use-algolia-docsearch.mdc | 4 +- .../skills/algolia-docsearch-mcp/SKILL.md | 60 +- package.json | 3 +- packages/website/docs/mcp/installation.mdx | 126 +--- packages/website/docs/mcp/overview.mdx | 31 +- packages/website/docs/mcp/usage.mdx | 54 +- .../website/src/components/mcp/MCPInstall.jsx | 639 ++++++++++++++++++ .../website/static/img/docsearch-monogram.svg | 1 + .../static/img/mcp-clients/algolia.svg | 1 + .../static/img/mcp-clients/antigravity.svg | 97 +++ .../static/img/mcp-clients/chatgpt.svg | 1 + .../static/img/mcp-clients/chatgpt_dark.svg | 1 + .../website/static/img/mcp-clients/claude.svg | 1 + .../website/static/img/mcp-clients/codex.svg | 1 + .../static/img/mcp-clients/codex_dark.svg | 1 + .../static/img/mcp-clients/conductor.svg | 1 + .../static/img/mcp-clients/conductor_dark.svg | 1 + .../website/static/img/mcp-clients/cursor.svg | 12 + .../static/img/mcp-clients/cursor_dark.svg | 12 + .../static/img/mcp-clients/opencode.svg | 6 + .../static/img/mcp-clients/opencode_dark.svg | 7 + .../website/static/img/mcp-clients/pi.svg | 21 + .../website/static/img/mcp-clients/vscode.svg | 1 + .../static/img/mcp-clients/windsurf.svg | 1 + .../static/img/mcp-clients/windsurf_dark.svg | 1 + .../website/static/img/mcp-clients/zed.svg | 1 + .../static/img/mcp-clients/zed_dark.svg | 1 + 37 files changed, 941 insertions(+), 311 deletions(-) create mode 100644 .cursor/settings.json create mode 100644 mcp/plugins/docsearch/cursor/algolia-docsearch/assets/docsearch-monogram.svg create mode 100644 packages/website/src/components/mcp/MCPInstall.jsx create mode 100644 packages/website/static/img/docsearch-monogram.svg create mode 100644 packages/website/static/img/mcp-clients/algolia.svg create mode 100644 packages/website/static/img/mcp-clients/antigravity.svg create mode 100644 packages/website/static/img/mcp-clients/chatgpt.svg create mode 100644 packages/website/static/img/mcp-clients/chatgpt_dark.svg create mode 100644 packages/website/static/img/mcp-clients/claude.svg create mode 100644 packages/website/static/img/mcp-clients/codex.svg create mode 100644 packages/website/static/img/mcp-clients/codex_dark.svg create mode 100644 packages/website/static/img/mcp-clients/conductor.svg create mode 100644 packages/website/static/img/mcp-clients/conductor_dark.svg create mode 100644 packages/website/static/img/mcp-clients/cursor.svg create mode 100644 packages/website/static/img/mcp-clients/cursor_dark.svg create mode 100644 packages/website/static/img/mcp-clients/opencode.svg create mode 100644 packages/website/static/img/mcp-clients/opencode_dark.svg create mode 100644 packages/website/static/img/mcp-clients/pi.svg create mode 100644 packages/website/static/img/mcp-clients/vscode.svg create mode 100644 packages/website/static/img/mcp-clients/windsurf.svg create mode 100644 packages/website/static/img/mcp-clients/windsurf_dark.svg create mode 100644 packages/website/static/img/mcp-clients/zed.svg create mode 100644 packages/website/static/img/mcp-clients/zed_dark.svg diff --git a/.cursor/settings.json b/.cursor/settings.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.cursor/settings.json @@ -0,0 +1 @@ +{} diff --git a/.tool-versions b/.tool-versions index e55980b02..c8a7bba39 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -bun 1.3.10 -node 22.15.0 +bun 1.3.10 +nodejs latest diff --git a/mcp/plugins/docsearch/README.md b/mcp/plugins/docsearch/README.md index 302eec998..bd9a77f06 100644 --- a/mcp/plugins/docsearch/README.md +++ b/mcp/plugins/docsearch/README.md @@ -15,38 +15,43 @@ The plugins connect AI coding clients to the public DocSearch documentation corp ## Public MCP Tools +You can query in natural language — full sentences and questions work well. + +### algolia_docsearch_search_docs + +One-shot lookup, and the right default for most questions. Pass a `library` and a `query`; it resolves the best matching documentation set and returns ranked content in a single call: + +```json +{ + "library": "Next.js", + "query": "how do middleware matchers work" +} +``` + +If the library is ambiguous, it returns candidate documentation sets instead — pick a `docset_id` and pass it to `algolia_docsearch_query_docs`. + ### algolia_docsearch_resolve_docset -Finds matching documentation sets and returns candidates with: +Step 1 of the manual flow. Finds matching documentation sets and returns candidates with: - `docset_id` -- `targetIndex` +- title and description - optional quality signals such as `trustScore`, `benchmarkScore`, and `popularityScore` -Use concise keyword-only queries, for example: - -```text -Next.js middleware -Stripe webhooks -Algolia InstantSearch React +```json +{ + "query": "Next.js app router" +} ``` ### algolia_docsearch_query_docs -Queries documentation content for selected docsets. - -Use the selected `docset_id` values as `docsetIds`. Pass each selected `targetIndex` as `indexName` in the `targets` array: +Step 2 of the manual flow. Queries documentation content for the selected `docset_id` values. Pass several when a question spans multiple products: ```json { "query": "middleware matcher config", - "docsetIds": ["nextjs"], - "targets": [ - { - "docsetId": "nextjs", - "indexName": "nextjs_docs" - } - ] + "docsetIds": ["nextjs"] } ``` diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json index 81679d9b4..a964f87f5 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json @@ -4,5 +4,6 @@ "version": "1.0.0", "author": { "name": "Algolia" - } + }, + "logo": "https://docsearchmcp.netlify.app/favicon.svg" } diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md index 5225301a6..af5f38ebc 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/README.md +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/README.md @@ -8,6 +8,8 @@ Algolia DocSearch connects Claude Code to the public DocSearch MCP endpoint for - **Skill** - Auto-triggers documentation lookups for public developer docs questions. - **Command** - `/algolia-docsearch:docs` for manual documentation queries. +The plugin teaches the one-shot `search_docs` lookup and the `resolve_docset` + `query_docs` flow. + ## Installation For local beta testing, install this plugin package from: @@ -31,23 +33,17 @@ For Claude Code marketplace install from this repository: ## Available Tools -### algolia_docsearch_resolve_docset +### algolia_docsearch_search_docs -Finds matching documentation sets and returns `docset_id` plus `targetIndex` values. +One-shot lookup, and the right default for most questions. Pass a `library` (product or platform) and a `query` (the question); it resolves the best documentation set and returns ranked content in a single call. -Use keyword-only queries: +### algolia_docsearch_resolve_docset -```text -Next.js middleware -Stripe webhooks -Algolia InstantSearch React -``` +Step 1 of the manual flow. Finds matching documentation sets and returns candidates with a `docset_id`, title, description, and ranking signals. ### algolia_docsearch_query_docs -Queries documentation content for selected docsets. - -Use the `docset_id` values returned by `algolia_docsearch_resolve_docset`, and pass each selected `targetIndex` as the `indexName` in `targets`. +Step 2 of the manual flow. Queries documentation content for the `docset_id` values returned by `algolia_docsearch_resolve_docset`. Pass several `docsetIds` when a question spans multiple products. ## Usage Examples diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md b/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md index a5deccf33..ac45f7235 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/commands/docs.md @@ -13,12 +13,13 @@ Fetch current public developer documentation from the Algolia DocSearch MCP corp /algolia-docsearch:docs [topic] ``` -The command should use the DocSearch two-step flow: +For most lookups, call `algolia_docsearch_search_docs` in a single step: -1. Call `algolia_docsearch_resolve_docset` with a concise keyword query for the library, product, API, or framework. -2. Pick the best matching `docset_id` and `targetIndex`. -3. Call `algolia_docsearch_query_docs` with a concise keyword query, `docsetIds`, and `targets`. -4. Answer using the returned docs and include source URLs when available. +1. Set `library` to the product, library, or platform (use the official name). +2. Set `query` to the topic or question, in natural language. +3. Answer using the returned docs and include source URLs when available. + +If the library is ambiguous, `algolia_docsearch_search_docs` returns candidate documentation sets — pick the right `docset_id` and pass it to `algolia_docsearch_query_docs`. Use the `algolia_docsearch_resolve_docset` + `algolia_docsearch_query_docs` flow when a question spans several products. ## Examples @@ -28,5 +29,3 @@ The command should use the DocSearch two-step flow: /algolia-docsearch:docs Algolia InstantSearch React configure search client /algolia-docsearch:docs React Server Components data fetching ``` - -Use keyword-only tool queries. Do not pass full sentences or conversational phrasing to the MCP tools. diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md b/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md index 5f6a2c5fa..0261def92 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md @@ -17,66 +17,50 @@ Use this skill when the user: Do not use this skill for private company docs, internal repositories, unpublished APIs, or questions where the user already supplied the relevant docs. -## Tool Flow +## Tools -### Step 1: Resolve The Docset +DocSearch MCP exposes three tools. You can query in natural language — full sentences and questions work well. -Call `algolia_docsearch_resolve_docset` first. +- `algolia_docsearch_search_docs` — one-shot lookup. Use this by default. +- `algolia_docsearch_resolve_docset` — step 1 of the manual flow: find documentation sets. +- `algolia_docsearch_query_docs` — step 2 of the manual flow: fetch content for chosen docsets. -Use a concise keyword-only query, not the user's full sentence. Good examples: +## Default Flow: One-Shot Search -- `Next.js middleware` -- `React Server Components` -- `Stripe webhooks` -- `Algolia InstantSearch React` +Call `algolia_docsearch_search_docs` for most lookups. Input: -- `query`: concise keywords for the library, product, API, or concept. -- `topN`: optional. Use the default unless the initial result is ambiguous. +- `library`: the product, library, SDK, or platform. Use the official name (for example: `Next.js`, `Stripe`, `Algolia InstantSearch`). +- `query`: the question, in natural language (for example: `how do middleware matchers work`). -### Step 2: Select The Best Candidate +It resolves the best matching documentation set and returns ranked content in a single call. If `library` is ambiguous, it returns candidate documentation sets instead — pick the right one and pass its `docset_id` to `algolia_docsearch_query_docs`, or retry with the official product name. -Choose the candidate that best matches the user's target docs. +## Manual Flow: Resolve, Then Query -Prefer: +Use the two-step flow when a question spans several products, or when you want to inspect and hand-pick documentation sets. -- Exact product, library, or framework name matches. -- Official or primary documentation when the title/description makes that clear. -- Higher `trustScore`, `benchmarkScore`, or `popularityScore` when multiple candidates look similar. +### Step 1: Resolve The Docset -Keep the selected candidate's: +Call `algolia_docsearch_resolve_docset`. -- `docset_id` -- `targetIndex` +Input: -Convert that pair into a `targets` entry for the next tool: +- `query`: describe the product, library, SDK, or platform. Including the vendor name improves matching. +- `topN`: optional. Use the default unless the initial result is ambiguous. -```json -{ - "docsetId": "", - "indexName": "" -} -``` +Each candidate returns a `title`, `docset_id`, `description`, and ranking signals (`trustScore`, `benchmarkScore`, `popularityScore`). Prefer the official vendor's docset over third-party mentions, breaking ties by the higher scores. -### Step 3: Query The Docs +### Step 2: Query The Docs Call `algolia_docsearch_query_docs`. -Use a concise keyword-only query for the specific documentation content. Good examples: - -- `middleware matcher config` -- `server components data fetching` -- `webhook signature verification` -- `configure search client` - Input: -- `query`: concise keywords for the docs content. -- `docsetIds`: an array containing the selected `docset_id` values. -- `targets`: an array of `{ "docsetId": "...", "indexName": "..." }` entries built from the selected candidates. +- `query`: what to find in the docs, in natural language. +- `docsetIds`: an array of the `docset_id` values you selected. Pass several when a question spans multiple products. -### Step 4: Answer With Sources +## Answer With Sources Use the returned documentation content to answer the user directly. diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json b/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json index cd6d147ec..67e3fdd73 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/.cursor-plugin/plugin.json @@ -3,10 +3,9 @@ "version": "1.0.0", "description": "Algolia DocSearch MCP plugin for searching up-to-date public developer documentation from the DocSearch corpus.", "author": { - "name": "Algolia", - "url": "https://www.algolia.com" + "name": "Algolia" }, + "homepage": "https://docsearch.algolia.com/docs/mcp/overview", "keywords": ["documentation", "mcp", "algolia", "docsearch", "developer-docs"], - "logo": "https://www.algolia.com/favicon.ico", - "primaryColor": "#003DFF" + "logo": "assets/docsearch-monogram.svg" } diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md index c95809ee8..a918fb145 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/README.md @@ -6,7 +6,7 @@ Algolia DocSearch connects Cursor to the public DocSearch MCP endpoint for curre - **MCP Server** - Connects Cursor to `https://mcp.algolia.com/1/docsearch/mcp`. - **Rule** - Nudges the agent to use DocSearch for public developer docs instead of guessing from training data. -- **Skill** - Documents the two-step `resolve_docset` then `query_docs` lookup flow. +- **Skill** - Documents the one-shot `search_docs` lookup and the `resolve_docset` + `query_docs` flow. ## Installation @@ -24,23 +24,17 @@ mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json ## Available Tools -### algolia_docsearch_resolve_docset +### algolia_docsearch_search_docs -Finds matching documentation sets and returns `docset_id` plus `targetIndex` values. +One-shot lookup, and the right default for most questions. Pass a `library` (product or platform) and a `query` (the question); it resolves the best documentation set and returns ranked content in a single call. -Use keyword-only queries: +### algolia_docsearch_resolve_docset -```text -Next.js middleware -Stripe webhooks -Algolia InstantSearch React -``` +Step 1 of the manual flow. Finds matching documentation sets and returns candidates with a `docset_id`, title, description, and ranking signals. ### algolia_docsearch_query_docs -Queries documentation content for selected docsets. - -Use the `docset_id` values returned by `algolia_docsearch_resolve_docset`, and pass each selected `targetIndex` as the `indexName` in `targets`. +Step 2 of the manual flow. Queries documentation content for the `docset_id` values returned by `algolia_docsearch_resolve_docset`. Pass several `docsetIds` when a question spans multiple products. ## Usage Examples diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/assets/docsearch-monogram.svg b/mcp/plugins/docsearch/cursor/algolia-docsearch/assets/docsearch-monogram.svg new file mode 100644 index 000000000..3ce446d23 --- /dev/null +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/assets/docsearch-monogram.svg @@ -0,0 +1 @@ + diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc b/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc index 501eb3c71..45d76f9d0 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc @@ -17,6 +17,6 @@ Do not use Algolia DocSearch for: - Crawler operations, DocSearch administration, or MCP server implementation details. - General programming concepts that do not require external docs. -Use keyword-only queries with the MCP tools. Do not send full sentences or conversational phrasing as tool queries. +For most lookups call `algolia_docsearch_search_docs` with the product as `library` and the question as `query`. Use the `algolia_docsearch_resolve_docset` + `algolia_docsearch_query_docs` flow when a question spans several products or you need to hand-pick documentation sets. Natural-language queries work well. -See the `algolia-docsearch-mcp` skill for the exact two-step lookup flow. +See the `algolia-docsearch-mcp` skill for the full tool flow. diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md b/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md index 5f6a2c5fa..0261def92 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/skills/algolia-docsearch-mcp/SKILL.md @@ -17,66 +17,50 @@ Use this skill when the user: Do not use this skill for private company docs, internal repositories, unpublished APIs, or questions where the user already supplied the relevant docs. -## Tool Flow +## Tools -### Step 1: Resolve The Docset +DocSearch MCP exposes three tools. You can query in natural language — full sentences and questions work well. -Call `algolia_docsearch_resolve_docset` first. +- `algolia_docsearch_search_docs` — one-shot lookup. Use this by default. +- `algolia_docsearch_resolve_docset` — step 1 of the manual flow: find documentation sets. +- `algolia_docsearch_query_docs` — step 2 of the manual flow: fetch content for chosen docsets. -Use a concise keyword-only query, not the user's full sentence. Good examples: +## Default Flow: One-Shot Search -- `Next.js middleware` -- `React Server Components` -- `Stripe webhooks` -- `Algolia InstantSearch React` +Call `algolia_docsearch_search_docs` for most lookups. Input: -- `query`: concise keywords for the library, product, API, or concept. -- `topN`: optional. Use the default unless the initial result is ambiguous. +- `library`: the product, library, SDK, or platform. Use the official name (for example: `Next.js`, `Stripe`, `Algolia InstantSearch`). +- `query`: the question, in natural language (for example: `how do middleware matchers work`). -### Step 2: Select The Best Candidate +It resolves the best matching documentation set and returns ranked content in a single call. If `library` is ambiguous, it returns candidate documentation sets instead — pick the right one and pass its `docset_id` to `algolia_docsearch_query_docs`, or retry with the official product name. -Choose the candidate that best matches the user's target docs. +## Manual Flow: Resolve, Then Query -Prefer: +Use the two-step flow when a question spans several products, or when you want to inspect and hand-pick documentation sets. -- Exact product, library, or framework name matches. -- Official or primary documentation when the title/description makes that clear. -- Higher `trustScore`, `benchmarkScore`, or `popularityScore` when multiple candidates look similar. +### Step 1: Resolve The Docset -Keep the selected candidate's: +Call `algolia_docsearch_resolve_docset`. -- `docset_id` -- `targetIndex` +Input: -Convert that pair into a `targets` entry for the next tool: +- `query`: describe the product, library, SDK, or platform. Including the vendor name improves matching. +- `topN`: optional. Use the default unless the initial result is ambiguous. -```json -{ - "docsetId": "", - "indexName": "" -} -``` +Each candidate returns a `title`, `docset_id`, `description`, and ranking signals (`trustScore`, `benchmarkScore`, `popularityScore`). Prefer the official vendor's docset over third-party mentions, breaking ties by the higher scores. -### Step 3: Query The Docs +### Step 2: Query The Docs Call `algolia_docsearch_query_docs`. -Use a concise keyword-only query for the specific documentation content. Good examples: - -- `middleware matcher config` -- `server components data fetching` -- `webhook signature verification` -- `configure search client` - Input: -- `query`: concise keywords for the docs content. -- `docsetIds`: an array containing the selected `docset_id` values. -- `targets`: an array of `{ "docsetId": "...", "indexName": "..." }` entries built from the selected candidates. +- `query`: what to find in the docs, in natural language. +- `docsetIds`: an array of the `docset_id` values you selected. Pass several when a question spans multiple products. -### Step 4: Answer With Sources +## Answer With Sources Use the returned documentation content to answer the user directly. diff --git a/package.json b/package.json index 9aaabebe1..75a42f6e0 100644 --- a/package.json +++ b/package.json @@ -95,5 +95,6 @@ "typescript-eslint": "8.20.0", "vitest": "3.0.2", "watch": "1.0.2" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/packages/website/docs/mcp/installation.mdx b/packages/website/docs/mcp/installation.mdx index d0b449387..6f1409e98 100644 --- a/packages/website/docs/mcp/installation.mdx +++ b/packages/website/docs/mcp/installation.mdx @@ -3,133 +3,17 @@ title: Install DocSearch MCP sidebar_label: Installation --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import MCPInstall from '@site/src/components/mcp/MCPInstall'; -DocSearch MCP is available at: +DocSearch MCP is a remote MCP server. Point any MCP-compatible client at this endpoint — no authentication required: ```text https://mcp.algolia.com/1/docsearch/mcp ``` -No authentication is required for the public endpoint. +You can install it as a **plugin** (ships the MCP server plus client guidance like rules, skills, and commands) or **manually** (just the MCP server config). Pick your client below. -## Plugins - -Plugins install the MCP server config plus client-specific guidance, such as rules, skills, and commands. - - - - -The Cursor plugin package lives in this repository: - -```text -mcp/plugins/docsearch/cursor/algolia-docsearch -``` - -It includes: - -- `mcp.json` with the public DocSearch MCP endpoint. -- A Cursor rule that asks the agent to use DocSearch MCP for public developer documentation questions. -- A skill that explains the two-step `resolve_docset` then `query_docs` flow. - - - - -The Claude Code plugin package lives in this repository: - -```text -mcp/plugins/docsearch/claude/algolia-docsearch -``` - -It includes: - -- `.mcp.json` with the public DocSearch MCP endpoint. -- A Claude Code skill that triggers for public developer documentation questions. -- `/algolia-docsearch:docs` for manual documentation lookups. - -If you install from the Claude Code marketplace, add the marketplace and install the plugin from Claude Code: - -```text -/plugin marketplace add algolia/docsearch -/plugin install algolia-docsearch@algolia-docsearch-marketplace -``` - - - - -## Manual installation - -Use manual installation when you only want the MCP tools, or when your client does not support DocSearch plugins yet. - - - - -Go to `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`. - -You can also add it to `~/.cursor/mcp.json` for a global install, or `.cursor/mcp.json` for a project install: - -[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=algolia-docsearch&config=eyJ1cmwiOiJodHRwczovL21jcC5hbGdvbGlhLmNvbS8xL2RvY3NlYXJjaC9tY3AifQ%3D%3D) - -```json -{ - "mcpServers": { - "algolia-docsearch": { - "url": "https://mcp.algolia.com/1/docsearch/mcp" - } - } -} -``` - - - - -Add the remote HTTP server with the Claude Code CLI: - -```bash -claude mcp add --scope user --transport http algolia-docsearch https://mcp.algolia.com/1/docsearch/mcp -``` - -Use `--scope project` instead of `--scope user` if you want the configuration stored with a specific project. - - - - -Open Claude Desktop, then go to `Settings` -> `Connectors` -> `Add Custom Connector`. - -Use: - -```text -Name: Algolia DocSearch -URL: https://mcp.algolia.com/1/docsearch/mcp -``` - - - - -For clients that support remote HTTP MCP servers, configure a server named `algolia-docsearch` with this URL: - -```text -https://mcp.algolia.com/1/docsearch/mcp -``` - -Many clients use a JSON shape similar to: - -```json -{ - "mcpServers": { - "algolia-docsearch": { - "type": "http", - "url": "https://mcp.algolia.com/1/docsearch/mcp" - } - } -} -``` - -If your client uses a different MCP config format, keep the same server name and URL, and follow that client's remote HTTP MCP documentation. - - - + ## Verify the install @@ -139,4 +23,4 @@ Ask your MCP client a public documentation question, for example: Use DocSearch MCP to find the current Next.js middleware matcher docs. ``` -The client should call `algolia_docsearch_resolve_docset`, then `algolia_docsearch_query_docs`, and answer with content from the matching documentation. +The client should call the DocSearch tools and answer with content from the matching documentation, ideally with source links. diff --git a/packages/website/docs/mcp/overview.mdx b/packages/website/docs/mcp/overview.mdx index cfe277fff..0021b79c7 100644 --- a/packages/website/docs/mcp/overview.mdx +++ b/packages/website/docs/mcp/overview.mdx @@ -13,44 +13,29 @@ https://mcp.algolia.com/1/docsearch/mcp ## What it does -DocSearch MCP exposes documentation search through the [Model Context Protocol](https://modelcontextprotocol.io/). MCP-compatible clients can connect to the endpoint and call DocSearch tools while answering your questions. +DocSearch MCP exposes documentation search through the [Model Context Protocol](https://modelcontextprotocol.io/). MCP-compatible clients connect to the endpoint and call DocSearch tools while answering your questions. The endpoint is focused on public developer documentation. You do not need an Algolia application ID, search API key, or DocSearch application to use it. ## How it works -DocSearch MCP uses a two-step lookup flow: +Most lookups are a single call: name the product and ask your question, and DocSearch finds the right documentation set and returns the matching content together. -1. Resolve the documentation set that best matches the library, framework, API, or product you asked about. -2. Query that documentation set for the specific topic. - -For example, if you ask about Next.js middleware, the client first resolves the Next.js docs, then searches those docs for middleware-specific pages. +When a question spans several products, or you want to inspect and hand-pick documentation sets first, there is a two-step flow: resolve the documentation sets, then query the ones you choose. ## Available tools -### `algolia_docsearch_resolve_docset` +### `algolia_docsearch_search_docs` -Finds matching documentation sets. It returns candidates with a `docset_id` and `targetIndex`, plus ranking signals that help the client choose the best match. +The one-shot tool, and the right default for most lookups. Give it a `library` (the product, SDK, or platform) and a `query` (your question); it resolves the best matching documentation set and returns ranked content in a single call. If the library is ambiguous, it returns candidate documentation sets to choose from instead. -Good queries are short and keyword-based: +### `algolia_docsearch_resolve_docset` -```text -Next.js middleware -Stripe webhooks -Algolia InstantSearch React -``` +Step 1 of the manual flow. Finds the documentation sets that best match a product, library, or platform and returns candidates — each with a `docset_id`, title, description, and ranking signals to help pick the best match. ### `algolia_docsearch_query_docs` -Searches inside one or more resolved documentation sets. The client passes the selected `docset_id` values and their matching `targetIndex` values. - -Good queries are specific to the docs content you want: - -```text -middleware matcher config -webhook signature verification -configure search client -``` +Step 2 of the manual flow. Retrieves documentation content for one or more `docset_id`s returned by `algolia_docsearch_resolve_docset`. Pass several at once when a question spans multiple products. ## Next steps diff --git a/packages/website/docs/mcp/usage.mdx b/packages/website/docs/mcp/usage.mdx index b0536c40a..fb7b8a9bd 100644 --- a/packages/website/docs/mcp/usage.mdx +++ b/packages/website/docs/mcp/usage.mdx @@ -7,7 +7,7 @@ DocSearch MCP works best when your client knows to search public documentation b ## Ask documentation questions -After installation, ask your client about public developer docs: +After installation, ask your client about public developer docs in natural language: ```text How do I configure middleware matchers in Next.js? @@ -43,61 +43,49 @@ Examples: /algolia-docsearch:docs Algolia InstantSearch React configure search client ``` -## Query style +## Tool flow -DocSearch MCP tools work best with short keyword queries. +DocSearch MCP exposes three tools. Most of the time the client only needs the one-shot tool; the two-step flow is for multi-product questions or when you want to hand-pick documentation sets. -Good tool queries: +You can ask in natural language — full sentences and questions work well. For the one-shot tool, keep `library` to the product name and put the actual question in `query`. -```text -Next.js middleware -middleware matcher config -Stripe webhooks -webhook signature verification -``` +### One-shot: `algolia_docsearch_search_docs` -Avoid sending full conversational prompts as tool queries: +The client names the product and asks the question in a single call: -```text -Can you please explain how I should configure middleware in the latest version of Next.js? +```json +{ + "library": "Next.js", + "query": "how do middleware matchers work" +} ``` -Your MCP client can still answer conversationally. The keyword guidance only applies to the tool calls it makes behind the scenes. +It returns ranked documentation content for the best matching set. If the library is ambiguous, it returns candidate documentation sets instead so the client can pick one and fall back to `algolia_docsearch_query_docs`. -## Tool flow +### Two-step: resolve, then query -DocSearch MCP exposes two tools. +For questions that span several products, or when the client wants to choose documentation sets explicitly: -### 1. Resolve a docset - -The client first calls `algolia_docsearch_resolve_docset` with a keyword query for the documentation source: +1. `algolia_docsearch_resolve_docset` finds documentation sets: ```json { - "query": "Next.js middleware" + "query": "Next.js app router" } ``` -The result includes candidates with `docset_id` and `targetIndex` values. The client should choose the candidate that best matches the requested public docs. - -### 2. Query the docs +It returns candidates, each with a `docset_id`. -The client then calls `algolia_docsearch_query_docs` with the selected docset and a topic-specific query: +2. `algolia_docsearch_query_docs` retrieves content for the chosen `docset_id`(s): ```json { "query": "middleware matcher config", - "docsetIds": ["nextjs"], - "targets": [ - { - "docsetId": "nextjs", - "indexName": "nextjs_docs" - } - ] + "docsetIds": ["nextjs"] } ``` -The `docsetIds` and `targets` values should come from the resolve step. +Pass multiple `docsetIds` when a question spans more than one product. ## Tips @@ -114,7 +102,7 @@ Make sure the MCP server is enabled in your client and named `algolia-docsearch` ### The result is about the wrong product -Ask with more specific keywords. For example, use `Algolia InstantSearch React routing` instead of `routing`. +Ask again with the official product name. For the one-shot tool, set `library` to the vendor's product name (for example, `Algolia InstantSearch` rather than `search`). ### The client cannot connect diff --git a/packages/website/src/components/mcp/MCPInstall.jsx b/packages/website/src/components/mcp/MCPInstall.jsx new file mode 100644 index 000000000..919508423 --- /dev/null +++ b/packages/website/src/components/mcp/MCPInstall.jsx @@ -0,0 +1,639 @@ +import useBaseUrl from '@docusaurus/useBaseUrl'; +import { Code2 } from 'lucide-react'; +import { AnimatePresence, motion, useReducedMotion } from 'motion/react'; +import React, { useState } from 'react'; + +const ENDPOINT = 'https://mcp.algolia.com/1/docsearch/mcp'; + +// Base64 of {"url":"https://mcp.algolia.com/1/docsearch/mcp"} for the Cursor install link. +const CURSOR_DEEPLINK = + 'https://cursor.com/en-US/install-mcp?name=algolia-docsearch&config=eyJ1cmwiOiJodHRwczovL21jcC5hbGdvbGlhLmNvbS8xL2RvY3NlYXJjaC9tY3AifQ%3D%3D'; + +const SPRING = { type: 'spring', stiffness: 800, damping: 38, mass: 0.35 }; + +const CLIENTS = [ + { + id: 'cursor', + name: 'Cursor', + blurb: 'Plugin · 1-click · manual', + logo: 'cursor.svg', + logoDark: 'cursor_dark.svg', + plugin: [ + { kind: 'installButton', href: CURSOR_DEEPLINK, label: 'Install in Cursor' }, + { kind: 'text', content: 'Install the Cursor plugin package from the DocSearch repository:' }, + { kind: 'code', caption: 'Plugin package', code: 'mcp/plugins/docsearch/cursor/algolia-docsearch' }, + { + kind: 'text', + content: + 'It ships the MCP server, a rule, and a skill that teach Cursor when and how to call the DocSearch tools.', + }, + ], + manual: [ + { kind: 'installButton', href: CURSOR_DEEPLINK, label: 'Install in Cursor' }, + { kind: 'text', content: 'Or add it to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):' }, + { + kind: 'code', + caption: '~/.cursor/mcp.json', + code: `{ + "mcpServers": { + "algolia-docsearch": { + "url": "${ENDPOINT}" + } + } +}`, + }, + ], + }, + { + id: 'claude', + name: 'Claude', + blurb: 'Code & Desktop', + logo: 'claude.svg', + plugin: [ + { kind: 'subhead', content: 'Claude Code' }, + { kind: 'text', content: 'Add the marketplace and install the plugin from inside Claude Code:' }, + { + kind: 'code', + caption: 'In Claude Code', + code: `/plugin marketplace add algolia/docsearch +/plugin install algolia-docsearch@algolia-docsearch-marketplace`, + }, + { + kind: 'text', + content: + 'The plugin adds the MCP server, a skill, and the /algolia-docsearch:docs command. Plugins are a Claude Code feature — Claude Desktop connects via a custom connector (see Manual).', + }, + ], + manual: [ + { kind: 'subhead', content: 'Claude Code' }, + { kind: 'text', content: 'Add the remote server with the Claude Code CLI:' }, + { + kind: 'code', + caption: 'Terminal', + code: `claude mcp add --scope user --transport http algolia-docsearch ${ENDPOINT}`, + }, + { kind: 'subhead', content: 'Claude Desktop' }, + { + kind: 'steps', + items: ['Open Settings → Connectors.', 'Click Add custom connector.', 'Enter the name and URL, then save.'], + }, + { + kind: 'code', + caption: 'Connector', + code: `Name: Algolia DocSearch +URL: ${ENDPOINT}`, + }, + ], + }, + { + id: 'codex', + name: 'Codex', + blurb: 'CLI · config.toml', + logo: 'codex.svg', + logoDark: 'codex_dark.svg', + manual: [ + { kind: 'text', content: 'Add the remote MCP server with the Codex CLI:' }, + { + kind: 'code', + caption: 'Terminal', + code: `codex mcp add algolia-docsearch --url ${ENDPOINT}`, + }, + { + kind: 'text', + content: 'Or add the same URL under [mcp_servers.algolia-docsearch] in ~/.codex/config.toml.', + }, + ], + }, + { + id: 'chatgpt', + name: 'ChatGPT', + blurb: 'Custom connector', + logo: 'chatgpt.svg', + logoDark: 'chatgpt_dark.svg', + manual: [ + { + kind: 'steps', + items: [ + 'Open Settings -> Connectors.', + 'Enable Developer Mode if your workspace requires it.', + 'Create a custom connector named Algolia DocSearch.', + 'Paste the MCP endpoint shown above as the server URL and choose No Auth.', + ], + }, + { kind: 'note', content: 'Custom connector availability depends on your ChatGPT plan and workspace settings.' }, + ], + }, + { + id: 'opencode', + name: 'OpenCode', + blurb: 'Remote MCP', + logo: 'opencode.svg', + logoDark: 'opencode_dark.svg', + manual: [ + { kind: 'text', content: 'Add a remote MCP entry to your OpenCode config:' }, + { + kind: 'code', + caption: 'opencode.json', + code: `{ + "$schema": "https://opencode.ai/config.json", + "mcp": { + "algolia-docsearch": { + "type": "remote", + "url": "${ENDPOINT}", + "enabled": true + } + } +}`, + }, + ], + }, + { + id: 'pi', + name: 'Pi', + blurb: 'Extension required', + logo: 'pi.svg', + manual: [ + { + kind: 'text', + content: + 'Pi does not include MCP support by default. Install an MCP extension or adapter first, then add the DocSearch server:', + }, + { + kind: 'code', + caption: 'Terminal', + code: 'pi install npm:pi-mcp-adapter', + }, + { + kind: 'code', + caption: '.mcp.json', + code: `{ + "mcpServers": { + "algolia-docsearch": { + "url": "${ENDPOINT}" + } + } +}`, + }, + ], + }, + { + id: 'vscode', + name: 'VS Code', + blurb: 'Copilot agent', + logo: 'vscode.svg', + manual: [ + { + kind: 'text', + content: + 'Add a remote server in .vscode/mcp.json (workspace) or your user config. VS Code uses the servers key.', + }, + { + kind: 'code', + caption: '.vscode/mcp.json', + code: `{ + "servers": { + "algolia-docsearch": { + "type": "http", + "url": "${ENDPOINT}" + } + } +}`, + }, + { kind: 'note', content: 'DocSearch tools become available in Copilot Chat agent mode.' }, + ], + }, + { + id: 'windsurf', + name: 'Windsurf', + blurb: 'Cascade', + logo: 'windsurf.svg', + logoDark: 'windsurf_dark.svg', + manual: [ + { + kind: 'text', + content: 'Edit ~/.codeium/windsurf/mcp_config.json. Windsurf uses serverUrl for remote servers.', + }, + { + kind: 'code', + caption: 'mcp_config.json', + code: `{ + "mcpServers": { + "algolia-docsearch": { + "serverUrl": "${ENDPOINT}" + } + } +}`, + }, + { kind: 'note', content: 'Restart Windsurf after saving.' }, + ], + }, + { + id: 'zed', + name: 'Zed', + blurb: 'Context server', + logo: 'zed.svg', + logoDark: 'zed_dark.svg', + manual: [ + { kind: 'text', content: 'Add a context server in settings.json. Zed uses the context_servers key.' }, + { + kind: 'code', + caption: 'settings.json', + code: `{ + "context_servers": { + "algolia-docsearch": { + "url": "${ENDPOINT}" + } + } +}`, + }, + ], + }, + { + id: 'conductor', + name: 'Conductor', + blurb: 'Agent host config', + logo: 'conductor.svg', + logoDark: 'conductor_dark.svg', + manual: [ + { + kind: 'text', + content: + 'Conductor loads MCP servers from the selected agent host. Configure DocSearch in Claude Code, Codex, or Cursor, then start a Conductor session with that host.', + }, + { + kind: 'note', + content: + 'There is no separate Conductor MCP config for normal Claude Code, Codex, or Cursor Composer sessions.', + }, + ], + }, + { + id: 'antigravity', + name: 'Antigravity', + blurb: 'Google agent', + logo: 'antigravity.svg', + manual: [ + { kind: 'text', content: 'Open Manage MCP Servers -> View raw config, then add:' }, + { + kind: 'code', + caption: '~/.gemini/config/mcp_config.json', + code: `{ + "mcpServers": { + "algolia-docsearch": { + "serverUrl": "${ENDPOINT}" + } + } +}`, + }, + { kind: 'note', content: 'Save and refresh the Installed MCP Servers list.' }, + ], + }, + { + id: 'other', + name: 'Other clients', + blurb: 'Any MCP host', + icon: 'code', + manual: [ + { + kind: 'text', + content: 'Most clients that support remote HTTP MCP servers accept this shape. Keep the name and URL:', + }, + { + kind: 'code', + caption: 'MCP config', + code: `{ + "mcpServers": { + "algolia-docsearch": { + "type": "http", + "url": "${ENDPOINT}" + } + } +}`, + }, + { + kind: 'note', + content: + 'If your client uses a different key (servers, context_servers) or field (serverUrl), follow its MCP docs.', + }, + ], + }, +]; + +function CopyButton({ value, className = '' }) { + const [copied, setCopied] = useState(false); + + function onCopy() { + if (typeof navigator === 'undefined' || !navigator.clipboard) return; + navigator.clipboard.writeText(value).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 1500); + }); + } + + return ( + + + + {copied ? 'Copied' : 'Copy'} + + + + ); +} + +function CodeCard({ caption, code }) { + return ( +
+
+ {caption} + +
+
+        {code}
+      
+
+ ); +} + +function CursorInstallButton({ href, label }) { + return ( + + {label} + {label} + + ); +} + +function Block({ block }) { + switch (block.kind) { + case 'subhead': + return ( +
+ + {block.content} + + +
+ ); + case 'text': + return

{block.content}

; + case 'note': + return ( +

+ {block.content} +

+ ); + case 'code': + return ; + case 'steps': + return ( +
    + {block.items.map((item, idx) => ( +
  1. + + {idx + 1} + + {item} +
  2. + ))} +
+ ); + case 'button': + return ( + + {block.label} + + ); + case 'installButton': + return ; + default: + return null; + } +} + +function ClientLogo({ client, size = 'h-7 w-7' }) { + if (client.icon === 'code') { + return ( + + + + ); + } + + const single = useBaseUrl(`/img/mcp-clients/${client.icon ?? client.logo}`); + const dark = useBaseUrl(`/img/mcp-clients/${client.logoDark ?? client.logo}`); + const hasDark = Boolean(client.logoDark); + + if (!hasDark) { + return {`${client.name}; + } + + return ( + <> + {`${client.name} + + + ); +} + +export default function MCPInstall() { + const [selectedId, setSelectedId] = useState(CLIENTS[0].id); + const [mode, setMode] = useState('plugin'); + const reduce = useReducedMotion(); + + const selected = CLIENTS.find((client) => client.id === selectedId) ?? CLIENTS[0]; + const hasPlugin = Array.isArray(selected.plugin); + const activeMode = hasPlugin ? mode : 'manual'; + const blocks = activeMode === 'plugin' ? selected.plugin : selected.manual; + + const rise = reduce ? 0 : 10; + const cardRise = reduce ? 0 : 8; + + function selectClient(id) { + setSelectedId(id); + setMode('plugin'); + } + + return ( + +
+ {/* Header */} +
+
+
+

+ Connect DocSearch MCP +

+

+ Pick your client to get the install steps +

+
+
+
+ + {/* Client picker */} + + {CLIENTS.map((client) => { + const isActive = client.id === selectedId; + return ( + selectClient(client.id)} + > + {isActive && ( + + )} + + + {client.name} + + + ); + })} + + + {/* Detail panel */} +
+
+ + + + + {selected.name} + + {selected.blurb} + + + + {hasPlugin && ( +
+ {['plugin', 'manual'].map((value) => { + const isActive = activeMode === value; + return ( + + ); + })} +
+ )} +
+ + + + {blocks.map((block, idx) => ( + + + + ))} + + +
+
+
+ ); +} diff --git a/packages/website/static/img/docsearch-monogram.svg b/packages/website/static/img/docsearch-monogram.svg new file mode 100644 index 000000000..3ce446d23 --- /dev/null +++ b/packages/website/static/img/docsearch-monogram.svg @@ -0,0 +1 @@ + diff --git a/packages/website/static/img/mcp-clients/algolia.svg b/packages/website/static/img/mcp-clients/algolia.svg new file mode 100644 index 000000000..428be9f60 --- /dev/null +++ b/packages/website/static/img/mcp-clients/algolia.svg @@ -0,0 +1 @@ + diff --git a/packages/website/static/img/mcp-clients/antigravity.svg b/packages/website/static/img/mcp-clients/antigravity.svg new file mode 100644 index 000000000..1b048dd58 --- /dev/null +++ b/packages/website/static/img/mcp-clients/antigravity.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/website/static/img/mcp-clients/chatgpt.svg b/packages/website/static/img/mcp-clients/chatgpt.svg new file mode 100644 index 000000000..2ebab679f --- /dev/null +++ b/packages/website/static/img/mcp-clients/chatgpt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/chatgpt_dark.svg b/packages/website/static/img/mcp-clients/chatgpt_dark.svg new file mode 100644 index 000000000..b6d542d09 --- /dev/null +++ b/packages/website/static/img/mcp-clients/chatgpt_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/claude.svg b/packages/website/static/img/mcp-clients/claude.svg new file mode 100644 index 000000000..d3007012b --- /dev/null +++ b/packages/website/static/img/mcp-clients/claude.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/codex.svg b/packages/website/static/img/mcp-clients/codex.svg new file mode 100644 index 000000000..bae0b51e8 --- /dev/null +++ b/packages/website/static/img/mcp-clients/codex.svg @@ -0,0 +1 @@ +Codex \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/codex_dark.svg b/packages/website/static/img/mcp-clients/codex_dark.svg new file mode 100644 index 000000000..920b98492 --- /dev/null +++ b/packages/website/static/img/mcp-clients/codex_dark.svg @@ -0,0 +1 @@ +Codex \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/conductor.svg b/packages/website/static/img/mcp-clients/conductor.svg new file mode 100644 index 000000000..446c53f3d --- /dev/null +++ b/packages/website/static/img/mcp-clients/conductor.svg @@ -0,0 +1 @@ + diff --git a/packages/website/static/img/mcp-clients/conductor_dark.svg b/packages/website/static/img/mcp-clients/conductor_dark.svg new file mode 100644 index 000000000..0938e0808 --- /dev/null +++ b/packages/website/static/img/mcp-clients/conductor_dark.svg @@ -0,0 +1 @@ + diff --git a/packages/website/static/img/mcp-clients/cursor.svg b/packages/website/static/img/mcp-clients/cursor.svg new file mode 100644 index 000000000..635d3ccdc --- /dev/null +++ b/packages/website/static/img/mcp-clients/cursor.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/cursor_dark.svg b/packages/website/static/img/mcp-clients/cursor_dark.svg new file mode 100644 index 000000000..10d50ca84 --- /dev/null +++ b/packages/website/static/img/mcp-clients/cursor_dark.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/opencode.svg b/packages/website/static/img/mcp-clients/opencode.svg new file mode 100644 index 000000000..542a9188c --- /dev/null +++ b/packages/website/static/img/mcp-clients/opencode.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/opencode_dark.svg b/packages/website/static/img/mcp-clients/opencode_dark.svg new file mode 100644 index 000000000..157edc4d7 --- /dev/null +++ b/packages/website/static/img/mcp-clients/opencode_dark.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/pi.svg b/packages/website/static/img/mcp-clients/pi.svg new file mode 100644 index 000000000..c28d62423 --- /dev/null +++ b/packages/website/static/img/mcp-clients/pi.svg @@ -0,0 +1,21 @@ + + + + + + diff --git a/packages/website/static/img/mcp-clients/vscode.svg b/packages/website/static/img/mcp-clients/vscode.svg new file mode 100644 index 000000000..1c2119996 --- /dev/null +++ b/packages/website/static/img/mcp-clients/vscode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/windsurf.svg b/packages/website/static/img/mcp-clients/windsurf.svg new file mode 100644 index 000000000..bcaf63914 --- /dev/null +++ b/packages/website/static/img/mcp-clients/windsurf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/windsurf_dark.svg b/packages/website/static/img/mcp-clients/windsurf_dark.svg new file mode 100644 index 000000000..8f4b21445 --- /dev/null +++ b/packages/website/static/img/mcp-clients/windsurf_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/zed.svg b/packages/website/static/img/mcp-clients/zed.svg new file mode 100644 index 000000000..eca91c538 --- /dev/null +++ b/packages/website/static/img/mcp-clients/zed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/website/static/img/mcp-clients/zed_dark.svg b/packages/website/static/img/mcp-clients/zed_dark.svg new file mode 100644 index 000000000..89df32321 --- /dev/null +++ b/packages/website/static/img/mcp-clients/zed_dark.svg @@ -0,0 +1 @@ + \ No newline at end of file From 3ab2438c8e023f2450032aa8747faa9226794c33 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Thu, 18 Jun 2026 15:46:44 +0200 Subject: [PATCH 6/8] fix: remove yarn override --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 75a42f6e0..9aaabebe1 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,5 @@ "typescript-eslint": "8.20.0", "vitest": "3.0.2", "watch": "1.0.2" - }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + } } From 899f96cbaaf1615e4b826699e5058d01e6c1fdc5 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 22 Jun 2026 09:11:44 +0200 Subject: [PATCH 7/8] fix: add dsmcp --- .../algolia-docsearch/{ => .claude-plugin}/marketplace.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mcp/plugins/docsearch/claude/algolia-docsearch/{ => .claude-plugin}/marketplace.json (100%) diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json similarity index 100% rename from mcp/plugins/docsearch/claude/algolia-docsearch/marketplace.json rename to mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json From 26561934aba76a25741fcb020b6b2454c9ed5cb6 Mon Sep 17 00:00:00 2001 From: Dylan Tientcheu Date: Mon, 22 Jun 2026 09:11:45 +0200 Subject: [PATCH 8/8] feat: add MCP support --- .cursor/mcp.json | 8 ++++++++ .cursor/rules/use-algolia-docsearch.mdc | 1 + .../algolia-docsearch/.claude-plugin/marketplace.json | 1 + .../claude/algolia-docsearch/.claude-plugin/plugin.json | 3 +-- mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json | 7 +++++-- packages/website/docusaurus.config.mjs | 5 +++++ 6 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .cursor/mcp.json create mode 120000 .cursor/rules/use-algolia-docsearch.mdc diff --git a/.cursor/mcp.json b/.cursor/mcp.json new file mode 100644 index 000000000..c87970331 --- /dev/null +++ b/.cursor/mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "algolia-docsearch": { + "type": "http", + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } + } +} diff --git a/.cursor/rules/use-algolia-docsearch.mdc b/.cursor/rules/use-algolia-docsearch.mdc new file mode 120000 index 000000000..d64ae41b2 --- /dev/null +++ b/.cursor/rules/use-algolia-docsearch.mdc @@ -0,0 +1 @@ +../../mcp/plugins/docsearch/cursor/algolia-docsearch/rules/use-algolia-docsearch.mdc \ No newline at end of file diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json index 1b083d56f..1cecc6d49 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/marketplace.json @@ -1,5 +1,6 @@ { "name": "algolia-docsearch-marketplace", + "description": "Algolia DocSearch plugins for Claude Code — search up-to-date public developer documentation from the DocSearch corpus.", "owner": { "name": "Algolia" }, diff --git a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json index a964f87f5..81679d9b4 100644 --- a/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json +++ b/mcp/plugins/docsearch/claude/algolia-docsearch/.claude-plugin/plugin.json @@ -4,6 +4,5 @@ "version": "1.0.0", "author": { "name": "Algolia" - }, - "logo": "https://docsearchmcp.netlify.app/favicon.svg" + } } diff --git a/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json b/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json index d9b3d01a7..c87970331 100644 --- a/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json +++ b/mcp/plugins/docsearch/cursor/algolia-docsearch/mcp.json @@ -1,5 +1,8 @@ { - "algolia-docsearch": { - "url": "https://mcp.algolia.com/1/docsearch/mcp" + "mcpServers": { + "algolia-docsearch": { + "type": "http", + "url": "https://mcp.algolia.com/1/docsearch/mcp" + } } } diff --git a/packages/website/docusaurus.config.mjs b/packages/website/docusaurus.config.mjs index 8414777bb..b32cb9ab3 100644 --- a/packages/website/docusaurus.config.mjs +++ b/packages/website/docusaurus.config.mjs @@ -111,6 +111,11 @@ export default { to: 'docs/what-is-docsearch', position: 'left', }, + { + label: 'MCP', + to: 'docs/mcp/overview', + position: 'left', + }, { label: 'Playground', to: 'https://community.algolia.com/docsearch-playground/',