Skip to main content

Connecting ComplyFlow to Claude Code or GitHub Copilot

Written by Support

Introduction

This guide explains how to connect the ComplyFlow MCP Server to Claude Code and to GitHub Copilot in Visual Studio Code, so your AI assistant can answer questions using your ComplyFlow data.

Before you start

  • Create a ComplyFlow API Token with the scopes you need. Refer to Creating an API Token and Managing Scopes

  • Install Node.js (version 20 or later) on your computer

  • Have your ComplyFlow API Token ready — it begins with cf_pat_

Treat your API Token like a password. Do not commit it to a shared repository or paste it into chat messages. Store it in a password manager and reference it from configuration as shown below.

Connecting to Claude Code

You can add the ComplyFlow MCP Server to Claude Code with a single command. Open a terminal and run:

claude mcp add complyflow \
--env COMPLYFLOW_API_URL="https://app.complyflow.com.au/app/public/index.php/api/v2" \
--env COMPLYFLOW_API_TOKEN="cf_pat_your_token_here" \
-- npx -y @complyflow/mcp-server

Alternatively, to share the configuration with your team via a project, create a .mcp.json file in your project folder:

{
"mcpServers": {
"complyflow": {
"command": "npx",
"args": ["-y", "@complyflow/mcp-server"],
"env": {
"COMPLYFLOW_API_URL": "https://app.complyflow.com.au/app/public/index.php/api/v2",
"COMPLYFLOW_API_TOKEN": "${COMPLYFLOW_API_TOKEN}"
}
}
}
}

The ${COMPLYFLOW_API_TOKEN} syntax reads the token from an environment variable on your computer, so the token itself is never saved in the file. Set it in your shell profile, e.g. export COMPLYFLOW_API_TOKEN="cf_pat_..."

To check the connection, start Claude Code and run /mcp. The complyflow server should be listed as connected. Then try asking: "Using ComplyFlow, what sites am I assigned to?"

Connecting to GitHub Copilot (Visual Studio Code)

1. In your project, create a file named .vscode/mcp.json

2. Add the following configuration:

{
"inputs": [
{
"type": "promptString",
"id": "complyflow-token",
"description": "ComplyFlow API Token",
"password": true
}
],
"servers": {
"complyflow": {
"command": "npx",
"args": ["-y", "@complyflow/mcp-server"],
"env": {
"COMPLYFLOW_API_URL": "https://app.complyflow.com.au/app/public/index.php/api/v2",
"COMPLYFLOW_API_TOKEN": "${input:complyflow-token}"
}
}
}
}

3. Open Copilot Chat and switch to Agent mode

4. Select Tools and confirm the Complyflow tools are enabled

5. When prompted, paste your API Token — VS Code stores it securely and does not write it to the file

Then try asking: "Using the ComplyFlow tools, list incidents reported this month"

Troubleshooting

Problem

Likely cause and fix

Authorisation error (401)

The token is missing, mistyped, expired or revoked. Check the token value, or create a new token and update your configuration

Permission error (403)

The token does not have the scope required for that question. Create a token that includes the relevant scope, e.g. incidents:read

Connected but no data returned

Your Staff User permissions or Site assignments may not include that data — a token can never see more than you can. Check your access in ComplyFlow

Server does not start

Check Node.js is installed (node --version) and that the command and base URL in your configuration match this guide

The MCP Server is read only — connecting an AI assistant cannot change any data in ComplyFlow. If you no longer want a tool to have access, revoke its API Token. Refer to Creating an API Token and Managing Scopes

Did this answer your question?