diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f403bb4..7a40938 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,11 +10,20 @@ { "name": "csp", "source": "./plugins/csp", - "description": "Hybrid (dense + BM25) code search for agents. Bundles the csp MCP server (search, find_related) and a csp-search sub-agent.", + "description": "Hybrid (dense + BM25) code search for agents. Adds a csp-search sub-agent and skill that call the csp CLI.", "homepage": "https://github.com/pleaseai/code-search", "repository": "https://github.com/pleaseai/code-search", "license": "MIT", - "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "mcp", "agent"] + "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "agent"] + }, + { + "name": "csp-mcp", + "source": "./plugins/csp-mcp", + "description": "Hybrid (dense + BM25) code search for agents. Registers the csp MCP server (search, find_related).", + "homepage": "https://github.com/pleaseai/code-search", + "repository": "https://github.com/pleaseai/code-search", + "license": "MIT", + "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "mcp"] } ] } diff --git a/README.ko.md b/README.ko.md index 1ac2fef..a9ff45d 100644 --- a/README.ko.md +++ b/README.ko.md @@ -54,13 +54,14 @@ claude mcp add csp -s user -- bunx @pleaseai/csp mcp ### 플러그인 (Claude Code & Codex) -`csp`를 설정하는 가장 빠른 방법은 플러그인입니다. MCP 서버와 `csp-search` 헬퍼를 한 번에 등록하며, 동일한 디렉터리에서 Claude Code와 Codex 양쪽을 지원합니다. +`csp`를 설정하는 가장 빠른 방법은 플러그인입니다. `csp-search` 헬퍼를 등록하고, 원하면 MCP 서버도 함께 등록할 수 있습니다. Claude Code와 Codex 양쪽을 지원합니다. -Claude Code: +Claude Code에서는 두 기능이 별도 플러그인으로 나뉘어 있어 MCP 서버를 빼고 설치할 수 있습니다. ```text /plugin marketplace add pleaseai/claude-code-plugins -/plugin install csp@pleaseai +/plugin install csp@pleaseai # csp-search 서브에이전트 + 스킬 (CLI) +/plugin install csp-mcp@pleaseai # 선택: csp MCP 서버 ``` Codex: @@ -70,7 +71,7 @@ codex plugin marketplace add pleaseai/claude-code-plugins codex plugin add csp@pleaseai ``` -`csp` MCP 서버(`search`, `find_related`)와 함께 `csp-search` 서브에이전트(Claude Code) / 스킬(Codex)을 번들합니다. 서버를 `bunx`로 실행하려면 `PATH`에 [Bun](https://bun.sh)이 있어야 합니다. 자세한 내용은 [plugins/csp](plugins/csp/README.md)를 참고하세요. +Claude Code에서 `csp`는 `csp` CLI를 호출하는 `csp-search` 서브에이전트와 스킬을 추가하고, `csp-mcp`는 `csp` MCP 서버(`search`, `find_related`)를 등록합니다. Codex 플러그인은 MCP 서버와 `csp-search` 스킬을 함께 번들합니다. 서버를 `bunx`로 실행하려면 `PATH`에 [Bun](https://bun.sh)이 있어야 합니다(헬퍼는 Homebrew로 설치한 `csp`로도 동작합니다). 자세한 내용은 [plugins/csp](plugins/csp/README.md)와 [plugins/csp-mcp](plugins/csp-mcp/README.md)를 참고하세요. ### AGENTS.md diff --git a/README.md b/README.md index 4fb0a2d..9382667 100644 --- a/README.md +++ b/README.md @@ -54,13 +54,14 @@ See [MCP Server](#mcp-server) below for other harnesses (Cursor, Codex, OpenCode ### Plugin (Claude Code & Codex) -The fastest way to set up `csp` is the plugin, which registers the MCP server **and** the `csp-search` helper in one step. It ships for both Claude Code and Codex from the same directory. +The fastest way to set up `csp` is the plugin, which registers the `csp-search` helper and, optionally, the MCP server. It ships for both Claude Code and Codex. -Claude Code: +Claude Code installs the two halves as separate plugins, so you can skip the MCP server: ```text /plugin marketplace add pleaseai/claude-code-plugins -/plugin install csp@pleaseai +/plugin install csp@pleaseai # csp-search sub-agent + skill (CLI) +/plugin install csp-mcp@pleaseai # optional: the csp MCP server ``` Codex: @@ -70,7 +71,7 @@ codex plugin marketplace add pleaseai/claude-code-plugins codex plugin add csp@pleaseai ``` -It bundles the `csp` MCP server (`search`, `find_related`) plus a `csp-search` sub-agent (Claude Code) / skill (Codex). Requires [Bun](https://bun.sh) on your `PATH` so `bunx` can launch the server. See [plugins/csp](plugins/csp/README.md) for details. +On Claude Code, `csp` adds a `csp-search` sub-agent and skill that call the `csp` CLI, and `csp-mcp` registers the `csp` MCP server (`search`, `find_related`). The Codex plugin bundles both the MCP server and the `csp-search` skill. Requires [Bun](https://bun.sh) on your `PATH` so `bunx` can launch the server (the helper also works with a Homebrew-installed `csp`). See [plugins/csp](plugins/csp/README.md) and [plugins/csp-mcp](plugins/csp-mcp/README.md) for details. ### AGENTS.md diff --git a/docs/src/content/docs/development.mdx b/docs/src/content/docs/development.mdx index d51d073..8ca28e9 100644 --- a/docs/src/content/docs/development.mdx +++ b/docs/src/content/docs/development.mdx @@ -25,7 +25,8 @@ cargo run -p code-search-please -- search "query" . | `crates/csp` | The Rust library and the `csp` binary (CLI + MCP server). | | `crates/csp-node` | napi-rs bindings, shipped as `@pleaseai/csp-sdk`. | | `npm/` | The `@pleaseai/csp` npm launcher that execs the platform binary. | -| `plugins/csp` | The Claude Code / Codex plugin. | +| `plugins/csp` | The Claude Code / Codex plugin (`csp-search` sub-agent and skill; MCP server on Codex). | +| `plugins/csp-mcp` | The Claude Code plugin that registers the MCP server. | | `docs/` | This documentation site (Cloudflare Nimbus). | ## Contributing diff --git a/docs/src/content/docs/plugin.mdx b/docs/src/content/docs/plugin.mdx index e9ef56b..02d659f 100644 --- a/docs/src/content/docs/plugin.mdx +++ b/docs/src/content/docs/plugin.mdx @@ -1,18 +1,21 @@ --- title: Plugin (Claude Code & Codex) -description: Install the csp plugin to register the MCP server and the csp-search helper in one step. +description: Install the csp plugin to register the csp-search helper and, optionally, the MCP server. --- -The fastest way to set up `csp` is the plugin, which registers the MCP server **and** the `csp-search` helper in one step. It ships for both Claude Code and Codex from the same directory. +The fastest way to set up `csp` is the plugin, which registers the `csp-search` helper and, optionally, the MCP server. It ships for both Claude Code and Codex. + Claude Code installs the two halves as separate plugins, so you can skip the MCP server: + ```text /plugin marketplace add pleaseai/claude-code-plugins - /plugin install csp@pleaseai + /plugin install csp@pleaseai # csp-search sub-agent + skill (CLI) + /plugin install csp-mcp@pleaseai # optional: the csp MCP server ``` - Then restart Claude Code, or run `/mcp` to confirm the `csp` server is connected. + If you installed `csp-mcp`, restart Claude Code or run `/mcp` to confirm the `csp` server is connected. ```bash @@ -22,14 +25,14 @@ The fastest way to set up `csp` is the plugin, which registers the MCP server ** -## What the plugin installs +## What the plugins install -- **MCP server `csp`**: exposes the `search` and `find_related` tools, launched via `bunx @pleaseai/csp mcp`. Repos are cloned and indexed on demand; local paths are watched and re-indexed automatically. -- **`csp-search` helper**: a dedicated Claude Code sub-agent (`agents/csp-search.md`) or Codex skill (`skills/csp-search/SKILL.md`) that runs `csp` searches with the right flags. +- **`csp-search` helper** (`csp`): a dedicated sub-agent (`agents/csp-search.md`, Claude Code) and skill (`skills/csp-search/SKILL.md`, Claude Code and Codex) that run `csp search` and `csp find-related` through the CLI with the right flags. +- **MCP server `csp`** (`csp-mcp` on Claude Code, bundled in `csp` on Codex): exposes the `search` and `find_related` tools, launched via `bunx @pleaseai/csp mcp`. Repos are cloned and indexed on demand; local paths are watched and re-indexed automatically. ## Requirements -[Bun](https://bun.sh) 1.3.10+ must be on your `PATH` so `bunx` can launch the MCP server. Node.js 22+ also works via `npx @pleaseai/csp mcp` (edit the MCP config if you prefer npm). +[Bun](https://bun.sh) 1.3.10+ must be on your `PATH` so `bunx` can launch the MCP server. Node.js 22+ also works via `npx @pleaseai/csp mcp` (edit the MCP config if you prefer npm). The `csp-search` helper calls the `csp` CLI, so a Homebrew install (`brew install pleaseai/tap/csp`) is enough if you skip the MCP server; otherwise it falls back to `bunx @pleaseai/csp`. ## Customization @@ -37,12 +40,12 @@ By default the MCP server indexes only code files. To also index documentation o ## Layout -One directory carries both manifests; each harness reads its own and ignores the other. +`plugins/csp` carries both the Claude Code and Codex manifests; each harness reads its own and ignores the other. `plugins/csp-mcp` is Claude Code only. | | Claude Code | Codex | |---|---|---| -| Manifest | `.claude-plugin/plugin.json` | `.codex-plugin/plugin.json` | -| MCP config | `.mcp.json` (`mcpServers`) | `.mcp.codex.json` (`mcp_servers`) | -| Helper | `agents/csp-search.md` (sub-agent) | `skills/csp-search/SKILL.md` (skill) | +| Manifest | `plugins/csp/.claude-plugin/plugin.json` | `plugins/csp/.codex-plugin/plugin.json` | +| MCP config | `plugins/csp-mcp/.mcp.json` (`mcpServers`) | `plugins/csp/.mcp.codex.json` (`mcp_servers`) | +| Helper | `agents/csp-search.md` (sub-agent) and `skills/csp-search/SKILL.md` (skill) | `skills/csp-search/SKILL.md` (skill) | -The plugin source lives at [plugins/csp](https://github.com/pleaseai/code-search/tree/main/plugins/csp) in the repository. +The plugin sources live at [plugins/csp](https://github.com/pleaseai/code-search/tree/main/plugins/csp) and [plugins/csp-mcp](https://github.com/pleaseai/code-search/tree/main/plugins/csp-mcp) in the repository. diff --git a/plugins/csp-mcp/.claude-plugin/plugin.json b/plugins/csp-mcp/.claude-plugin/plugin.json new file mode 100644 index 0000000..bd23116 --- /dev/null +++ b/plugins/csp-mcp/.claude-plugin/plugin.json @@ -0,0 +1,16 @@ +{ + "name": "csp-mcp", + "displayName": "Code Search (csp) MCP server", + "version": "0.0.0", + "description": "Registers the csp MCP server (search, find_related) for fast, local, token-efficient hybrid code search. Pair it with the csp plugin for the csp-search sub-agent and skill.", + "author": { + "name": "Minsu Lee", + "email": "minsu.lee@dietfriends.kr", + "url": "https://github.com/amondnet" + }, + "homepage": "https://github.com/pleaseai/code-search", + "repository": "https://github.com/pleaseai/code-search", + "license": "MIT", + "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "embeddings", "mcp", "rag"], + "mcpServers": "./.mcp.json" +} diff --git a/plugins/csp/.mcp.json b/plugins/csp-mcp/.mcp.json similarity index 100% rename from plugins/csp/.mcp.json rename to plugins/csp-mcp/.mcp.json diff --git a/plugins/csp-mcp/README.md b/plugins/csp-mcp/README.md new file mode 100644 index 0000000..0561e4e --- /dev/null +++ b/plugins/csp-mcp/README.md @@ -0,0 +1,26 @@ +# csp-mcp — Claude Code plugin + +Registers the `csp` MCP server for Claude Code. It is the MCP half of the [`csp`](../csp/README.md) plugin, split out so you can choose whether to run the server. See the [project README](../../README.md) for the full library/CLI/MCP documentation. + +## What this plugin installs + +- **MCP server `csp`** — exposes the `search` and `find_related` tools, launched via `bunx @pleaseai/csp mcp`. Repos are cloned and indexed on demand; local paths are watched and re-indexed automatically. + +The `csp-search` sub-agent and skill live in the [`csp`](../csp/README.md) plugin. Install both for the full setup. + +## Install + +```text +/plugin marketplace add pleaseai/claude-code-plugins +/plugin install csp-mcp@pleaseai +``` + +Then restart Claude Code (or run `/mcp` to confirm the `csp` server is connected). + +## Requirements + +[Bun](https://bun.sh) 1.3.10+ must be on your `PATH` so `bunx` can launch the MCP server. Node.js 22+ also works via `npx @pleaseai/csp mcp` (edit the MCP config if you prefer npm). + +## Customization + +By default the MCP server indexes only code files. To also index documentation or config, append `--content` to the server args in `.mcp.json`, e.g. `["@pleaseai/csp", "mcp", "--content", "all"]`. A single tool call can also override this with its `content` argument (`code`, `docs`, `config`, or `all`). diff --git a/plugins/csp/.claude-plugin/plugin.json b/plugins/csp/.claude-plugin/plugin.json index d2e3239..615bfd7 100644 --- a/plugins/csp/.claude-plugin/plugin.json +++ b/plugins/csp/.claude-plugin/plugin.json @@ -2,7 +2,7 @@ "name": "csp", "displayName": "Code Search (csp)", "version": "0.0.0", - "description": "Fast, local, token-efficient hybrid code search for agents. Registers the csp MCP server (search, find_related) and a dedicated csp-search sub-agent.", + "description": "Fast, local, token-efficient hybrid code search for agents. Adds a csp-search sub-agent and skill that call the csp CLI. Install csp-mcp for the MCP server.", "author": { "name": "Minsu Lee", "email": "minsu.lee@dietfriends.kr", @@ -11,7 +11,6 @@ "homepage": "https://github.com/pleaseai/code-search", "repository": "https://github.com/pleaseai/code-search", "license": "MIT", - "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "embeddings", "mcp", "agent", "rag"], - "mcpServers": "./.mcp.json", + "keywords": ["code-search", "hybrid-search", "semantic-search", "bm25", "embeddings", "agent", "rag"], "agents": ["./agents/csp-search.md"] } diff --git a/plugins/csp/README.md b/plugins/csp/README.md index 39b06b1..9124ec1 100644 --- a/plugins/csp/README.md +++ b/plugins/csp/README.md @@ -4,8 +4,10 @@ Fast, local, token-efficient hybrid code search for agents, packaged as both a [ ## What this plugin installs -- **MCP server `csp`** — exposes the `search` and `find_related` tools, launched via `bunx @pleaseai/csp mcp`. Repos are cloned and indexed on demand; local paths are watched and re-indexed automatically. -- **`csp-search` helper** — a dedicated Claude Code sub-agent (`agents/csp-search.md`) / Codex skill (`skills/csp-search/SKILL.md`) that runs `csp` searches with the right flags. +- **`csp-search` helper** — a dedicated sub-agent (`agents/csp-search.md`, Claude Code) and skill (`skills/csp-search/SKILL.md`, Claude Code and Codex) that run `csp search` / `csp find-related` through the CLI with the right flags. +- **MCP server `csp`** (Codex only) — exposes the `search` and `find_related` tools, launched via `bunx @pleaseai/csp mcp`. + +On Claude Code the MCP server ships as a separate plugin, [`csp-mcp`](../csp-mcp/README.md), so you can choose whether to run it. Install both for the full setup. ## Install @@ -14,10 +16,9 @@ Fast, local, token-efficient hybrid code search for agents, packaged as both a [ ```text /plugin marketplace add pleaseai/claude-code-plugins /plugin install csp@pleaseai +/plugin install csp-mcp@pleaseai # optional: the MCP server ``` -Then restart Claude Code (or run `/mcp` to confirm the `csp` server is connected). - **Codex:** ```bash @@ -27,11 +28,7 @@ codex plugin add csp@pleaseai ## Requirements -[Bun](https://bun.sh) 1.3.10+ must be on your `PATH` so `bunx` can launch the MCP server. Node.js 22+ also works via `npx @pleaseai/csp mcp` (edit the MCP config if you prefer npm). - -## Customization - -By default the MCP server indexes only code files. To also index documentation or config, append `--content` to the server args, e.g. `["@pleaseai/csp", "mcp", "--content", "all"]`. A single tool call can also override this with its `content` argument (`code`, `docs`, `config`, or `all`). +The helper calls the `csp` CLI. Install it with Homebrew (`brew install pleaseai/tap/csp`), or keep [Bun](https://bun.sh) 1.3.10+ on your `PATH` so the helper can fall back to `bunx @pleaseai/csp`. ## Layout @@ -40,7 +37,7 @@ This one directory carries both manifests; each harness reads its own and ignore | | Claude Code | Codex | |---|---|---| | Manifest | `.claude-plugin/plugin.json` | `.codex-plugin/plugin.json` | -| MCP config | `.mcp.json` (`mcpServers`) | `.mcp.codex.json` (`mcp_servers`) | -| Helper | `agents/csp-search.md` (sub-agent) | `skills/csp-search/SKILL.md` (skill) | +| MCP config | none (see [`csp-mcp`](../csp-mcp/README.md)) | `.mcp.codex.json` (`mcp_servers`) | +| Helper | `agents/csp-search.md` (sub-agent) and `skills/csp-search/SKILL.md` (skill) | `skills/csp-search/SKILL.md` (skill) | Marketplaces are defined at the repo root: `.claude-plugin/marketplace.json` (Claude Code) and `.agents/plugins/marketplace.json` (Codex).