Amami MCP docs

MCP config

Amami MCP runs as a local stdio server by default. Use browser setup for most users. Use manual API key config when you already have a key or need a declarative environment.

Run setup once:

npx -y amami-analytics-mcp setup --write

Then configure any MCP client that accepts mcpServers:

{
  "mcpServers": {
    "amami": {
      "command": "npx",
      "args": ["-y", "amami-analytics-mcp@latest"]
    }
  }
}

The MCP package auto-loads ~/.amami-analytics-mcp/.env, so you do not need to place secrets in the client config after browser authorization.

Manual API key config

Use this when you already have an API key:

{
  "mcpServers": {
    "amami": {
      "command": "npx",
      "args": ["-y", "amami-analytics-mcp@latest"],
      "env": {
        "AMAMI_API_KEY": "your_api_key_here",
        "AMAMI_ENABLE_WRITE": "1"
      }
    }
  }
}

For read-only analytics, omit AMAMI_ENABLE_WRITE.

Self-hosted Amami-compatible instance

{
  "mcpServers": {
    "amami": {
      "command": "npx",
      "args": ["-y", "amami-analytics-mcp@latest"],
      "env": {
        "AMAMI_API_URL": "https://your-amumi.example.com",
        "AMAMI_API_KEY": "your_api_key_here",
        "AMAMI_ENABLE_WRITE": "1"
      }
    }
  }
}

For username and password auth, keep credentials in an env file or secret store:

AMAMI_API_URL=https://your-amumi.example.com
AMAMI_USERNAME=your_username
AMAMI_PASSWORD=your_password
AMAMI_ENABLE_WRITE=1

Read Self-hosting before operating a production instance.

Environment variables

  • AMAMI_API_KEY: API key for https://dashboard.amami.dev unless AMAMI_API_URL is also set.
  • AMAMI_API_URL: Custom Amami-compatible instance base URL.
  • AMAMI_USERNAME and AMAMI_PASSWORD: Self-hosted login credentials when API key auth is not used.
  • AMAMI_TEAM_ID: Optional team scope for website listings.
  • AMAMI_DEFAULT_TIMEZONE: Optional IANA timezone for time-series tools.
  • AMAMI_ENABLE_WRITE: Set to 1 to expose create, update, and event-ingestion tools.
  • AMAMI_ENABLE_ADMIN: Set to 1 for self-hosted admin tools.
  • AMAMI_ALLOW_DESTRUCTIVE: Set to 1 only when delete or reset tools should be exposed.

Keep secrets in local environment files, MCP client secrets, or the setup-generated ~/.amami-analytics-mcp/.env. Do not paste API keys into chat.

For backend integrations that do not need an AI assistant, use the API reference.