Standalone MCP server for MantisBT REST API endpoints.
npm install -g @anscodelab/mantis-mcp-serveror run directly via npx (recommended):
npx -y @anscodelab/mantis-mcp-serverSet the following env variables to point at your Mantis instance:
MANTIS_BASE_URL(e.g.https://mantis.example.com/api/rest)MANTIS_USE_INDEX_PHP(truewhen Mantis is served without URL rewrite)MANTIS_API_TOKEN(create under My Account → API Tokens in Mantis)
Example:
export MANTIS_BASE_URL=https://mantis.example.com/api/rest
export MANTIS_USE_INDEX_PHP=true
export MANTIS_API_TOKEN=YOUR_REAL_TOKEN_HEREInstall the package globally first:
npm install -g @anscodelab/mantis-mcp-serverThen add the server to ~/.claude.json (create the mcpServers key if it doesn't exist):
{
"mcpServers": {
"mantis-mcp-server": {
"type": "stdio",
"command": "/path/to/node",
"args": ["/path/to/node_modules/@anscodelab/mantis-mcp-server/bin/mantis-mcp-server.js"],
"env": {
"MANTIS_BASE_URL": "https://mantis.example.com/api/rest",
"MANTIS_USE_INDEX_PHP": "true",
"MANTIS_API_TOKEN": "YOUR_REAL_TOKEN_HERE"
}
}
}
}Find the paths with:
where node # Windows
which node # macOS/Linux
# Global package path (Windows)
npm root -g
# e.g. C:\Users\you\AppData\Roaming\npm\node_modules
# Global package path (macOS/Linux)
npm root -g
# e.g. /usr/local/lib/node_modulesRestart Claude Code after editing ~/.claude.json.
{
"mcpServers": {
"mantis-rest": {
"command": "npx",
"args": ["-y", "@anscodelab/mantis-mcp-server@latest"],
"env": {
"MANTIS_BASE_URL": "https://mantis.example.com/api/rest",
"MANTIS_USE_INDEX_PHP": "true",
"MANTIS_API_TOKEN": "YOUR_REAL_TOKEN_HERE"
}
}
}
}mantis-mcp-serverThe server speaks MCP over stdio and exposes Mantis REST endpoints via tools.
For full developer documentation and local development setup, see the repository README (README.dev.md).