Affise MCP server › Local server
The same tools, as a package you install yourself. Your Affise key stays on your machine and requests go straight from it to the Affise API — nothing of ours sits in the path. About five minutes.
Before you start
An Affise API key, a client that can launch a local MCP server — Claude Desktop, Claude Code, Cursor and most others can — and either Node.js 18 or newer, or Docker if you would rather run it in a container.
npx for you. The first launch downloads the package, so give it a moment.affise-mcp-server command on your PATH:npm install -g @affise/mcp-server3 · Build from source, if you want to read or change what you run:
git clone https://github.com/affise/mcp-affise.git cd mcp-affise npm install npm run build # compiles to build/index.js4 · Build a container, if your policy is that everything runs in one:
git clone https://github.com/affise/mcp-affise.git cd mcp-affise docker build -t affise-mcp-server .One thing to know before you reach for
docker compose up -d: this server speaks stdio, meaning your client starts it and talks to it over the process’s own input and output. A detached container has nobody on the other end of that pipe. So the client launches docker run --rm -i itself, once per session — the config block in step 3 does exactly that. The docker-compose.yml in the repository is left over from a different arrangement and is not the way to run this.https://api-yourcompany.affise.com form, not the dashboard address you log into. What the key reaches is what the server reaches: an admin key sees network-wide data, an affiliate key only that affiliate’s own.claude_desktop_config.json directly. Use the block that matches the route you picked.{
"mcpServers": {
"affise": {
"command": "npx",
"args": ["-y", "@affise/mcp-server"],
"env": {
"AFFISE_BASE_URL": "https://api-yourcompany.affise.com",
"AFFISE_API_KEY": "your_api_key"
}
}
}
}Global install — same block, but "command": "affise-mcp-server" and no args."command": "node", "args": ["/absolute/path/to/mcp-affise/build/index.js"]Docker — the client runs the container per session. The bare
-e NAME form forwards the value from the env block below it:{
"mcpServers": {
"affise": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-e", "AFFISE_BASE_URL",
"-e", "AFFISE_API_KEY",
"affise-mcp-server"],
"env": {
"AFFISE_BASE_URL": "https://api-yourcompany.affise.com",
"AFFISE_API_KEY": "your_api_key"
}
}
}
}Whichever you use, the env block is not optional: a desktop app does not inherit your terminal’s environment, so a key exported in your shell will never reach it. Restart the client afterwards.mcp-affise.dxt from the GitHub repository and drag it into Settings ▸ Extensions, which asks for the URL and key in a form.printf '%s\n' '{"jsonrpc":"2.0","id":0,"method":"initialize",
"params":{"protocolVersion":"2025-06-18","capabilities":{},
"clientInfo":{"name":"smoke","version":"1"}}}' \
| AFFISE_BASE_URL=https://api-yourcompany.affise.com \
AFFISE_API_KEY=your_api_key npx -y @affise/mcp-serverA working install prints a JSON result line and then waits for more input — normal for a stdio server, so press Ctrl+C to stop it. Progress traces go to stderr and start with [affise-mcp].npm update -g @affise/mcp-server, or nothing at all if your client fetches it fresh each launch.Ask “Using Affise, what were my conversions yesterday?” A working install answers with real numbers. If your assistant says it has no Affise tools, the client has not been restarted or the config file has a syntax error.
AFFISE_BASE_URL and AFFISE_API_KEY sit inside the env block of the config rather than exported in your shell — a desktop app does not see your shell environment. And the base URL is the API host (api-yourcompany.affise.com), not the dashboard.command not found: affise-mcp-server+npx form above, which needs nothing on PATH, or run npm bin -g to find the directory and add it.npx, it may have picked up a new release. Pin a version in args — ["-y", "@affise/[email protected]"] — to take updates on your own schedule.docker run --rm -i, not leaving one running in the background. This server talks over the process’s own input and output, so a detached container has nobody on the other end. If you started it with docker compose up -d, stop it and use the config block in step 3 instead.https://mcp.affise.com/mcp into your client and sign in. Nothing to install, and nothing to keep up to date.Once you are connected, these are good first questions. See more examples or the full tool reference.