Configure MCP servers in VS Code to monitor AI assistant interactions. Works with Copilot, Claude, and other AI extensions.
curl -sSL https://get.kilometers.ai/install.sh | shkm initGlobal VS Code settings for all workspaces
~/Library/Application Support/Code/User/settings.jsonProject-specific settings (recommended)
.vscode/settings.jsonAdd these configurations to your VS Code settings.json file. Each template shows the exact settings needed for different MCP servers.
{
"mcp.servers": {
"github": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
}
}
}After saving your settings, restart VS Code and run:
Use your AI assistant in VS Code and check the Kilometers dashboard for events.
{
"mcp.servers": {
"filesystem": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-filesystem",
"${workspaceFolder}"
],
"env": {}
}
}
}After saving your settings, restart VS Code and run:
Use your AI assistant in VS Code and check the Kilometers dashboard for events.
{
"mcp.servers": {
"brave-search": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "your_brave_api_key_here"
}
}
}
}After saving your settings, restart VS Code and run:
Use your AI assistant in VS Code and check the Kilometers dashboard for events.
{
"mcp.servers": {
"sqlite": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-sqlite",
"/path/to/database.db"
],
"env": {}
}
}
}After saving your settings, restart VS Code and run:
Use your AI assistant in VS Code and check the Kilometers dashboard for events.
{
"mcp.servers": {
"github": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
},
"filesystem": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-filesystem",
"${workspaceFolder}"
],
"env": {}
},
"brave-search": {
"command": "km",
"args": [
"npx",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "your_brave_api_key_here"
}
}
}
}After saving your settings, restart VS Code and run:
Use your AI assistant in VS Code and check the Kilometers dashboard for events.
VS Code supports variables in MCP server configurations:
${workspaceFolder} - Current workspace root${workspaceFolderBasename} - Workspace name${file} - Current file path${env:VARIABLE_NAME} - Environment variableCreate a .vscode/settings.json file in your project root for project-specific MCP servers:
{
"mcp.servers": {
"project-db": {
"command": "km",
"args": ["npx", "@modelcontextprotocol/server-sqlite", "./data/project.db"],
"env": {}
}
}
}km validatekm npx @modelcontextprotocol/server-githubOnce configured, all interactions between VS Code AI extensions and MCP servers will be monitored by Kilometers.