Skip to content

Configuration

The MCP server needs three things to connect to your Mentu workspace: an API token, a workspace ID, and (optionally) a custom API URL. You can provide these through environment variables, a .mentu.json file, or both.

VariableRequiredDescription
MENTU_API_TOKENYesYour Mentu API token for authentication
MENTU_WORKSPACE_IDYesThe workspace UUID to operate against
MENTU_API_URLNoCustom API endpoint. Defaults to the Mentu production API

If your project already uses VITE_MENTU_* environment variables (common in Vite-based frontends), the MCP server will pick those up automatically:

VariableEquivalent to
VITE_MENTU_API_TOKENMENTU_API_TOKEN
VITE_MENTU_WORKSPACE_IDMENTU_WORKSPACE_ID
VITE_MENTU_API_URLMENTU_API_URL

This means you can reuse the same .env file for both your app and the MCP server without duplication.

You can also place a .mentu.json file in your project root:

{
"apiUrl": "https://mentu-proxy.example.com/ops",
"apiToken": "mnt_xxxxxxxxxxxxxxxxxxxx",
"workspaceId": "2e78554d-9d92-4e4a-8866-aa126f25fbe6",
"projectDomains": ["frontend", "backend", "infra"]
}
FieldTypeRequiredDescription
apiUrlstringNoCustom API endpoint
apiTokenstringYesMentu API token
workspaceIdstringYesWorkspace UUID
projectDomainsstring[]NoDomain tags for filtering commitments and memories in this project

When the same setting is defined in multiple places, the server resolves them in this order (highest priority first):

  1. Environment variables (MENTU_API_TOKEN, MENTU_WORKSPACE_ID, MENTU_API_URL)
  2. VITE-prefixed env vars (VITE_MENTU_API_TOKEN, etc.)
  3. .mentu.json file in the current working directory
  4. Defaults (only applies to apiUrl)

For example, if MENTU_API_TOKEN is set in your shell and apiToken is also in .mentu.json, the environment variable wins.

The simplest setup — one command registers the server:

Terminal window
claude mcp add mentu -- npx @mentu/mcp

This adds the server to your Claude Code MCP configuration. Make sure your environment variables are available in the shell where Claude Code runs (e.g., via .env, .bashrc, or your shell profile).

To pass environment variables explicitly:

Terminal window
claude mcp add mentu \
-e MENTU_API_TOKEN=mnt_xxxxxxxxxxxxxxxxxxxx \
-e MENTU_WORKSPACE_ID=your-workspace-id \
-- npx @mentu/mcp

Create or edit .cursor/mcp.json in your project root:

{
"mcpServers": {
"mentu": {
"command": "npx",
"args": ["@mentu/mcp"],
"env": {
"MENTU_API_TOKEN": "mnt_xxxxxxxxxxxxxxxxxxxx",
"MENTU_WORKSPACE_ID": "your-workspace-id"
}
}
}
}

Add the server to your Windsurf settings.json:

{
"mcpServers": {
"mentu": {
"command": "npx",
"args": ["@mentu/mcp"],
"env": {
"MENTU_API_TOKEN": "mnt_xxxxxxxxxxxxxxxxxxxx",
"MENTU_WORKSPACE_ID": "your-workspace-id"
}
}
}
}

Add to your Codex MCP client configuration:

{
"mcpServers": {
"mentu": {
"command": "npx",
"args": ["@mentu/mcp"],
"env": {
"MENTU_API_TOKEN": "mnt_xxxxxxxxxxxxxxxxxxxx",
"MENTU_WORKSPACE_ID": "your-workspace-id"
}
}
}
}

Any MCP client that supports the stdio transport can launch the server. The configuration shape is the same across clients:

{
"command": "npx",
"args": ["@mentu/mcp"],
"env": {
"MENTU_API_TOKEN": "mnt_xxxxxxxxxxxxxxxxxxxx",
"MENTU_WORKSPACE_ID": "your-workspace-id"
}
}

The server communicates over stdin/stdout using the MCP JSON-RPC protocol. No HTTP server is started.