mcp-mantis

mcp-mantis

Provides AI assistants with direct access to MantisBT issue trackers via the REST API, enabling reading, updating, resolving, and semantically searching issues.

Category
访问服务器

README

mcp-mantis

Node.js TypeScript MCP

An MCP stdio server that gives an AI assistant direct access to a MantisBT tracker, oriented to issue resolvers: read issues (with images), change status, resolve, assign, comment and link — plus local semantic search over issues.

REST, not SOAP. This server uses the MantisBT REST API (Mantis 2.27+), the supported and non-deprecated integration path. The legacy SOAP API is not used and does not need to be enabled.

Setup

Requires Node.js 22+ (uses the built-in global fetch).

npm install
cp .env.example .env

Then edit .env:

Variable Required Notes
MANTIS_REST_BASE_URL yes Must include index.php when URL rewriting is disabled on the host.
MANTIS_TOKEN yes API token from Mantis: My Account → API Tokens → Create. No username/password; the token is the Authorization header.
MANTIS_READONLY no false (default) enables write tools. Set true for read-only. A blank value keeps the default.
MANTIS_SEARCH_ENABLED no true (default) registers semantic search tools. Needs the optional @huggingface/transformers.
MANTIS_SEARCH_MODEL / MANTIS_SEARCH_DIR / MANTIS_SEARCH_THREADS no Embedding model, index directory, ONNX threads.
MANTIS_TIMEOUT_MS, MANTIS_METADATA_TTL_MS, MANTIS_DEFAULT_PAGE_SIZE, MANTIS_MAX_PAGE_SIZE no Tuning.

Register with Claude Code

From npm (published package), no local checkout needed — the token is supplied here, never stored in the repo:

claude mcp add mantis \
  -e MANTIS_REST_BASE_URL=https://mantis.example.com/api/rest/index.php \
  -e MANTIS_TOKEN=your-token-here \
  -- npx -y @grec0/mcp-mantis

Or from a local build:

npm run build
claude mcp add mantis -- node /path/to/mcp-mantis/dist/mcp.js

Equivalent .mcp.json (the env block is where MANTIS_TOKEN belongs):

{
  "mcpServers": {
    "mantis": {
      "command": "npx",
      "args": ["-y", "@grec0/mcp-mantis"],
      "env": {
        "MANTIS_REST_BASE_URL": "https://mantis.example.com/api/rest/index.php",
        "MANTIS_TOKEN": "your-token-here",
        "MANTIS_READONLY": "false"
      }
    }
  }
}

Tools

Read

Tool Purpose
mantis_whoami Authenticated user + accessible projects.
mantis_list_projects / mantis_get_project Projects with versions, categories, custom fields.
mantis_list_project_users Project members (valid handler names for assignment).
mantis_list_issues Paginated issues, lightweight summary by default (use mantis_get_issue for full detail). Client-side filters: status (name or "open"), assigned_to, reporter_id, date range.
mantis_get_issue / mantis_get_issues One issue (complete) / batch fetch by ids.
mantis_get_issue_attachment Download an attachment; images come back viewable.
mantis_get_enums / mantis_get_config Enumerations ({id,name,label}) / raw config options.
mantis_list_filters Stored filters (feed a filter_id into mantis_list_issues).

Resolve / write (registered when MANTIS_READONLY=false)

Tool Purpose
mantis_update_issue Partial update: status, resolution, handler, priority, fields… Accepts localized/canonical enum names. Optional note and dry_run.
mantis_resolve_issue Sets both status and resolution (defaults resuelta / fixed) + optional note.
mantis_assign_issue Assign to a handler by login name (or id), optional status change + note.
mantis_add_note Add a public/private note.
mantis_add_relationship / mantis_remove_relationship Link issues (related, duplicate, blocks, depends…).

Semantic search (registered when MANTIS_SEARCH_ENABLED=true)

Tool Purpose
mantis_rebuild_search_index Build/update the local vector index from issues (first run downloads the model).
mantis_search_issues Natural-language search (multilingual). Optional select, highlight, date filters.
mantis_search_index_status Index fill level and last sync.

Enum names accept the instance's localized names and the canonical English labels (e.g. asignada or confirmed). mantis_list_issues status="open" uses the live bug_resolved_status_threshold. Ad-hoc free-text search is not a server-side REST filter — use mantis_search_issues or a stored filter_id.

Commands

Command Purpose
npm run dev:mcp / npm run start:mcp Run the MCP stdio server (reload / built).
npm run build Compile TypeScript into dist/.
npm run check Type-check, lint and format-check.
npm run dev Express health server (GET /health, GET /health/mantis).

Project structure

src/
├── config.ts        # Validated environment configuration
├── constants.ts     # Enum aliases, relationship types
├── date-filter.ts   # Shared date-range filtering
├── mantis.ts        # MantisBT REST client (fetch, enum/handler resolution, caching)
├── tools/           # meta, issues, notes, relationships, shared helpers
├── search/          # embedder (Transformers.js), vector store, sync, search tools
├── server.ts        # Tool registration
├── mcp.ts           # MCP stdio executable
└── index.ts         # Express health endpoints

Security

.env is git-ignored (only .env.example is committed) — never commit the token. Write access is scoped to the token owner's Mantis permissions; set MANTIS_READONLY=true to disable all mutations. Health endpoints expose no credentials or user data. Run npm run check before committing.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选