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/
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:
GET /webservice.php?operation=getchallenge→ token- MD5(token + accessKey) → hashed key
POST /webservice.phpwithoperation=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 | |
| 3 | MCP 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]) |
| 10 | |
| 11 | ## Setup |
| 12 | |
| 13 | |
| 14 | cd mcp/vtenext/server |
| 15 | npm install |
| 16 | cp .env.example .env |
| 17 | |
| 18 | |
| 19 | Edit `.env`: |
| 20 | |
| 21 | |
| 22 | VTENEXT_URL=http://your-vtenext-instance |
| 23 | VTENEXT_USERNAME=admin |
| 24 | VTENEXT_ACCESS_KEY=your_access_key |
| 25 | READ_ONLY=false |
| 26 | |
| 27 | |
| 28 | The access key is in VTENext under **Admin → Users → [user] → Access Key**. |
| 29 | |
| 30 | ## Read-only mode |
| 31 | |
| 32 | 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. |
| 33 | |
| 34 | 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: |
| 35 | |
| 36 | |
| 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 | |
| 56 | Add to `.mcp.json` in your project root: |
| 57 | |
| 58 | |
| 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 | |
| 104 | VTENext uses the vtiger WebService protocol: |
| 105 | |
| 106 | `GET /webservice.php?operation=getchallenge` → token |
| 107 | MD5(token + accessKey) → hashed key |
| 108 | `POST /webservice.php` with `operation=login` (form-encoded) → sessionName |
| 109 | |
| 110 | Sessions are cached for 4 minutes (token lifetime is 5 minutes). |
| 111 | |
| 112 | ## Tests |
| 113 | |
| 114 | |
| 115 | # Unit tests (no VTENext required) |
| 116 | npm test |
| 117 | |
| 118 | # Integration tests (requires live VTENext at VTENEXT_URL) |
| 119 | npm run test:integration |
| 120 | |
| 121 | |
| 122 | ## License |
| 123 | |
| 124 | MIT |
| 125 | |
| 126 | |
| 127 | |
| 128 | Maintained by [**Castaldo Solutions**], enterprise-grade technology built for SMEs. |
| 129 | |
| 130 | Why we built an MCP server for a CRM instead of an integration: |
| 131 | [Connecting VTENext to Claude with MCP]. |
| 132 |
Discussion
Alternatives
Browse more free AI agents or everything in Development.