Local installation of Nevent AI
This guide covers the local installation of the mcp-nevent package. Use it if you need full control over the version, want to contribute to the project, or prefer not to depend on the hosted server.
Quick installation
Section titled “Quick installation”Requires NEVENT_JWT_TOKEN to be defined in the environment.
Environment variables
Section titled “Environment variables”stdio mode
Section titled “stdio mode”These variables apply when the server starts as a stdio process (the default mode, used by Claude Desktop, Cursor, Cline, etc.):
| Variable | Required | Default value | Description |
|---|---|---|---|
NEVENT_JWT_TOKEN | Yes | — | JWT token to authenticate with the Nevent Data API |
NEVENT_DATA_API_URL | No | https://data.nevent.es | Base URL of the Data API |
NEVENT_OPERATION_MODE | No | READ_ONLY | READ_ONLY | STANDARD | FULL |
Full startup example in stdio mode:
HTTP mode
Section titled “HTTP mode”These variables apply when you run your own instance of the Nevent AI HTTP server (equivalent to the hosted server at mcp.nevent.ai):
| Variable | Required | Default value | Description |
|---|---|---|---|
MCP_JWT_SECRET | Yes | — | JWT signing key for MCP access tokens (minimum 32 characters) |
MONGODB_URI | Yes | — | MongoDB connection URI for storing OAuth tokens |
MCP_TRANSPORT | Yes | stdio | Set to http to activate HTTP mode |
MCP_PORT | No | 3000 | HTTP server port |
MCP_SERVER_URL | No | http://localhost:{port} | Public HTTPS URL of the server (needed for OAuth) |
NEVENT_API_URL | No | https://api.nevent.es | Nevent API URL (auth and tenant endpoints) |
NEVENT_DATA_API_URL | No | https://data.nevent.es | Base URL of the Data API |
NEVENT_OPERATION_MODE | No | READ_ONLY | READ_ONLY | STANDARD | FULL |
MCP_ALLOWED_ORIGINS | No | * | Allowed CORS origins (comma-separated) |
HTTP mode startup example:
Building from source
Section titled “Building from source”Operation modes in detail
Section titled “Operation modes in detail”The operation mode controls which write tools are available:
| Mode | Available tools |
|---|---|
READ_ONLY (default) | All read tools. No write tools. |
STANDARD | Read + create/update campaigns, segments, templates and short URLs. Schedule sends. |
FULL | Full access to all available tools. |
If a write tool is invoked in READ_ONLY mode, the server returns the operation_mode_blocked error. See the error table.
Obtaining the NEVENT_JWT_TOKEN
Section titled “Obtaining the NEVENT_JWT_TOKEN”The Nevent JWT token is obtained from the authentication API:
The response includes a token field (the JWT access token) and a refreshToken. Use the token value as NEVENT_JWT_TOKEN.