Docs/MCP Integration/Claude Code

Claude Code Setup

Connect Nexlayer to Claude Code, Anthropic's official CLI for Claude.

Recommended: npx Install

The fastest way to get started. Run this command in your terminal:

bash
npx @nexlayer/mcp-install

This will automatically detect Claude Code and configure the Nexlayer MCP server.

Manual Installation

If you prefer to configure manually, run this one command. It is what the installer runs for you:

bash
claude mcp add --transport http -s user nexlayer-mcp https://mcp.nexlayer.ai/api/mcp

Or add the entry to your Claude Code config file yourself:

Config file location:

~/.claude.json(or .mcp.json in your project for a project-only install)
json
{
  "mcpServers": {
    "nexlayer-mcp": {
      "type": "http",
      "url": "https://mcp.nexlayer.ai/api/mcp"
    }
  }
}

After manual installation:

  • • Restart Claude Code to load the new MCP server
  • • Run /mcp to authenticate with Nexlayer
  • • You'll be prompted to sign in on first use

Verify Installation

After installation, verify that Nexlayer is connected:

  1. 1

    Open Claude Code in your terminal

    Run claude to start a session

  2. 2

    Check MCP status

    Run /mcp to see connected servers

  3. 3

    Test a deployment

    Ask Claude to “deploy this project to Nexlayer”

Usage Example

Once connected, you can ask Claude Code to deploy your applications naturally:

You:

“Deploy this Next.js app to Nexlayer”

Claude will:

  • • Analyze your project structure
  • • Generate a Dockerfile if needed
  • • Create the nexlayer.yaml configuration
  • • Build and push your container image
  • • Deploy to Nexlayer and return the live URL

Troubleshooting

MCP server not showing?

Make sure you've restarted Claude Code after installation. Run /mcp to check the status.

Authentication issues?

Run /mcp and select the Nexlayer server to re-authenticate.

Need to update?

Run npx @nexlayer/mcp-install again to update to the latest configuration.