소스 검색

feat(mcp): surface supported languages in MCP server instructions

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) <noreply@anthropic.com>
Colby McHenry 2 주 전
부모
커밋
c8e767d1b8
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      CHANGELOG.md
  2. 3 1
      src/mcp/server-instructions.ts

+ 1 - 0
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
 

+ 3 - 1
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.