Back to Home

Claude Desktop Integration Guide

This guide will help you set up the Monta Partner API MCP server with Claude Desktop, giving Claude access to control EV charging infrastructure through Monta's API.

Prerequisites

Quick Setup

Time required: 2 minutes

Option A: Use Launcher Script (downloads latest from server)

  1. Download the launcher script
  2. Add to Claude Desktop config with your credentials
  3. Restart Claude Desktop

Option B: Use Local Development Build (for testing unreleased changes)

  1. Clone/have the repository locally
  2. Run npm run build:bundle
  3. Point Claude Desktop directly to the bundle
  4. Restart Claude Desktop

See detailed steps below:

Installation

Option A: Use Launcher Script (Recommended)

This option downloads the latest stable release from the server.

Step 1: Download the Launcher Script

Download the launcher script for your operating system:

Browser Download

Click to download the launcher script for your operating system:

Save to a location of your choice (e.g., ~/Development/monta-mcp.sh on macOS/Linux, or %USERPROFILE%\Documents\monta-mcp.bat on Windows).

macOS/Linux only: Make the script executable:

chmod +x ~/Development/monta-mcp.sh

Command Line Download

macOS/Linux:

curl -o ~/Development/monta-mcp.sh https://partner-api-mcp.monta.app/scripts/monta-mcp.sh
chmod +x ~/Development/monta-mcp.sh

Windows (PowerShell):

Invoke-WebRequest -Uri https://partner-api-mcp.monta.app/scripts/monta-mcp.bat -OutFile "$env:USERPROFILE\Documents\monta-mcp.bat"

The launcher script automatically:

Step 2: Configure Claude Desktop

  1. Find your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Edit the configuration file to add the Monta MCP server:

    macOS/Linux:

    {
      "mcpServers": {
        "monta-partner-api": {
          "command": "/bin/bash",
          "args": ["/Users/YOUR_USERNAME/Development/monta-mcp.sh"],
          "env": {
            "MONTA_CLIENT_ID": "your-client-id-here",
            "MONTA_CLIENT_SECRET": "your-client-secret-here"
          }
        }
      }
    }
    

    Windows:

    {
      "mcpServers": {
        "monta-partner-api": {
          "command": "cmd.exe",
          "args": ["/c", "C:\\Users\\YOUR_USERNAME\\Documents\\monta-mcp.bat"],
          "env": {
            "MONTA_CLIENT_ID": "your-client-id-here",
            "MONTA_CLIENT_SECRET": "your-client-secret-here"
          }
        }
      }
    }
    

    ⚠️ Important replacements:

    • Replace YOUR_USERNAME with your actual username
    • Replace your-client-id-here with your Monta Client ID
    • Replace your-client-secret-here with your Monta Client Secret
    • Use full paths - don't use ~ or %USERPROFILE% as they may not expand correctly

    Alternative: Using Bearer Token

    If you have a bearer token instead, replace the env section:

    "env": {
      "MONTA_BEARER_TOKEN": "your-bearer-token-here"
    }
    

Step 3: Restart Claude Desktop

Quit and restart Claude Desktop to load the new configuration.


Option B: Use Local Development Build

Use this option when you need to test unreleased changes or the production server hasn't been updated yet.

Step 1: Build the Bundle Locally

  1. Clone the repository (if you haven't already):

    git clone https://github.com/your-org/monta-partner-api-mcp.git
    cd monta-partner-api-mcp
    
  2. Install dependencies and build:

    npm install
    npm run build:bundle
    

    This creates the bundle at bundle/monta-mcp-adapter.js.

Step 2: Configure Claude Desktop

  1. Find your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Edit the configuration file to point directly to the local bundle:

    macOS/Linux:

    {
      "mcpServers": {
        "monta-partner-api": {
          "command": "node",
          "args": ["/Users/YOUR_USERNAME/Development/monta-partner-api-mcp/bundle/monta-mcp-adapter.js"],
          "env": {
            "MONTA_CLIENT_ID": "your-client-id-here",
            "MONTA_CLIENT_SECRET": "your-client-secret-here"
          }
        }
      }
    }
    

    Windows:

    {
      "mcpServers": {
        "monta-partner-api": {
          "command": "node",
          "args": ["C:\\Users\\YOUR_USERNAME\\Development\\monta-partner-api-mcp\\bundle\\monta-mcp-adapter.js"],
          "env": {
            "MONTA_CLIENT_ID": "your-client-id-here",
            "MONTA_CLIENT_SECRET": "your-client-secret-here"
          }
        }
      }
    }
    

    ⚠️ Important replacements:

    • Replace YOUR_USERNAME with your actual username
    • Replace the full path to match where you cloned the repository
    • Replace your-client-id-here with your Monta Client ID
    • Replace your-client-secret-here with your Monta Client Secret
    • Use full absolute paths - don't use ~ or %USERPROFILE%

    Alternative: Using Bearer Token

    If you have a bearer token instead, replace the env section:

    "env": {
      "MONTA_BEARER_TOKEN": "your-bearer-token-here"
    }
    

Step 3: Restart Claude Desktop

Quit and restart Claude Desktop to load the new configuration.

Note: With this option, you'll need to manually rebuild the bundle (npm run build:bundle) whenever you make changes to the source code.


Verify Installation

After restarting Claude Desktop, verify the integration is working:

  1. Open Claude Desktop
  2. Look for "monta-partner-api" in the available tools (you might see a 🔌 icon)
  3. Try a simple command: "Can you list my Monta teams?"

Troubleshooting

The server doesn't appear in Claude Desktop

  1. Check the configuration file path - make sure you're editing the right file
  2. Verify JSON syntax - use a JSON validator to check for syntax errors
  3. Check the script path - use the full absolute path (e.g., /Users/username/Development/monta-mcp.sh) instead of ~/monta-mcp.sh
  4. Make script executable - run chmod +x /path/to/monta-mcp.sh (macOS/Linux)
  5. Restart Claude Desktop completely (quit and reopen)

"Disconnected" connector or browser popup

If you see a disconnected connector or Claude opens a browser:

Authentication errors

If you see "No authentication credentials available":

View logs for debugging

Check Claude Desktop logs:

Common error fixes

Error Solution
"Node.js not found" Install Node.js 18+ from https://nodejs.org/
"Permission denied" Run chmod +x /path/to/monta-mcp.sh (macOS/Linux)
"Script not found" or "No such file or directory" Use full absolute path in config (not ~), verify file exists
"401 Unauthorized" Check your Monta API credentials
"Failed to download adapter" Check internet connection and firewall settings
Module not found errors Delete cached bundle and restart (script will re-download)

Getting Help

Security Best Practices

  1. Never share your configuration file - it contains your API credentials
  2. Use environment variables for production deployments
  3. Rotate credentials regularly through Monta's portal
  4. Restrict file permissions on your config: chmod 600 claude_desktop_config.json

How It Works

The MCP server works by:

  1. Script Download: The launcher script downloads the latest MCP adapter bundle from https://partner-api-mcp.monta.app/mcp/bundle.js
  2. Dynamic Tool Generation: The adapter fetches Monta's OpenAPI spec and creates MCP tools for each endpoint
  3. Stdio Communication: Claude Desktop runs the script locally and communicates via standard input/output
  4. Authentication: Your credentials are passed to the Monta API for each request
  5. Auto-Update: The script automatically updates the adapter bundle daily (checks every 24 hours)

Usage Examples

Once installed, you can use natural language with Claude:

Basic Queries

"Show me all charge points"
"What's the status of charge point 123?"
"List teams I have access to"

Charging Operations

"Start charging at charge point 456"
"Stop charging session 789"
"Show me active charging sessions"

Advanced Operations

"Get charging statistics for the last week"
"Update the price for charge point 123"
"Create a webhook for charging events"

Summary

Setup takes just 2 minutes:

  1. Download the launcher script from https://partner-api-mcp.monta.app/scripts/monta-mcp.sh (or .bat for Windows)
  2. Make it executable: chmod +x /path/to/monta-mcp.sh
  3. Add to Claude Desktop config with full absolute path and your Monta credentials
  4. Restart Claude Desktop

Important: Always use full absolute paths in the Claude Desktop config (e.g., /Users/username/Development/monta-mcp.sh), not relative paths like ~/monta-mcp.sh.

The MCP server provides Claude with direct access to all Monta Partner API endpoints as native tools. The launcher script automatically keeps your adapter up to date.