Local Development Setup
Relevant source files
The following files were used as context for generating this wiki page:
The Claude Context project is a monorepo consisting of multiple packages including a core engine, a VSCode extension, an MCP server, and a Chrome extension. Setting up a local development environment requires configuring the base repository and then proceeding with package-specific configurations. The project relies on Node.js and pnpm for dependency management and orchestration across the workspace.
Sources: CONTRIBUTING.md:16-24, README.md:315-325
Core Prerequisites and Initial Setup
Before developing any component, the system must meet specific version requirements for the runtime and package manager.
System Requirements
| Requirement | Version |
|---|---|
| Node.js | >= 20.0.0 and < 24.0.0 |
| pnpm | >= 10.0.0 |
| OS (Windows) | Git for Windows with core.autocrlf false |
Sources: CONTRIBUTING.md:10-14, README.md:327-338
Bootstrap Process
The initial setup involves cloning the repository, installing dependencies at the workspace root, and performing an initial build of all packages to resolve internal workspace dependencies.
# Clone and enter repository
git clone https://github.com/zilliztech/claude-context.git
cd claude-context
# Install dependencies and build
pnpm install
pnpm build
The following diagram illustrates the initial setup flow for a new contributor:
Sources: CONTRIBUTING.md:16-43, README.md:330-345
Package-Specific Development
The project uses a monorepo structure where each package can be developed independently or in "watch" mode simultaneously.
Workspace Structure
- Core Engine (
packages/core): The central indexing and search logic. - VSCode Extension (
packages/vscode-extension): IDE integration for semantic search. - MCP Server (
packages/mcp): Implementation of the Model Context Protocol. - Chrome Extension (
packages/chrome-extension): GitHub integration for browser-based search.
Sources: CONTRIBUTING.md:46-52, README.md:295-300
Development Workflow Commands
| Action | Root Command | Package-Specific Target |
|---|---|---|
| Build All | pnpm build | N/A |
| Dev Mode | pnpm dev | N/A |
| Build Core | pnpm build:core | @zilliz/claude-context-core |
| Build VSCode | pnpm build:vscode | semanticcodesearch |
| Build MCP | pnpm build:mcp | @zilliz/claude-context-mcp |
Sources: package.json:8-15, CONTRIBUTING.md:55-66
Environment Configuration
Developing the core and MCP components requires valid API keys and access to a vector database.
Required Environment Variables
Contributors must set up an .env file or export the following variables:
OPENAI_API_KEY: Required for embedding models (unless using VoyageAI/Gemini/Ollama).MILVUS_ADDRESS: The endpoint for the Milvus/Zilliz database.MILVUS_TOKEN: Authentication token for the vector database.
Sources: packages/mcp/CONTRIBUTING.md:23-24, packages/core/README.md:32-60
Component Development Guides
VSCode Extension
Development is performed using the "Extension Development Host."
- Open the project in VSCode.
- Navigate to
packages/vscode-extension. - Press
F5to launch a new VSCode window with the extension active. - Use
pnpm packageto create a.vsixfor local installation testing.
Sources: packages/vscode-extension/CONTRIBUTING.md:24-30, packages/vscode-extension/CONTRIBUTING.md:65-75
MCP Server
The MCP server can be debugged by running it with node and pointing to the built distribution file.
# Run with environment variables
pnpm start:with-env
For testing with clients like Claude Desktop or Cursor, the configuration must point to the absolute path of packages/mcp/dist/index.js.
Sources: packages/mcp/CONTRIBUTING.md:14-21, packages/mcp/CONTRIBUTING.md:80-92
Chrome Extension
The extension requires a build process to handle Node.js polyfills for the browser environment via Webpack.
- Run
pnpm build:chromeorpnpm dev:chrome. - Open Chrome at
chrome://extensions/. - Enable "Developer mode" and use "Load unpacked" on the
distfolder.
Sources: packages/chrome-extension/CONTRIBUTING.md:14-35, packages/chrome-extension/CONTRIBUTING.md:66-72
Summary
Local development for Claude Context is managed through pnpm workspaces. The primary workflow involves a global build followed by package-specific development modes. Successful setup depends on a compatible Node.js environment and the configuration of external AI and database services.
Sources: CONTRIBUTING.md:1-66, README.md:315-365