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
Installing Claude Code depends on your environment. For installation details, see the Claude Code Quickstart Guide.
Configuration using the CLI tool
Add the Umbraco MCP server using the Claude CLI:
claude mcp add umbraco-mcp npx @umbraco-cms/mcp-dev@16Define configuration values directly using this 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@16Replace the following values with your local connection details:
UMBRACO_CLIENT_IDUMBRACO_CLIENT_SECRETUMBRACO_BASE_URLUMBRACO_INCLUDE_TOOL_COLLECTIONS
This command registers the MCP server as umbraco-mcp in your project’s claude.json configuration file.
Check which MCP servers are currently active in your Claude Code environment:
claude mcp listProject-specific configuration via .mcp.json
.mcp.jsonThis is the referred project-level configuration for Claude Code. Creating a .mcp.json file in your project root allows you to:
Configure MCP servers per project.
Share configuration safely with team members.
Override global Claude Code MCP settings.
Use an
.envfile to prevent secrets being added to source.
Example .env file
.env fileUMBRACO_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
.mcp.json file{
"mcpServers": {
"umbraco-mcp": {
"command": "npx",
"args": ["@umbraco-cms/mcp-dev@16"],
}
}
}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.
Managing tools and tool collections
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.
Steps to reconnect an MCP server:
Update the
.envfile with the new tool set.In the Claude Code CLI, run
/mcp reconnect umbraco-mcpto restart the mcp server.
Last updated
Was this helpful?