Install
Install search-mcp
search-mcp has two parts that install differently. The corpus sync CLIs and the ask widget files come from npm. The two Workers deploy from a clone of the repository.
What you need
- Node 20 or later.
- A Cloudflare account with Workers, R2 and AI Search turned on.
- The git repos you want to index, cloned on the machine that runs the sync, or reachable by the sync runner.
From npm: the sync CLIs and the widget
npm install @skyphusion/search-mcp@0.7.0
# or run a CLI without installing it:
npx --package=@skyphusion/search-mcp@0.7.0 search-mcp-sync corpus --dry-run
The package name is scoped, @skyphusion/search-mcp. The unscoped name search-mcp on npm belongs to a different project.
| Command | What it does |
|---|---|
search-mcp-sync | Uploads the git-tracked corpus files for one target to R2. |
search-mcp-sync-run | Clones or fetches the repos, syncs every target, and can start a reindex. |
Put targets.json in your project root, or set SEARCH_MCP_TARGETS to its path. Start from the example in the package:
cp node_modules/@skyphusion/search-mcp/scripts/targets.json.example ./targets.json
The clone root is the current working directory. Set SYNC_REPO_ROOT to change it. The configuration page explains every field.
To use the ask widget, copy its two files into your docs site:
cp node_modules/@skyphusion/search-mcp/public/ask-widget.{js,css} ./docs/
Then follow the ask widget guide.
From source: the Workers
The query Worker and the MCP Worker are not in the npm package. Clone the release tag:
git clone --branch v0.7.0 https://github.com/skyphusion-labs/search-mcp.git && cd search-mcp
npm install
cp wrangler.toml.example wrangler.toml
cp wrangler.mcp.toml.example wrangler.mcp.toml
cp scripts/targets.json.example scripts/targets.json
# edit the three files for your account, AI Search instance, bucket and repos
npm run typecheck
npm test
This is search-mcp v0.7.0, the current release. npm run typecheck checks the Workers code and the sync scripts as two separate TypeScript projects.
Do not commit wrangler.toml, wrangler.mcp.toml or scripts/targets.json. The repository ignores them in git.
Next steps
- Create the R2 bucket and the AI Search instance, then deploy the Workers: Self-host.
- Choose what goes into the corpus: Configuration.
- Connect an agent: MCP tool reference.
The full guide in the repository is docs/DEPLOY.md.