Adding MCP to Claude

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Think of MCP as "USB-C for AI applications" - it provides a universal way to connect AI models to different data sources and tools.

With MCP, you can:

  • Connect Claude to external data sources

  • Integrate third-party APIs and services

  • Extend Claude's capabilities with custom tools

  • Provide real-time context from your applications

Prerequisites

Before setting up MCP with Claude Desktop, ensure you have:

  • Claude Desktop installed

  • Node.js and npm installed on your system

  • Your NLX API key and application URL

  • Basic familiarity with JSON configuration

Setup Instructions

Step 1: Install Claude Desktop

If you haven't already, download and install Claude Desktop from claude.ai/download.

Step 2: Access MCP Configuration

  1. Open Claude Desktop

  2. Navigate to Settings (gear icon in the top-right)

  3. Select the Developer tab

  4. Click Edit Config

This will open your system's file explorer to the claude_desktop_config.json file.

Step 3: Configure NLX MCP Server

Add the NLX MCP server configuration to your claude_desktop_config.json file:

{
  "mcpServers": {
    "nlx-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nlxai/mcp-nodejs-server"
      ],
      "env": {
        "NLX_API_KEY": "your-actual-api-key",
        "NLX_APP_URL": "your-application-url"
      }
    }
  }
}

Step 4: Configure Environment Variables

Replace the placeholder values with your actual credentials:

  • NLX_API_KEY: Your NLX API key from your NLX dashboard

  • NLX_APP_URL: Your NLX application URL

Example configuration:

{
  "mcpServers": {
    "nlx-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nlxai/mcp-nodejs-server"
      ],
      "env": {
        "NLX_API_KEY": "nlx_api_1234567890abcdef",
        "NLX_APP_URL": "https://your-app.nlx.ai"
      }
    }
  }
}

Step 5: Restart Claude Desktop

After saving the configuration:

  1. Close Claude Desktop completely

  2. Restart the application

  3. The MCP server will automatically initialize

Verification

To verify your MCP integration is working:

  1. Start a new conversation in Claude Desktop

  2. Look for MCP-related capabilities in Claude's responses

  3. Check the developer console (if available) for any MCP connection logs

Troubleshooting

Common Issues

MCP server not connecting:

  • Verify your API key and application URL are correct

  • Ensure Node.js and npm are properly installed

  • Check that the claude_desktop_config.json file has valid JSON syntax

Environment variables not loading:

  • Restart Claude Desktop after configuration changes

  • Verify environment variable names match exactly (case-sensitive)

  • Check for trailing spaces or special characters in values

Permission errors:

  • Ensure Claude Desktop has permission to execute npm commands

  • Try running npx @nlxai/mcp-nodejs-server manually to test installation

Debug Mode

To enable debug logging, add the following to your server configuration:

{
  "mcpServers": {
    "nlx-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nlxai/mcp-nodejs-server"
      ],
      "env": {
        "NLX_API_KEY": "your-actual-api-key",
        "NLX_APP_URL": "your-application-url",
        "DEBUG": "true"
      }
    }
  }
}

Advanced Configuration

Multiple MCP Servers

You can configure multiple MCP servers in the same configuration file:

{
  "mcpServers": {
    "nlx-mcp-server": {
      "command": "npx",
      "args": ["-y", "@nlxai/mcp-nodejs-server"],
      "env": {
        "NLX_API_KEY": "your-api-key",
        "NLX_APP_URL": "your-app-url"
      }
    },
    "another-mcp-server": {
      "command": "npx",
      "args": ["-y", "@another/mcp-server"],
      "env": {
        "API_KEY": "another-api-key"
      }
    }
  }
}

Next Steps

Once MCP is configured with Claude Desktop:

  1. Explore available MCP tools and capabilities

  2. Test integration with your NLX applications

  3. Consider building custom MCP servers for specific use cases

  4. Review MCP protocol documentation at modelcontextprotocol.io

Support

For MCP-related issues:

  • Review Claude Desktop's developer documentation

  • Contact NLX support for NLX-specific MCP server issues

Last updated