CLAUDE_MCP_LENT_TO

Updated by

CLAUDE_MCP_LENT_TO is a Claude Code environment variable: Claude Code sets this to cloud_session in a local stdio MCP server's environment when the machine's stored login is pinned for remote tools, so a server that reads it can tell it is running for a cloud session rather than a direct local session. Added in v2.1.335. Added in v2.1.335 and still present in v2.1.336. It is not in the official reference.

StatusPresent in v2.1.336
AddedAdded in v2.1.335
CategoryMCP
Official docsNot listed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_MCP_LENT_TO=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_MCP_LENT_TO": "<value>"
  }
}

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_MCP_LENT_TO do?

Claude Code sets this to cloud_session in a local stdio MCP server's environment when the machine's stored login is pinned for remote tools, so a server that reads it can tell it is running for a cloud session rather than a direct local session. Added in v2.1.335.

Which Claude Code version has CLAUDE_MCP_LENT_TO?

Added in v2.1.335 and still present in v2.1.336.

How do I set CLAUDE_MCP_LENT_TO?

Export it before starting Claude Code (export CLAUDE_MCP_LENT_TO=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.

All variables, searchable: Claude Code environment variables.