MantisBT MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "MANTIS_BASE_URL=${MANTIS_BASE_URL}" -e "MANTIS_API_KEY=${MANTIS_API_KEY}" mantisbt-mcp-server -- npx -y @dpesch/mantisbt-mcp-server
Required:MANTIS_BASE_URLMANTIS_API_KEY+ 2 optional
README.md

Integrates MantisBT bug tracker into Claude and other MCP clients

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)

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
MANTIS_BASE_URL Base URL of the MantisBT REST API
MANTIS_API_KEY API token for authentication
MANTIS_CACHE_DIR ~/.cache/mantisbt-mcp Directory for the metadata cache
MANTIS_CACHE_TTL 3600 Cache lifetime in seconds
TRANSPORT stdio Transport mode: stdio or http
PORT 3000 Port for HTTP mode
MCP_HTTP_HOST 127.0.0.1 Bind address for HTTP mode. Changed from 0.0.0.0 to 127.0.0.1 — the server now listens on localhost only by default. Set to 0.0.0.0 for Docker or remote access.
MCP_HTTP_TOKEN When set, the /mcp endpoint requires Authorization: Bearer <token>. The /health endpoint is always public.
MANTIS_SEARCH_ENABLED false Set to true to enable semantic search
MANTIS_SEARCH_BACKEND vectra Vector store backend: vectra (pure JS) or sqlite-vec (requires manual install)
MANTIS_SEARCH_DIR {MANTIS_CACHE_DIR}/search Directory for the search index
MANTIS_SEARCH_MODEL Xenova/paraphrase-multilingual-MiniLM-L12-v2 Embedding model name (downloaded once on first use, ~80 MB)
MANTIS_SEARCH_THREADS 1 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.
MANTIS_UPLOAD_DIR Restrict upload_file to files within this directory. When set, any file_path outside the directory is rejected (path traversal attempts via ../ are blocked). Without this variable there is no restriction.

Available tools

Issues

Tool Description
get_issue Retrieve an issue by its numeric ID
list_issues Filter issues by project, status, author, and more; optional select for field projection and status for client-side status filtering
create_issue Create a new issue; severity and priority must be canonical English names (e.g. minor, major, normal, high) — call get_issue_enums to see all valid values and their localized labels; optional handler parameter accepts a username as alternative to handler_id (resolved against project members)
update_issue Update an existing issue
delete_issue Delete an issue

Notes

Tool Description
list_notes List all notes of an issue
add_note Add a note to an issue
delete_note Delete a note

Attachments

Tool Description
list_issue_files List attachments of an issue
upload_file Upload a file to an issue — either by local file_path or Base64-encoded content + filename

Relationships

Tool Description
add_relationship Create a relationship between two issues; optional type_name parameter accepts a string name (e.g. "related_to", "duplicate_of") as alternative to numeric type_id
remove_relationship Remo

Tools (12)

get_issueRetrieve an issue by its numeric ID
list_issuesFilter issues by project, status, author, and more
create_issueCreate a new issue
update_issueUpdate an existing issue
delete_issueDelete an issue
list_notesList all notes of an issue
add_noteAdd a note to an issue
delete_noteDelete a note
list_issue_filesList attachments of an issue
upload_fileUpload a file to an issue
add_relationshipCreate a relationship between two issues
remove_relationshipRemove a relationship between two issues

Environment Variables

MANTIS_BASE_URLrequiredBase URL of the MantisBT REST API
MANTIS_API_KEYrequiredAPI token for authentication
MANTIS_CACHE_DIRDirectory for the metadata cache
MANTIS_SEARCH_ENABLEDSet to true to enable semantic search

Configuration

claude_desktop_config.json
{"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"}}}}

Try it

List all open issues assigned to me in the current project.
Create a new bug report for the login page crash with high severity.
Add a note to issue #123 explaining that I have reproduced the error.
Find all issues related to the database migration project.
Upload the log file at ./debug.log to issue #456.

Frequently Asked Questions

What are the key features of MantisBT MCP Server?

Read, create, and update MantisBT issues directly from your editor. Manage issue notes, file attachments, and relationships. Optional offline semantic search across all issues. Supports project filtering and field projection. Configurable cache and transport modes (stdio/http).

What can I use MantisBT MCP Server for?

Developers managing bug reports without leaving their IDE. Automating issue updates based on code changes. Searching through historical bug reports using semantic queries. Quickly attaching diagnostic logs to existing tickets.

How do I install MantisBT MCP Server?

Install MantisBT MCP Server by running: npx -y @dpesch/mantisbt-mcp-server

What MCP clients work with MantisBT MCP Server?

MantisBT MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MantisBT MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare