---
title: Administer the MCP server
description: "--- ## Introduction Kafinea’s **MCP server** (Model Context Protocol) allows AI assistants (ChatGPT, Claude, Gemini, Copilot, Cursor, etc.) to connect to the ERP to query data via a standardized protocol. This page describes the technical architecture, security, activation, and troubleshooting…"
url: "https://www.kafinea.com/en/help/settings/administer-the-mcp-server/"
updated: "2026-11-22"
category: Settings
---

# Administer the MCP server

---

## Introduction

Kafinea’s **MCP server** (Model Context Protocol) allows AI assistants (ChatGPT, Claude, Gemini, Copilot, Cursor, etc.) to connect to the ERP to query data via a standardized protocol.

This page describes the technical architecture, security, activation, and troubleshooting of the MCP server for administrators. To connect your own assistant, see [Connect ChatGPT, Claude or Gemini to Kafinea](https://www.kafinea.com/en/help/artificial-intelligence/connect-chatgpt-claude-or-gemini-to-kafinea-mcp/).

---

## 1. Architecture

The Kafinea MCP server is composed of several components:

| Component | Role |
| --- | --- |
| HTTP Entry Point | Reception of MCP requests (Streamable HTTP protocol) |
| Tools | Functions exposed to AI clients (search, read, navigation) |
| Resources | Context data accessible by the AI client |
| Authentication | Validation of user credentials for each request |
| Security | Application of access rights and security controls |
| Configuration | Enable connection with the Kafinea account for the installation |

---

## 2. Authentication

The MCP server supports two connection modes, on the same address: the installation address followed by `/mcp/index.php`, for example `https://apps.kafinea.com/<installation>/mcp/index.php`. In both cases, the user must have an active account on the installation.

### Connection with the Kafinea account (recommended)

The user adds the connection address in their AI assistant, signs in with their usual Kafinea account, then authorizes the requested access. No key is stored in the assistant.

Two addresses are available:

- **The single address `https://mcp.kafinea.com/mcp`** (recommended): a single connection provides access to all installations to which the user has been invited. The list follows their invitations: an installation opened later is accessible without any new configuration, and a removed access is revoked within a few minutes. Each operation explicitly specifies its installation and runs with the user’s account and permissions in that installation. This is the preferred address for an integrator who supports multiple clients, or for an organization that shares the same connector among its members.
- **The installation address**: the connection is limited to that installation.

The permissions granted to the assistant (read, write, configuration) are displayed during authorization. The user can find their authorized assistants in the user menu, **Connect my AI assistant**, section **Your connected assistants**, where they can revoke them at any time. After a revocation, already-issued accesses expire within a few minutes.

This mode is enabled on installations hosted by Kafinea (see [Activation](#7-activation)).

### Connection with an access key

This mode is intended for assistants configured with fixed credentials. Each request sends the username and personal access key, in one of the following formats:

```
X-Kafinea-Credentials: username:accesskey
Authorization: Basic base64(username:accesskey)
Authorization: Bearer username:accesskey
X-Kafinea-Username: username
X-Kafinea-AccessKey: accesskey
```

- The **username** is the Kafinea username
- The **accesskey** is the user’s access key, specific to each installation (visible in the user menu, **Connect my AI assistant**, section **Technical integration (access key)**, after **Show key**)

The server validates the credentials and establishes the user context for the request.

A user regenerates their key from **My preferences**, menu **More**, **Change access key**. The new key replaces the old one immediately for all tools that use it: update each assistant configured with this key.

---

## 3. Security

### Access rights

Each MCP request is executed in the context of the authenticated user. Access rights to modules, records, and fields are enforced.

### Additional security checks

In addition to user access rights, the MCP server applies additional checks:

- Input parameter validation
- Filtering of sensitive modules and fields: users’ access keys are never transmitted by the MCP server, including to an administrator
- Injection protection

### Recommendations

- Deploy the MCP server only over HTTPS connections
- Prefer connection with the Kafinea account: no key is stored in the assistant, and each authorized application can be revoked individually
- Never publish credentials in a public repository
- Monitor access logs to detect abnormal usage

---

## 4. Exposed tools (Tools)

The tools exposed by the MCP server allow AI clients to:

- **Search** records in Kafinea modules
- **Read** the details of a specific record
- **Browse** relationships between records
- **List** available modules and fields
- **Browse and complete** related lists declared on a record
- **Handle** qualified links with the generic create, read, update, and delete tools
- **Manage** generic and specific products with the generic tools on Products and their related list
- **Read and edit** kit composition with the dedicated tools `product_kit_get_components`, `product_kit_set_components`, `product_kit_add_component` and `product_kit_remove_component`

Each tool enforces the connected user’s access rights.

The resource `kafinea://relationship-concepts` explains to AI clients how to choose between a related list, a qualified link, a generic/specific attachment, and a kit composition. It also specifies that required fields must be visible in the layout and that prices are recalculated automatically.

It also describes detailed reading of discount vouchers distributed across the lines of a quote, a purchase order, or an invoice imported directly from a store. The tool `get_record` can return an optional read-only property: each voucher share is matched to its line via `lineItemId`. Amounts describe the import, and `isCurrent` indicates whether the current discount still matches the recorded components. This property does not appear in lists and cannot be modified with write tools.

---

## 5. Exposed resources (Resources)

Resources expose context data that the AI client can consult:

- Information about the Kafinea instance
- Structure of available modules
- Field metadata
- Guide to choosing between related lists, qualified links, and product kits

---

## 6. Configuration

- **Accessible data**: the assistant accesses exactly what the user sees in Kafinea. To restrict what a user can view or modify via MCP, adjust their permissions (profile, role, sharing rules): the same rules apply on screen, in the API, and on the MCP server.
- **Connection with the Kafinea account**: enabled on installations hosted by Kafinea; on another installation, it is enabled in the server configuration by the team that hosts it.
- **Connection with an access key**: no setup is required.

---

## 7. Activation

### Connection with an access key

This mode is available on any installation, with no activation. Each active user can find a ready-to-copy configuration, with the endpoint address, their username, and their key, in the user menu, **Connect my AI assistant**, section **Technical integration (access key)**.

### Connection with the Kafinea account

This mode is enabled on installations hosted by Kafinea, as well as the single address: the **Connect my AI assistant** page then displays the steps per assistant and the connection address; the installation-specific address is under **Limit the assistant to this space**.

On an installation hosted elsewhere, it is enabled once, in the server configuration and not in Kafinea settings. If you do not have access to the server, submit the request to your integrator or hosting provider. The steps are reminded to administrators on the **Connect my AI assistant** page:

1. Have the AI assistant authentication service deployed and configured for the installation
2. Have the installation’s secure address entered and enable connection with Kafinea accounts
3. Reload the **Connect my AI assistant** page: the connection steps and address appear. Then run a test from an assistant

As long as this mode is not enabled, the page indicates it and offers the **Copy activation request** button, which the user sends to the team that manages the installation.

To connect with this mode, the user must have been invited to the installation and have an active account.

In both modes, the endpoint `mcp/index.php` must be reachable from the user’s workstation, or from the Internet when the AI assistant runs online.

---

## 8. Troubleshooting

If you have connection issues:

1. Check that the endpoint is reachable from the user’s workstation, or from the Internet for an online assistant
2. **Access key**: compare the tool configuration with the **Technical integration (access key)** section of the **Connect my AI assistant** page. After regenerating the key, update the tool
3. **Kafinea account**: the **Connect my AI assistant** page displays the connection address when the service is configured. Also check that the user has been invited to the installation
4. Check that the user’s account is active: a deactivated account can no longer connect, regardless of the mode

---

## FAQ

**Is the MCP server compatible with all AI clients?**
 The server implements the standard MCP protocol (Streamable HTTP). Any MCP-compatible client can connect to it.

**Can I restrict the modules accessible via MCP?**
 Yes, via access rights in Kafinea user profiles: the assistant can access only the modules, records, and fields that the user can see.

---

## Related References

- [Connect ChatGPT, Claude or Gemini to Kafinea (MCP)](https://www.kafinea.com/en/help/artificial-intelligence/connect-chatgpt-claude-or-gemini-to-kafinea-mcp/)
- [AI agents](https://www.kafinea.com/en/help/settings/ai-agents/)
- [REST API - Relationships between entities](https://www.kafinea.com/en/help/api/rest-api-entity-relationships/)
- [REST API - Product kits](https://www.kafinea.com/en/help/api/rest-api-product-kits/)
