Summary
The MCP tools return result text using ATX Markdown headings (##, ###).
In MCP clients that render tool output as rich Markdown (e.g. the Claude Code
VSCode extension), every heading is shown at H1/H2/H3 font size. Because some
tools emit one heading per result, a normal query fills the transcript with
large-font lines and is persistently distracting.
This is purely about the MCP output rendering — the CLI/TTY output is fine.
Where it comes from
dist/mcp/tools.js formats results with ##/###. Examples as seen by the client:
codegraph_status:
## CodeGraph Status
**Files indexed:** 1953
...
### Nodes by Kind:
...
codegraph_search — one ### heading per hit, so 10 results = 10 oversized headings:
## Search Results (10 found)
### WidgetSeeder (method)
src/.../WidgetSeeder.cs:31
### WidgetSeeder (class)
src/.../WidgetSeeder.cs:18
...
The per-result ### headings are the worst offender, since the noise scales
with result count.
Why the client can't fix it
There's no client-side control for this in at least the Claude Code VSCode
extension — tool-result text is rendered as Markdown uniformly, with no
plain-text or heading-size option. So the only effective lever is the server's
output format.
Concrete ask (cheapest first)
-
Drop ATX headings in favor of bold labels — **Search Results (10 found)**
and **WidgetSeeder** (method) instead of ##/###. Bold renders
at normal size, so structure is preserved without font-scaling, and it needs
no flag or config. This alone would resolve it for everyone.
-
Or, if the heading style is wanted by default, an opt-in plain/compact mode
via an env knob — e.g. CODEGRAPH_PLAIN=1, consistent with the existing
CODEGRAPH_* knobs (CODEGRAPH_ASCII, CODEGRAPH_UNICODE, …) — that emits
the same content without ATX headings.
Either is fine; (1) is the lowest-risk and benefits all Markdown-rendering
clients without configuration.
Environment
- codegraph
0.9.9 (npm, linux-x64 engine bundle)
- Transport: MCP stdio (
codegraph serve --mcp)
- Client: Claude Code VSCode extension
Summary
The MCP tools return result text using ATX Markdown headings (
##,###).In MCP clients that render tool output as rich Markdown (e.g. the Claude Code
VSCode extension), every heading is shown at H1/H2/H3 font size. Because some
tools emit one heading per result, a normal query fills the transcript with
large-font lines and is persistently distracting.
This is purely about the MCP output rendering — the CLI/TTY output is fine.
Where it comes from
dist/mcp/tools.jsformats results with##/###. Examples as seen by the client:codegraph_status:codegraph_search— one###heading per hit, so 10 results = 10 oversized headings:The per-result
###headings are the worst offender, since the noise scaleswith result count.
Why the client can't fix it
There's no client-side control for this in at least the Claude Code VSCode
extension — tool-result text is rendered as Markdown uniformly, with no
plain-text or heading-size option. So the only effective lever is the server's
output format.
Concrete ask (cheapest first)
Drop ATX headings in favor of bold labels —
**Search Results (10 found)**and
**WidgetSeeder** (method)instead of##/###. Bold rendersat normal size, so structure is preserved without font-scaling, and it needs
no flag or config. This alone would resolve it for everyone.
Or, if the heading style is wanted by default, an opt-in plain/compact mode
via an env knob — e.g.
CODEGRAPH_PLAIN=1, consistent with the existingCODEGRAPH_*knobs (CODEGRAPH_ASCII,CODEGRAPH_UNICODE, …) — that emitsthe same content without ATX headings.
Either is fine; (1) is the lowest-risk and benefits all Markdown-rendering
clients without configuration.
Environment
0.9.9(npm, linux-x64 engine bundle)codegraph serve --mcp)