Page:
INSTALLATION
Clone
Wiki
/
guides
/
INSTALLATION
Contents
Table of Contents
← Home
Installation
Prerequisites
- Node.js 20.0.0 or later
- npm (included with Node.js)
- A Dolibarr ERP/CRM instance (v14+) with the REST API module enabled
- A Dolibarr API key (generated per-user or via Setup > Security)
Install
git clone https://git.mokoconsulting.tech/MokoConsulting/mcp-mokocrm-api.git
cd mcp-mokocrm-api
npm install
npm run build
npm run setup
The setup wizard will prompt for:
- Connection name -- a label for this instance (e.g.
production,staging) - Dolibarr URL -- the base URL of the instance (e.g.
https://erp.example.com) - API key -- the Dolibarr API key for authentication
- TLS verification -- whether to skip certificate verification (for self-signed certs)
Run npm run setup again to add more connections.
Enabling the Dolibarr REST API
- Log in to Dolibarr as an admin
- Go to Home > Setup > Modules/Applications
- Find API/Web services (REST server) in the list
- Click the toggle to enable it
- The API will be available at
https://your-dolibarr.com/api/index.php
Generating an API Key
Per-User API Key (Recommended)
- Go to Home > Users & Groups > Users
- Select the user that will be used for API access
- On the user card, look for the API key field
- Click Generate to create a key, or set one manually
- Click Save
The user's permissions determine what the API key can access. Use a dedicated API user with appropriate permissions for production.
System-Level API Key
- Go to Home > Setup > Security > Tokens & API
- Generate or configure the system API key
- This key has broader access -- use with caution
Register with Claude Code
Add to your global Claude Code config (~/.claude.json):
{
"mcpServers": {
"mokocrm-api": {
"type": "stdio",
"command": "node",
"args": ["/path/to/mcp-mokocrm-api/dist/index.js"]
}
}
}
Or add to a project-level .mcp.json:
{
"mcpServers": {
"mokocrm-api": {
"command": "node",
"args": ["/path/to/mcp-mokocrm-api/dist/index.js"]
}
}
}
Restart Claude Code after adding the server.
Configuration File
The config is stored at ~/.mcp_mokocrm.json:
{
"defaultConnection": "production",
"connections": {
"production": {
"baseUrl": "https://erp.example.com",
"apiKey": "your-api-key"
},
"staging": {
"baseUrl": "https://erp-staging.example.com",
"apiKey": "your-staging-key",
"insecure": true
}
}
}
| Field | Required | Description |
|---|---|---|
defaultConnection |
Yes | Name of the default connection |
connections |
Yes | Map of named connections |
baseUrl |
Yes | Dolibarr instance URL (no trailing slash) |
apiKey |
Yes | Dolibarr API key (DOLAPIKEY header auth) |
insecure |
No | Set true to skip TLS verification |
Troubleshooting
"Failed to load config" error
The config file ~/.mcp_mokocrm.json is missing or malformed. Run npm run setup to create it.
"Access denied" or 403 errors
- The API module may not be enabled in Dolibarr
- The API key user may lack permissions for the requested operation
"Error 404" on certain endpoints
- Some API endpoints require specific Dolibarr modules to be enabled (e.g. Projects module for
/projects) - Check Setup > Modules to ensure the relevant module is active
Repo: mcp-mokocrm-api · MokoStandards
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.1 | 2026-06-18 | Moko Consulting | Fix repo name, restructure into folders |
| 1.0 | 2026-05-07 | jmiller | Initial installation guide |