{"version":"2.1.326","anchor":"mcp-children-get-claude-code-launched-by-session-ids","canonical_anchor":"mcp-children-get-claude-code-launched-by-session-ids","heading":"MCP servers are told which session started them","tier":"use","area":"MCP","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/mcp-children-get-claude-code-launched-by-session-ids","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### MCP servers are told which session started them\n\nLocal MCP servers now start with CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS set to the current session's id\n\n**What**\n\nAn MCP server is an outside program that gives Claude Code extra tools. When Claude Code starts one as a local process, it now sets the environment variable `CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS` to the id of the current session, alongside `CLAUDE_CODE_SESSION_ID`. A session is one run of Claude Code with its conversation.\n\n**Why**\n\nAn MCP server can now tell which session launched it, which helps when you need to trace its activity back to a particular session.\n\n- Area: MCP\n- Names: `CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS`, `CLAUDE_CODE_SESSION_ID`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}