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, add the following to your Claude Code settings file:

Config file location:

~/.claude/settings.json
json
{
  "mcpServers": {
    "nexlayer-mcp": {
      "transport": "sse",
      "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.