MCP & Copilot Integration¶
Klondike integrates with GitHub Copilot CLI and provides an MCP (Model Context Protocol) server for AI agent tools.
GitHub Copilot Integration¶
Launch Copilot with Klondike Context¶
Start a Copilot session with full project context:
This launches Copilot CLI with:
- Project status
- Feature registry
- Recent session history
- Klondike instructions
Copilot Options¶
| Option | Description | Example |
|---|---|---|
--model |
AI model to use | claude-sonnet, gpt-4 |
--resume |
Resume previous session | Flag |
--feature |
Focus on specific feature | F001 |
--instructions |
Additional instructions | "Focus on tests" |
--allow-tools |
Limit available tools | "read,write" |
--dry-run |
Show command without executing | Flag |
Examples¶
# Start with specific model
klondike copilot start --model claude-sonnet
# Focus on a specific feature
klondike copilot start --feature F001
# Resume previous session
klondike copilot start --resume
# Preview command without running
klondike copilot start --dry-run
MCP Server¶
Klondike provides an MCP server that exposes project tools to AI agents.
Start the MCP Server¶
# Default: stdio transport
klondike mcp serve
# HTTP transport
klondike mcp serve --transport streamable-http
Install for VS Code¶
Configure VS Code to use the Klondike MCP server:
This updates your VS Code settings with the MCP server configuration.
Generate Config¶
Generate a configuration file for manual setup:
Transport Options¶
| Transport | Use Case | Command |
|---|---|---|
stdio |
Local development, CLI | klondike mcp serve |
streamable-http |
Remote access, web-based tools | klondike mcp serve --transport streamable-http |
MCP Tools¶
The Klondike MCP server exposes these tools to AI agents:
Project Tools¶
| Tool | Description |
|---|---|
klondike_status |
Get project status and feature summary |
klondike_validate |
Validate artifact integrity |
Feature Tools¶
| Tool | Description |
|---|---|
klondike_feature_list |
List all features |
klondike_feature_add |
Add a new feature |
klondike_feature_start |
Start working on a feature |
klondike_feature_verify |
Verify a completed feature |
klondike_feature_block |
Block a feature |
klondike_feature_show |
Show feature details |
Session Tools¶
| Tool | Description |
|---|---|
klondike_session_start |
Start a new session |
klondike_session_end |
End the current session |
Progress Tools¶
| Tool | Description |
|---|---|
klondike_progress |
Regenerate progress file |
klondike_report |
Generate stakeholder report |
Integration Patterns¶
VS Code + Copilot¶
-
Install Klondike MCP server:
-
Copilot Chat will have access to Klondike tools
-
Use natural language:
- "What features are in progress?"
- "Start working on F001"
- "End my session with a summary"
Custom AI Agent¶
# Example: Using Klondike MCP with a custom agent
import subprocess
import json
def get_status():
result = subprocess.run(
["klondike", "status", "--json"],
capture_output=True,
text=True
)
return json.loads(result.stdout)
def start_feature(feature_id):
subprocess.run(["klondike", "feature", "start", feature_id])
# In your agent loop
status = get_status()
print(f"Project: {status['project_name']}")
print(f"Completion: {status['completion']}%")
CI/CD Integration¶
# GitHub Actions example
- name: Check Klondike Status
run: |
klondike validate
klondike status
- name: Verify Features
run: |
# Verify all in-progress features have evidence
klondike feature list --status verified --json > verified.json
Configuration¶
MCP Config File¶
The MCP config file (mcp-config.json) structure:
{
"servers": {
"klondike": {
"command": "klondike",
"args": ["mcp", "serve"],
"transport": "stdio"
}
}
}
VS Code Settings¶
The MCP server is configured in VS Code settings:
Troubleshooting¶
MCP Server Not Starting¶
-
Verify Klondike is installed:
-
Check if you're in a Klondike project:
-
Test the server manually:
Copilot Not Finding Tools¶
- Restart VS Code after
klondike mcp install - Check MCP extension is enabled
- Verify config in settings: