ConnectWise Manage API MCP server

Bridges Claude with the ConnectWise Manage API through a SQLite database built from API definitions, enabling natural language search, categorized navigation, and fast memory for efficient IT service ticket management and company information retrieval.
Back to servers
Setup instructions
Provider
Jason Smith
Release date
Mar 19, 2025
Language
Python
Stats
6 stars

The ConnectWise API Gateway MCP server provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants through an intuitive Model Context Protocol (MCP) implementation.

Installation & Setup

Prerequisites

  • Python 3.10 or higher
  • Access to ConnectWise Manage API credentials
  • ConnectWise API definition file (manage.json) - included in the repository

Installation Steps

Option 1: Using GitHub NPM Package (Recommended)

Install the package directly from GitHub:

npm install -g jasondsmith72/CWM-API-Gateway-MCP

This method automatically handles all dependencies and provides a simpler configuration for Claude Desktop.

Option 2: Manual Installation

Windows
git clone https://github.com/jasondsmith72/CWM-API-Gateway-MCP.git
cd CWM-API-Gateway-MCP
pip install -e .
macOS
# Using Homebrew
brew install python@3.10

# Clone the repository
git clone https://github.com/jasondsmith72/CWM-API-Gateway-MCP.git
cd CWM-API-Gateway-MCP

# Set up a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate

# Install the package
pip install -e .
Linux (Ubuntu/Debian)
# Install Python 3.10+
sudo apt update
sudo apt install python3.10 python3.10-venv python3.10-dev python3-pip

# Clone the repository
git clone https://github.com/jasondsmith72/CWM-API-Gateway-MCP.git
cd CWM-API-Gateway-MCP

# Set up a virtual environment
python3.10 -m venv venv
source venv/bin/activate

# Install the package
pip install -e .

Post-Installation Steps

1. (Optional) Build the API Database

This repository already includes a pre-built database, so this step is optional:

# On Windows
python build_database.py path/to/manage.json

# On macOS/Linux
python3 build_database.py path/to/manage.json

2. Configure API Credentials

Set the following environment variables with your ConnectWise credentials:

CONNECTWISE_API_URL=https://na.myconnectwise.net/v4_6_release/apis/3.0
CONNECTWISE_COMPANY_ID=your_company_id
CONNECTWISE_PUBLIC_KEY=your_public_key
CONNECTWISE_PRIVATE_KEY=your_private_key
CONNECTWISE_AUTH_PREFIX=yourprefix+  # Prefix required by ConnectWise for API authentication

Configuration for Claude Desktop

Method 1: Using NPM Package (Recommended)

Install the package using NPM and then configure Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "CWM-API-Gateway-MCP": {
      "command": "npx",
      "args": [
        "-y",
        "@jasondsmith72/CWM-API-Gateway-MCP"
      ],
      "env": {
        "CONNECTWISE_API_URL": "https://na.myconnectwise.net/v4_6_release/apis/3.0",
        "CONNECTWISE_COMPANY_ID": "your_company_id",
        "CONNECTWISE_PUBLIC_KEY": "your_public_key",
        "CONNECTWISE_PRIVATE_KEY": "your_private_key",
        "CONNECTWISE_AUTH_PREFIX": "yourprefix+"
      }
    }
  }
}

Method 2: Using Node.js Script

{
  "mcpServers": {
    "CWM-API-Gateway-MCP": {
      "command": "node",
      "args": ["C:/path/to/CWM-API-Gateway-MCP/bin/server.js"],
      "env": {
        "CONNECTWISE_API_URL": "https://na.myconnectwise.net/v4_6_release/apis/3.0",
        "CONNECTWISE_COMPANY_ID": "your_company_id",
        "CONNECTWISE_PUBLIC_KEY": "your_public_key",
        "CONNECTWISE_PRIVATE_KEY": "your_private_key",
        "CONNECTWISE_AUTH_PREFIX": "yourprefix+"
      }
    }
  }
}

Running the Server Directly

# If installed via NPM
cwm-api-gateway-mcp

# If using the Node.js script
node bin/server.js

# Or using the Python script directly
python api_gateway_server.py  # Windows
python3 api_gateway_server.py  # macOS/Linux

Available Tools

API Discovery Tools

Tool Description
search_api_endpoints Search for API endpoints by query string
natural_language_api_search Find endpoints using natural language descriptions
list_api_categories List all available API categories
get_category_endpoints List all endpoints in a specific category
get_api_endpoint_details Get detailed information about a specific endpoint

API Execution Tools

Tool Description
execute_api_call Execute an API call with path, method, parameters, and data
send_raw_api_request Send a raw API request in the format "METHOD /path [JSON body]"

Fast Memory Tools

Tool Description
save_to_fast_memory Manually save an API query to Fast Memory
list_fast_memory List all queries saved in Fast Memory
delete_from_fast_memory Delete a specific query from Fast Memory
clear_fast_memory Clear all queries from Fast Memory

Usage Examples

Search for Ticket-Related Endpoints

search_api_endpoints("tickets")

Search Using Natural Language

natural_language_api_search("find all open service tickets that are high priority")

Execute a GET Request

execute_api_call(
    "/service/tickets", 
    "GET", 
    {"conditions": "status/name='Open' and priority/name='High'"}
)

Create a New Service Ticket

execute_api_call(
    "/service/tickets", 
    "POST", 
    None,  # No query parameters 
    {
        "summary": "Server is down",
        "board": {"id": 1},
        "company": {"id": 2},
        "status": {"id": 1},
        "priority": {"id": 3}
    }
)

Send a Raw API Request

send_raw_api_request("GET /service/tickets?conditions=status/name='Open'")

View Fast Memory Contents

list_fast_memory()

Save a Useful Query to Fast Memory

save_to_fast_memory(
    "/service/tickets", 
    "GET", 
    "Get all high priority open tickets", 
    {"conditions": "status/name='Open' and priority/name='High'"}
)

Understanding Fast Memory

The Fast Memory feature allows you to save and retrieve frequently used API queries, optimizing your workflow by:

  • Saving time by quickly executing complex API calls without remembering exact endpoints or parameters
  • Reducing errors by reusing successful API calls
  • Adapting to your usage patterns through usage tracking
  • Persisting parameters and request bodies for future use

Managing Your Fast Memory

  • View Saved Queries: list_fast_memory()
  • Search Specific Queries: list_fast_memory("search term")
  • Delete a Query: delete_from_fast_memory(query_id)
  • Clear All Queries: clear_fast_memory()

Troubleshooting

Common Issues

Database Not Found Error

Error: Database file not found at [path]

Solution: Run the build_database.py script with the path to your ConnectWise API definition file.

API Authentication Issues

HTTP error 401: Unauthorized

Solution: Verify your environment variables and ensure all ConnectWise credentials are correct.

Timeouts on API Calls

Request timed out. ConnectWise API may be slow to respond.

Solution: Check your internet connection or consider adding more specific filters to your query.

Advanced Usage

Optimizing API Queries

For better performance with the ConnectWise API:

  1. Use Specific Conditions:

    execute_api_call("/service/tickets", "GET", {
        "conditions": "status/name='Open' AND dateEntered > [2023-01-01T00:00:00Z]"
    })
    
  2. Limit Field Selection:

    execute_api_call("/service/tickets", "GET", {
        "conditions": "status/name='Open'",
        "fields": "id,summary,status,priority"
    })
    
  3. Paginate Large Results:

    execute_api_call("/service/tickets", "GET", {
        "conditions": "status/name='Open'",
        "page": 1,
        "pageSize": 50
    })
    

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "CWM-API-Gateway-MCP" '{"command":"npx","args":["-y","@jasondsmith72/CWM-API-Gateway-MCP"],"env":{"CONNECTWISE_API_URL":"https://na.myconnectwise.net/v4_6_release/apis/3.0","CONNECTWISE_COMPANY_ID":"your_company_id","CONNECTWISE_PUBLIC_KEY":"your_public_key","CONNECTWISE_PRIVATE_KEY":"your_private_key","CONNECTWISE_AUTH_PREFIX":"yourprefix+"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "CWM-API-Gateway-MCP": {
            "command": "npx",
            "args": [
                "-y",
                "@jasondsmith72/CWM-API-Gateway-MCP"
            ],
            "env": {
                "CONNECTWISE_API_URL": "https://na.myconnectwise.net/v4_6_release/apis/3.0",
                "CONNECTWISE_COMPANY_ID": "your_company_id",
                "CONNECTWISE_PUBLIC_KEY": "your_public_key",
                "CONNECTWISE_PRIVATE_KEY": "your_private_key",
                "CONNECTWISE_AUTH_PREFIX": "yourprefix+"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your 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. Add this to your configuration file:

{
    "mcpServers": {
        "CWM-API-Gateway-MCP": {
            "command": "npx",
            "args": [
                "-y",
                "@jasondsmith72/CWM-API-Gateway-MCP"
            ],
            "env": {
                "CONNECTWISE_API_URL": "https://na.myconnectwise.net/v4_6_release/apis/3.0",
                "CONNECTWISE_COMPANY_ID": "your_company_id",
                "CONNECTWISE_PUBLIC_KEY": "your_public_key",
                "CONNECTWISE_PRIVATE_KEY": "your_private_key",
                "CONNECTWISE_AUTH_PREFIX": "yourprefix+"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later