From c8e767d1b866c4d113586b5d1510caa219a10e0f Mon Sep 17 00:00:00 2001 From: Colby McHenry Date: Wed, 3 Jun 2026 20:02:23 -0400 Subject: [PATCH] feat(mcp): surface supported languages in MCP server instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MCP `initialize` instructions — the first thing every agent sees about codegraph — listed no languages, so agents (and users) assumed languages like Rust weren't supported even though they're fully indexed, and skipped the codegraph tools. That was the real gap behind #671, where Rust has in fact worked end-to-end for several releases. Add one concise line to the opening paragraph of server-instructions.ts: "It indexes 20+ languages — TypeScript/JavaScript, Python, Go, Rust, Java, C#, C/C++, PHP, Ruby, Swift, Kotlin, and more." refs #671 Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 1 + src/mcp/server-instructions.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ef5f5a..3cddc8d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### New Features - `codegraph status --json` now also reports the running CLI `version`, the index directory (`indexPath`), and a `lastIndexed` timestamp (ISO-8601, or null when nothing's indexed yet), so CI and scripts can pin the CLI version and check index freshness from a single command. A matching `CodeGraph.getLastIndexedAt()` library method exposes the same freshness check without shelling out. Thanks @12122J and @eddieran. (#329) +- When an agent connects over MCP, CodeGraph now states up front which languages it indexes — 20+, including TypeScript/JavaScript, Python, Go, Rust, Java, C#, C/C++, PHP, Ruby, Swift, and Kotlin — so agents no longer assume a language (such as Rust) isn't supported and skip the tools. (#671) ### Fixes diff --git a/src/mcp/server-instructions.ts b/src/mcp/server-instructions.ts index 43cc227a..88214fa8 100644 --- a/src/mcp/server-instructions.ts +++ b/src/mcp/server-instructions.ts @@ -18,7 +18,9 @@ export const SERVER_INSTRUCTIONS = `# Codegraph — code intelligence over an indexed knowledge graph Codegraph is a SQLite knowledge graph of every symbol, edge, and file -in the workspace. Reads are sub-millisecond; the index lags writes by +in the workspace. It indexes 20+ languages — TypeScript/JavaScript, +Python, Go, Rust, Java, C#, C/C++, PHP, Ruby, Swift, Kotlin, and more. +Reads are sub-millisecond; the index lags writes by about a second through the file watcher. Consult it BEFORE writing or editing code, not during.