The MantisBT MCP Server integrates MantisBT bug tracking into MCP-capable clients (e.g., Claude Code), enabling full issue lifecycle management and more.
Issue Management
Get, list (with filtering by project, status, assignee, reporter, saved filter, and field projection), create, update, and delete issues
Notes & Attachments
List, add (public or private), and delete notes/comments on issues
List attachments and upload files via local path or Base64-encoded content
Relationships & Monitoring
Add/remove relationships between issues (
duplicate_of,related_to,parent_of,child_of,has_duplicate)Add/remove users as issue monitors/watchers for email notifications
Tags
List available tags; attach (auto-creating if needed) or detach tags from issues
Projects
List accessible projects; retrieve project versions, categories, and users (with optional access level filter)
Semantic Search (optional, requires
Natural language search over issues using offline embedding models (
vectraorsqlite-vecbackends)Rebuild the search index (full or incremental) and check index status
Metadata & System
Sync and retrieve cached metadata (projects, users, versions, categories)
List saved filters, get current user profile, list supported languages
Retrieve enum values for issue fields (severity, status, priority, resolution, reproducibility)
Get MantisBT and MCP server version information and server configuration
Deployment
Supports stdio (local) and HTTP (remote) modes with optional token authentication and configurable file upload restrictions
MantisBT MCP Server
A Model Context Protocol (MCP) server that integrates the MantisBT REST API into Claude Code and other MCP-capable clients. Read, create, and update issues directly from your editor.
Requirements
Node.js ≥ 18
MantisBT installation with REST API enabled (version 2.23+)
MantisBT API token (create under My Account → API Tokens)
Related MCP server: MantisBT MCP Server
Installation
Via npx (recommended):
Add to ~/.claude/claude_desktop_config.json (Claude Desktop) or your local
claude_desktop_config.json (Claude Code):
{
"mcpServers": {
"mantisbt": {
"command": "npx",
"args": ["-y", "@dpesch/mantisbt-mcp-server"],
"env": {
"MANTIS_BASE_URL": "https://your-mantis.example.com/api/rest",
"MANTIS_API_KEY": "your-api-token"
}
}
}
}Local build:
git clone https://codeberg.org/dpesch/mantisbt-mcp-server
cd mantisbt-mcp-server
npm run init
npm run build{
"mcpServers": {
"mantisbt": {
"command": "node",
"args": ["/path/to/mantisbt-mcp-server/dist/index.js"],
"env": {
"MANTIS_BASE_URL": "https://your-mantis.example.com/api/rest",
"MANTIS_API_KEY": "your-api-token"
}
}
}
}Configuration
Environment variables
Variable | Required | Default | Description |
| ✅ | – | Base URL of the MantisBT REST API |
| ✅ | – | API token for authentication |
| – |
| Directory for the metadata cache |
| – |
| Cache lifetime in seconds |
| – |
| Transport mode: |
| – |
| Port for HTTP mode |
| – |
| Bind address for HTTP mode. Changed from — the server now listens on localhost only by default. Set to |
| – | – | When set, the |
| – |
| Set to |
| – |
| Vector store backend: |
| – |
| Directory for the search index |
| – |
| Embedding model name (downloaded once on first use, ~80 MB) |
| – |
| Number of ONNX intra-op threads for the embedding model. Default is 1 to prevent CPU saturation on multi-core machines and WSL. Increase only if index rebuild speed matters and the host is dedicated to this workload. |
| – | – | Restrict |
Config file (fallback)
If no environment variables are set, ~/.claude/mantis.json is read:
{
"base_url": "https://your-mantis.example.com/api/rest",
"api_key": "your-api-token"
}Available tools
Issues
Tool | Description |
| Retrieve an issue by its numeric ID |
| Filter issues by project, status, author, and more; optional |
| Create a new issue; optional |
| Update an existing issue |
| Delete an issue |
Notes
Tool | Description |
| List all notes of an issue |
| Add a note to an issue |
| Delete a note |
Attachments
Tool | Description |
| List attachments of an issue |
| Upload a file to an issue — either by local |
Relationships
Tool | Description |
| Create a relationship between two issues; optional |
| Remove a relationship from an issue (use the |
Monitors
Tool | Description |
| Add yourself as a monitor of an issue |
| Remove a user as a monitor of an issue |
Tags
Tool | Description |
| List all available tags; falls back to the metadata cache when |
| Attach tags to an issue |
| Remove a tag from an issue |
Projects
Tool | Description |
| List all accessible projects |
| Get versions of a project; optional |
| Get categories of a project |
| Get users of a project |
Semantic search (optional)
Instead of exact keyword matching, semantic search understands the meaning behind a query. Ask in plain language — the search engine finds conceptually related issues even when the wording doesn't match:
"login fails after password reset" — finds issues about authentication edge cases
"performance problems on the checkout page" — surfaces related reports regardless of the exact terminology used
"duplicate entries in the invoice list" — catches issues described as "shown twice", "double records", etc.
The embedding model (~80 MB) runs entirely offline — no OpenAI key, no external API. It is downloaded once on first start and cached locally. Issues are indexed incrementally on every server start (only new and updated issues are re-indexed).
Activate with MANTIS_SEARCH_ENABLED=true.
Tool | Description |
| Natural language search over all indexed issues — returns top-N results with cosine similarity score; optional |
| Build or update the search index; |
| Return the current fill level of the search index: how many issues are indexed vs. total, and the timestamp of the last sync |
Which backend to choose?
|
| |
Dependencies | None (pure JS) | Requires native build tools |
Install | Included |
|
Best for | Up to ~10,000 issues | 10,000+ issues |
Performance | Fast enough for most setups | Faster for large corpora |
Start with vectra. Switch to sqlite-vec if indexing or query times become noticeably slow.
npm install sqlite-vec better-sqlite3
# then set MANTIS_SEARCH_BACKEND=sqlite-vecMetadata & system
Tool | Description |
| Return all field names valid for the |
| Retrieve cached metadata (projects, users, versions, categories) |
| Refresh the metadata cache |
| List saved filters |
| Retrieve your own user profile |
| List available languages |
| Show server configuration (base URL, cache TTL) |
| Return valid ID/name pairs for all issue enum fields (severity, status, priority, resolution, reproducibility) — use before |
| Get MantisBT version and check for updates |
| Return the version of this mantisbt-mcp-server instance |
HTTP mode
For use as a standalone server (e.g. in remote setups):
MANTIS_BASE_URL=... MANTIS_API_KEY=... TRANSPORT=http PORT=3456 node dist/index.js
# With token authentication and explicit bind address (required for Docker/remote):
# MCP_HTTP_TOKEN=secret MANTIS_BASE_URL=... MANTIS_API_KEY=... \
# TRANSPORT=http PORT=3456 MCP_HTTP_HOST=0.0.0.0 node dist/index.jsHealth check: GET http://localhost:3456/health (always public, no token required)
Development
npm run init # First-time setup: install deps, git hooks, typecheck
npm run build # Compile TypeScript → dist/
npm run typecheck # Type check without output
npm run dev # Watch mode for development
npm test # Run tests (vitest)
npm run test:watch # Run tests in watch mode
npm run test:coverage # Coverage reportLicense
MIT – see LICENSE
Contributing
Contributions welcome! Please read CONTRIBUTING.md. Repository: codeberg.org/dpesch/mantisbt-mcp-server