MCP server instructions cut off in the Claude desktop app: 2,048 characters, not 4,096
An MCP server can send instructions when Claude Code connects. Claude Code puts them in the model's system prompt, and cuts them off past a limit. The docs say that limit is 4,096 characters from Claude Code 2.1.296, and 2,048 before. In the Claude desktop app, AO found the old 2,048 still in force on 2.1.299, for a connector the app passes in. The cut falls mid-word and adds no marker, so neither you nor the model can tell anything is missing.
How AO hit it. AO's AIsle server ends its instructions with its newest rule. The text grew to 2,208 characters. In the desktop app, the text the model got ended "On a yes, add it t": character 2,048, exactly. The last 160 characters of that rule never arrived. The CLI, on the same version and the same day, passed the same connector's text whole.
Check what the model actually got. Claude Code writes each session's transcript to ~/.claude/projects/<folder>/<session id>.jsonl. The instructions it gives the model are there, as mcp_instructions_delta attachments, one block per server. This Node.js script prints each block's version, server, length in characters and last 20 characters:
// node instructions-cut.mjs <session>.jsonl
import { readFileSync } from 'node:fs';
for (const line of readFileSync(process.argv[2], 'utf8').split('\n')) {
if (!line.includes('"mcp_instructions_delta"')) continue;
const { attachment, version } = JSON.parse(line);
if (attachment?.type !== 'mcp_instructions_delta') continue; // a line that only mentions the name
for (const block of attachment.addedBlocks ?? []) {
const nl = block.indexOf('\n');
console.log(version, block.slice(3, nl), block.length - nl - 1, JSON.stringify(block.slice(-20)));
}
}
A length of exactly 2,048, or 4,096 followed by "… [truncated]", means your text was cut. In the desktop app the connectors appear under an id, not their name; the CLI names them "claude.ai <name>".
The fix: stay under 2,048 characters. That is the limit that holds on every surface AO measured. Put the rule that matters most first, not last, and keep the length in a test so it cannot creep back:
import test from 'node:test';
import assert from 'node:assert/strict';
import { INSTRUCTIONS } from '../server/mcp.mjs';
test('instructions fit the shortest limit Claude Code applies', () => {
assert.ok(INSTRUCTIONS.length <= 2000, `${INSTRUCTIONS.length} characters`);
});
AO shortened its opening sentences, kept the rules word for word, and holds the whole text to 2,000 characters.
Not tested. Whether a local server added inside the desktop app is cut at 2,048 too, or only connectors the app passes in. Whether CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH, which the docs say changes the limit, works in the desktop app. Tool descriptions, which have their own limits. Mac and Linux: every desktop session here ran on Windows 11.
The numbers
- Claude Code's MCP docs: server instructions are cut at 4,096 characters; "Before v2.1.296, the shorter limit was 2,048 characters" (MCP docs, read 2026-10-17)
- AO's AIsle server sent instructions of 2,208 characters (2,210 bytes). In the desktop app on Claude Code 2.1.299, the model got exactly the first 2,048 characters, ending mid-word, in 3 of 3 sessions in 2 project folders and in 2 subagents (session transcripts, 2026-10-16)
- The same connector, loaded by Claude Code itself on the same version one minute later, reached the model whole: 2,208 of 2,208 characters (session transcript, 2026-10-16)
- In one desktop session on 2.1.299, the app's own computer-use server's instructions arrived whole at 5,084 characters, while the AIsle connector's in the same session stopped at exactly 2,048 (session transcript, 2026-10-16)
- The headless CLI, 2.1.299, with a local stdio server sending 6,000 characters: the model got the first 4,096 plus "… [truncated]", as the docs say (tested by AO, 2026-10-17)
- The cut counts characters, not bytes: the 2,048-character cut fell at byte 2,050, because the text holds one em dash (measured by AO, 2026-10-17)
- On 2.1.295, before the docs' change, the desktop app cut the same text at 2,048 in 5 sessions (session transcripts, 2026-10-12 to 2026-10-15)