---
title: Connect an External AI (MCP)
description: "--- ## Introduction The **MCP** (Model Context Protocol) allows you to connect an external AI client (Claude Desktop, Cursor, Windsurf, VS Code, JetBrains…) directly to your Kafinea instance. The external AI can then query your ERP data, view records, and…"
url: "https://www.kafinea.com/en/help/artificial-intelligence/connect-an-external-ai-mcp/"
updated: "2026-04-13"
category: Artificial intelligence
---

# Connect an External AI (MCP)

---

## Introduction

The **MCP** (Model Context Protocol) allows you to connect an external AI client (Claude Desktop, Cursor, Windsurf, VS Code, JetBrains…) directly to your Kafinea instance. The external AI can then query your ERP data, view records, and perform searches without leaving your usual work tool.

---

## 1. What is MCP?

MCP is a standard protocol that allows AI clients to connect to tool servers. Kafinea exposes an MCP server that provides secure access to ERP data, respecting the access rights of the connected user.

---

## 2. Access the Configuration Page

1. Log in to Kafinea
2. Go to **My Preferences** (user menu in the top right)
3. Click the **MCP Configuration (External AI)** button

The page displays your personal credentials and ready-to-copy JSON configurations for each supported AI client.

---

## 3. Your Credentials

The configuration page displays three essential pieces of information:

- **Access Point (URL)**: the address of your Kafinea instance's MCP server
- **Username**: your Kafinea identifier
- **Access Key**: your personal access key

> **Important:** Never share your access key. It provides access to your Kafinea data with your user rights.

---

## 4. Configure Your AI Client

For each AI client, the page provides a ready-to-copy JSON configuration block. Click the **Copy** button next to the desired client.

### Claude Desktop

1. Open Claude Desktop
2. Go to **Settings → Developer → MCP Servers**
3. Paste the copied JSON configuration into the file `claude_desktop_config.json`
4. Restart Claude Desktop

### Cursor

1. Open Cursor
2. Go to **Settings → MCP → Add Server**
3. Choose the **JSON** type
4. Paste the copied configuration

### Windsurf

1. Open the Windsurf `mcp_config.json` file
2. Paste the copied configuration
3. Restart Windsurf

### VS Code / GitHub Copilot

1. Create or open the `.vscode/mcp.json` file in your project
2. Or access VS Code user settings
3. Paste the copied configuration

### JetBrains (IntelliJ, PhpStorm, …)

1. Go to **Settings → Tools → AI Assistant → MCP Servers**
2. Paste the copied configuration

---

## 5. Test the Connection

Once the configuration is in place:

1. Restart your AI client if necessary
2. Ask a question that references Kafinea data (for example: "List my recent invoices")
3. The AI client should be able to query Kafinea and display the results

---

## 6. Security

- Each user has their own access key
- MCP requests respect user access rights
- Never publish the JSON configuration in a public repository
- If your access key is compromised, generate a new one from My Preferences

---

## FAQ

**My access key has changed, what should I do?**
 Return to the MCP Configuration page and copy the configuration again with the new key.

**The AI client cannot connect**
 Verify that the access point URL is correct and accessible from your workstation. Also verify that the MCP server is enabled by your administrator.

**What data can the external AI see?**
 Only the data you have access to in Kafinea, according to your profile and rights.

---

## Related References

- [AI Chat](https://www.kafinea.com/en/documentation/artificial-intelligence/ai-chat/)
- [AI Text Assistant](https://www.kafinea.com/en/documentation/artificial-intelligence/the-ai-text-assistant/)
- [AI Workflows](https://www.kafinea.com/en/documentation/artificial-intelligence/ai-workflows/)
- [AI-Assisted Invoice OCR](https://www.kafinea.com/en/documentation/artificial-intelligence/ai-assisted-invoice-ocr/)
- [MCP Server (admin)](/250_parametrage/130_le-serveur-mcp.md)
