Claude Code
Host set up for Claude Code
Claude Code is a developer-focused agentic CLI (command line interface) tool from Anthropic. It integrates Claude's large language models (LLMs) directly into your terminal window. This allows you to explore, refactor, and generate code within your projects.
Getting started
Install Claude Code globally
npm install -g @anthropic-ai/claude-codeConfiguration using the CLI tool
Basic install
claude mcp add umbraco-mcp npx @umbraco-cms/mcp-dev@betaIf you prefer to define configuration values directly, use the following pattern:
# Add with environment variables
claude mcp add umbraco-mcp --env UMBRACO_CLIENT_ID="your-id" --env UMBRACO_CLIENT_SECRET="your-secret" --env UMBRACO_BASE_URL="https://your-domain.com" --env NODE_TLS_REJECT_UNAUTHORIZED="0" --env UMBRACO_INCLUDE_TOOL_COLLECTIONS="document,media,document-type,data-type" -- npx @umbraco-cms/mcp-dev@betaReplace the UMBRACO_CLIENT_ID, UMBRACO_CLIENT_SECRET, UMBRACO_BASE_URL and UMBRACO_INCLUDE_TOOL_COLLECTIONS values with your local connection details.
This will add the MCP server as umbraco-mcp in your project’s claude.json configuration file.
Configuration via .mcp.json (Project-specific)
This is the perferred configuration for Claude Code. As project-level configuration, create a .mcp.json file in your project root.
Using the .mcp.json file allows you to:
Configure MCP servers per project
Share configuration safely with team members
Override global Claude Code MCP settings
Use an .env file to prevent secrets being added to source
Example .env file
UMBRACO_CLIENT_ID=umbraco-back-office-mcp
UMBRACO_CLIENT_SECRET=1234567890
UMBRACO_BASE_URL=http://localhost:123456
UMBRACO_INCLUDE_TOOL_COLLECTIONS=document,media,document-type,data-typeReplace the UMBRACO_CLIENT_ID, UMBRACO_CLIENT_SECRET, UMBRACO_BASE_URL and UMBRACO_INCLUDE_TOOL_COLLECTIONS values with your local connection details.
Example .mcp.json file
{
"mcpServers": {
"umbraco-mcp": {
"command": "npx",
"args": ["@umbraco-cms/mcp-dev@beta"],
}
}
}For details on .env format and supported configuration keys, see the Configuration guide.
Never commit live credentials to source control. Always use environment variables or a .env file.
Easier tool and tool collection management
Another benefit of using a .env file for configuration is that it makes it much easier to adjust tool configurations for different tasks. Claude Code lets you quickly reconnect to an MCP server using its slash commands. This allows you to switch environments or update settings without editing your main configuration files.
Update the .env file with the new tools set
In Claude Code CLI use /mcp reconnect umbraco-mcp to restart the mcp server
Last updated
Was this helpful?