MCP vtenext agent

MCP server for VTENext CRM: exposes the WebService API as tools for Claude and other MCP clients

by Castaldo-Solutions·MIT license·★ 4 Stars on the repo·GitHub ↗

Files of MCP vtenext

Castaldo-Solutions/main1 file
README.md
Show the full text132 lines

mcp-vtenext

MCP server for VTENext CRM: exposes the WebService API as tools for Claude and other MCP-compatible clients.

Requirements

  • Node.js 18+
  • A running VTENext instance (self-hosted or Docker, see ../docker)

Setup

cd mcp/vtenext/server
npm install
cp .env.example .env

Edit .env:

VTENEXT_URL=http://your-vtenext-instance
VTENEXT_USERNAME=admin
VTENEXT_ACCESS_KEY=your_access_key
READ_ONLY=false

The access key is in VTENext under Admin → Users → [user] → Access Key.

Read-only mode

Set READ_ONLY=true to prevent any write operation on VTENext. When enabled, the tools create_opportunita, update_opportunita and add_nota_opportunita return an error instead of writing data.

This is useful when the server is used by AI bots or automated agents that should only read CRM data. To run a read-only instance alongside a full-access one, pass the variable via the MCP config:

{
  "mcpServers": {
    "vtenext-bot": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/mcp/vtenext/server/index.js"],
      "env": {
        "VTENEXT_URL": "http://your-vtenext-instance",
        "VTENEXT_USERNAME": "admin",
        "VTENEXT_ACCESS_KEY": "your_access_key",
        "READ_ONLY": "true"
      }
    }
  }
}

Claude Code integration

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "vtenext": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/mcp/vtenext/server/index.js"]
    }
  }
}

Tools

Opportunità (Potentials)
Tool Description
list_opportunita List opportunities with optional filters (status, search, limit)
get_opportunita Get full details of an opportunity by ID
search_opportunita Search opportunities by name
create_opportunita Create a new opportunity (write, blocked in read-only mode)
update_opportunita Update status, amount or notes on an existing opportunity (write, blocked in read-only mode)
Contatti (Contacts)
Tool Description
search_contatti Search contacts by name, email or company
Attività e note
Tool Description
add_nota_opportunita Add a comment/note to an opportunity (write, blocked in read-only mode)
list_attivita_opportunita List activities linked to an opportunity
Utilità
Tool Description
describe_modulo Show available fields for any VTENext module
query_raw Run a raw VTQL SELECT query

Authentication

VTENext uses the vtiger WebService protocol:

  1. GET /webservice.php?operation=getchallenge → token
  2. MD5(token + accessKey) → hashed key
  3. POST /webservice.php with operation=login (form-encoded) → sessionName

Sessions are cached for 4 minutes (token lifetime is 5 minutes).

Tests

# Unit tests (no VTENext required)
npm test

# Integration tests (requires live VTENext at VTENEXT_URL)
npm run test:integration

License

MIT


Maintained by Castaldo Solutions, enterprise-grade technology built for SMEs.

Why we built an MCP server for a CRM instead of an integration: Connecting VTENext to Claude with MCP.

1# mcp-vtenext
2 
3MCP server for VTENext CRM: exposes the WebService API as tools for Claude and other MCP-compatible clients.
4 
5 
6## Requirements
7 
8- Node.js 18+
9- A running VTENext instance (self-hosted or Docker, see [../docker](../docker))
10 
11## Setup
12 
13```
14cd mcp/vtenext/server
15npm install
16cp .env.example .env
17```
18 
19Edit `.env`:
20 
21```
22VTENEXT_URL=http://your-vtenext-instance
23VTENEXT_USERNAME=admin
24VTENEXT_ACCESS_KEY=your_access_key
25READ_ONLY=false
26```
27 
28The access key is in VTENext under **Admin → Users → [user] → Access Key**.
29 
30## Read-only mode
31 
32Set `READ_ONLY=true` to prevent any write operation on VTENext. When enabled, the tools `create_opportunita`, `update_opportunita` and `add_nota_opportunita` return an error instead of writing data.
33 
34This is useful when the server is used by AI bots or automated agents that should only read CRM data. To run a read-only instance alongside a full-access one, pass the variable via the MCP config:
35 
36```json
37{
38 "mcpServers": {
39 "vtenext-bot": {
40 "type": "stdio",
41 "command": "node",
42 "args": ["/absolute/path/to/mcp/vtenext/server/index.js"],
43 "env": {
44 "VTENEXT_URL": "http://your-vtenext-instance",
45 "VTENEXT_USERNAME": "admin",
46 "VTENEXT_ACCESS_KEY": "your_access_key",
47 "READ_ONLY": "true"
48 }
49 }
50 }
51}
52```
53 
54## Claude Code integration
55 
56Add to `.mcp.json` in your project root:
57 
58```json
59{
60 "mcpServers": {
61 "vtenext": {
62 "type": "stdio",
63 "command": "node",
64 "args": ["/absolute/path/to/mcp/vtenext/server/index.js"]
65 }
66 }
67}
68```
69 
70## Tools
71 
72### Opportunità (Potentials)
73 
74| Tool | Description |
75|------|-------------|
76| `list_opportunita` | List opportunities with optional filters (status, search, limit) |
77| `get_opportunita` | Get full details of an opportunity by ID |
78| `search_opportunita` | Search opportunities by name |
79| `create_opportunita` | Create a new opportunity *(write, blocked in read-only mode)* |
80| `update_opportunita` | Update status, amount or notes on an existing opportunity *(write, blocked in read-only mode)* |
81 
82### Contatti (Contacts)
83 
84| Tool | Description |
85|------|-------------|
86| `search_contatti` | Search contacts by name, email or company |
87 
88### Attività e note
89 
90| Tool | Description |
91|------|-------------|
92| `add_nota_opportunita` | Add a comment/note to an opportunity *(write, blocked in read-only mode)* |
93| `list_attivita_opportunita` | List activities linked to an opportunity |
94 
95### Utilità
96 
97| Tool | Description |
98|------|-------------|
99| `describe_modulo` | Show available fields for any VTENext module |
100| `query_raw` | Run a raw VTQL SELECT query |
101 
102## Authentication
103 
104VTENext uses the vtiger WebService protocol:
105 
1061. `GET /webservice.php?operation=getchallenge` → token
1072. MD5(token + accessKey) → hashed key
1083. `POST /webservice.php` with `operation=login` (form-encoded) → sessionName
109 
110Sessions are cached for 4 minutes (token lifetime is 5 minutes).
111 
112## Tests
113 
114```bash
115# Unit tests (no VTENext required)
116npm test
117 
118# Integration tests (requires live VTENext at VTENEXT_URL)
119npm run test:integration
120```
121 
122## License
123 
124MIT
125 
126---
127 
128Maintained by [**Castaldo Solutions**](https://www.castaldosolutions.it), enterprise-grade technology built for SMEs.
129 
130Why we built an MCP server for a CRM instead of an integration:
131[Connecting VTENext to Claude with MCP](https://www.castaldosolutions.it/articles/en/blog/mcp-server-vtenext-crm-claude).
132 

Discussion

Alternatives