CKB + VS Code: Adding Semantic Intelligence to Your Editor
By CKB Team
VS Code is the world's most popular code editor. With MCP support coming to AI extensions, you can now connect CKB for semantic code intelligence—your AI understands your code structure, not just text.
This guide covers setting up CKB with VS Code and MCP-compatible extensions.
What You'll Get
With CKB connected, your VS Code AI can:
- Navigate code semantically (find callers, not just text matches)
- Analyze impact before you make changes
- Suggest appropriate reviewers based on code ownership
- Understand your codebase architecture
Prerequisites
- VS Code 1.85 or later
- An MCP-compatible AI extension:
- Continue (recommended, free)
- GitHub Copilot Chat (MCP support in preview)
- Other MCP-enabled extensions
- Node.js 18+
Setup with Continue Extension
Continue is a free, open-source AI coding assistant with excellent MCP support.
Step 1: Install Continue
- Open VS Code Extensions (Cmd+Shift+X)
- Search for "Continue"
- Install the Continue extension
- Reload VS Code
Step 2: Install CKB
npm install -g @tastehub/ckb
Step 3: Initialize Your Project
cd /your/project
ckb init
Step 4: Configure Continue
Open Continue's config file:
- Press Cmd+Shift+P (or Ctrl+Shift+P)
- Type "Continue: Open Config"
- Select it to open
config.json
Add CKB to the MCP servers section:
{
"models": [...],
"mcpServers": [
{
"name": "ckb",
"command": "npx",
"args": ["@tastehub/ckb", "mcp"]
}
]
}
Step 5: Reload and Test
Reload VS Code, then in Continue's chat:
You: "What MCP tools are available?"
Continue: "I have access to CKB's code intelligence tools:
- searchSymbols: Find functions, classes, types
- getCallGraph: See callers and callees
- prepareChange: Impact analysis
- explore: Area exploration
..."
Setup with GitHub Copilot
GitHub Copilot Chat is adding MCP support. Configuration varies by version:
Current Preview Method
Add to VS Code settings (settings.json):
{
"github.copilot.chat.experimental.mcp.servers": {
"ckb": {
"command": "npx",
"args": ["@tastehub/ckb", "mcp"]
}
}
}
Note: This setting may change as Copilot's MCP support evolves. Check Copilot documentation for the latest configuration method.
Generic MCP Configuration
For other MCP-compatible extensions, the configuration is similar:
{
"mcpServers": {
"ckb": {
"command": "npx",
"args": ["@tastehub/ckb", "mcp"]
}
}
}
Check your extension's documentation for the exact config location.
Using CKB in VS Code
Chat-Based Queries
Use your AI extension's chat panel:
You: "What calls the handlePayment function?"
AI: [uses CKB's getCallGraph]
"handlePayment in internal/payment/handler.go is called by:
- CheckoutController.Process at controllers/checkout.go:45
- RefundController.Execute at controllers/refund.go:78
- WebhookHandler.Payment at webhooks/stripe.go:123
It calls 3 functions: validateCard, chargeCard, sendReceipt."
Inline Chat (Cmd+I / Ctrl+I)
Select code and ask about it:
You: [select a function, press Cmd+I]
"What's the impact of changing this?"
AI: [uses prepareChange]
"This function has 12 callers across 8 files.
Changing it affects:
- 3 controllers
- 2 services
- 15 tests
Risk score: 45 (Medium)"
Code Navigation
Ask for navigation help:
You: "Show me the authentication flow"
AI: [uses explore and getCallGraph]
"Authentication flows through:
1. AuthMiddleware (middleware/auth.go:23)
2. TokenService.Validate (services/token.go:45)
3. UserRepository.GetByID (repos/user.go:67)
Click to open: middleware/auth.go:23"
Preset Configuration
Optimize for your workflow:
{
"mcpServers": [
{
"name": "ckb",
"command": "npx",
"args": ["@tastehub/ckb", "mcp", "--preset=core"]
}
]
}
Presets available:
| Preset | Tools | Use Case |
|---|---|---|
core |
21 | General development |
review |
27 | PR reviews |
refactor |
33 | Code cleanup |
full |
92 | All capabilities |
Workspace Configuration
For project-specific settings, create .vscode/mcp.json:
{
"servers": {
"ckb": {
"command": "npx",
"args": ["@tastehub/ckb", "mcp", "--preset=review"]
}
}
}
This overrides user settings for this workspace.
Common Workflows
Exploring a New Codebase
You: "I'm new here. Give me an overview of this project."
AI: [uses explore and getArchitecture]
"This is a TypeScript/Node.js API server:
src/
├── controllers/ - HTTP handlers (8 files)
├── services/ - Business logic (12 files)
├── models/ - Data models (6 files)
├── utils/ - Helpers (4 files)
Key entry point: src/index.ts
Main patterns: Express.js, Repository pattern, JWT auth
Hotspots (frequently changed):
- src/controllers/user.ts
- src/services/payment.ts"
Pre-Change Analysis
You: "I need to modify the User model. What should I know?"
AI: [uses prepareChange]
"User model analysis:
Dependents: 23 files
- 8 controllers use User
- 5 services process User data
- 10 tests verify User behavior
Database impact:
- users table (direct mapping)
- Migration may be needed for schema changes
Risk: High (core data model)
Suggested reviewers: @alice, @bob"
Finding Dead Code
You: "Is there any unused code in the utils folder?"
AI: [uses findDeadCode]
"Found 3 unused functions in src/utils/:
- formatDate() at date.ts:45 - no callers
- validateEmail() at validation.ts:12 - replaced by library
- logDebug() at logging.ts:78 - test-only usage
Total: 67 lines of dead code"
Troubleshooting
Extension doesn't see CKB tools
- Verify CKB is installed:
npx @tastehub/ckb --version - Check config file syntax
- Reload VS Code window (Cmd+Shift+P → "Reload Window")
- Check extension's MCP logs
"Index not found" error
Initialize CKB in your project:
cd /your/project
ckb init
Slow or outdated responses
Update the index:
ckb index
Or enable automatic updates:
ckb watch # Run in integrated terminal
Permission errors
Ensure you have read access to the project and node_modules.
Tips for VS Code Users
-
Use Cmd+click navigation alongside CKB - VS Code's built-in navigation complements CKB's semantic analysis
-
Keep the index fresh - Run
ckb watchin VS Code's integrated terminal -
Use workspace settings - Different projects can have different presets
-
Combine with other extensions - CKB works alongside GitLens, Error Lens, etc.
Next Steps
- Prompt Cookbook - Ready-to-use prompts
- What is MCP? - Understanding the protocol
- All Features - Complete feature list
Links: