Skip to content

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.

npx mcp-nevent

Requires NEVENT_JWT_TOKEN to be defined in the environment.

These variables apply when the server starts as a stdio process (the default mode, used by Claude Desktop, Cursor, Cline, etc.):

VariableRequiredDefault valueDescription
NEVENT_JWT_TOKENYesJWT token to authenticate with the Nevent Data API
NEVENT_DATA_API_URLNohttps://data.nevent.esBase URL of the Data API
NEVENT_OPERATION_MODENoREAD_ONLYREAD_ONLY | STANDARD | FULL

Full startup example in stdio mode:

export NEVENT_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
export NEVENT_OPERATION_MODE=STANDARD
node dist/index.js

These variables apply when you run your own instance of the Nevent AI HTTP server (equivalent to the hosted server at mcp.nevent.ai):

VariableRequiredDefault valueDescription
MCP_JWT_SECRETYesJWT signing key for MCP access tokens (minimum 32 characters)
MONGODB_URIYesMongoDB connection URI for storing OAuth tokens
MCP_TRANSPORTYesstdioSet to http to activate HTTP mode
MCP_PORTNo3000HTTP server port
MCP_SERVER_URLNohttp://localhost:{port}Public HTTPS URL of the server (needed for OAuth)
NEVENT_API_URLNohttps://api.nevent.esNevent API URL (auth and tenant endpoints)
NEVENT_DATA_API_URLNohttps://data.nevent.esBase URL of the Data API
NEVENT_OPERATION_MODENoREAD_ONLYREAD_ONLY | STANDARD | FULL
MCP_ALLOWED_ORIGINSNo*Allowed CORS origins (comma-separated)

HTTP mode startup example:

MCP_JWT_SECRET=my-secret-of-at-least-32-characters \
MONGODB_URI=mongodb://localhost:27017/mcp-nevent \
MCP_TRANSPORT=http \
MCP_SERVER_URL=https://mcp.my-domain.com \
NEVENT_OPERATION_MODE=STANDARD \
node dist/index.js
# 1. Clone the repository
git clone https://github.com/nevent/mcp-nevent
cd mcp-nevent

# 2. Install dependencies
npm install

# 3. Compile TypeScript
npm run build

# 4. Start in stdio mode
export NEVENT_JWT_TOKEN=your_token
node dist/index.js

# 5. Or start in HTTP mode
MCP_JWT_SECRET=long-secret MONGODB_URI=mongodb://... MCP_TRANSPORT=http node dist/index.js

The operation mode controls which write tools are available:

ModeAvailable tools
READ_ONLY (default)All read tools. No write tools.
STANDARDRead + create/update campaigns, segments, templates and short URLs. Schedule sends.
FULLFull 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.

The Nevent JWT token is obtained from the authentication API:

curl -X POST https://api.nevent.es/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your@email.com",
    "password": "your_password"
  }'

The response includes a token field (the JWT access token) and a refreshToken. Use the token value as NEVENT_JWT_TOKEN.