mantis-mcp

mantis-mcp

Enables natural language interaction with MantisBT issues and notes via CRUD operations and semantic search.

Category
访问服务器

README

mantis-mcp

MCP (Model Context Protocol) server for MantisBT with CRUD operations and semantic search (RAG) over issues and notes.

Enables natural language queries like "have I ever discussed X with client Y?" across a large MantisBT database (10,000+ issues).

Features

  • 8 CRUD tools — list/get/create/update issues, add notes, list projects and users
  • 3 semantic search tools — natural language search across all issues and notes, with incremental sync
  • Local embeddings — runs entirely offline using Transformers.js (no external API calls for search)
  • Multilingual — uses paraphrase-multilingual-MiniLM-L12-v2 model (IT/EN/DE/FR/ES/...)
  • Incremental sync — only processes new/updated/deleted issues after the initial sync

Quick Start

1. Install

git clone git@github.com:f-liva/mantis-mcp.git
cd mantis-mcp
npm install
npm run build

2. Setup (automated)

Run the interactive setup script — it detects your platform (WSL, Windows, macOS, Linux), asks for your MantisBT credentials, tests the connection, and configures everything automatically:

./setup.sh setup

This will:

  • Prompt for your MantisBT API URL and token
  • Test the API connection
  • Configure Claude Desktop (claude_desktop_config.json)
  • Configure Claude Code (.mcp.json)
  • Create the .env file

You can also pass parameters directly:

./setup.sh setup -u "https://mantis.example.com/api/rest" -k "your-api-token"

Or configure only one target:

./setup.sh setup -t desktop   # only Claude Desktop
./setup.sh setup -t cli       # only Claude Code
./setup.sh setup -t both      # both (default)

3. Manual Configuration (alternative)

If you prefer to configure manually:

Claude Desktop

Edit your claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Windows (without WSL):

{
  "mcpServers": {
    "mantis": {
      "command": "node",
      "args": ["C:\\Users\\YOURUSERNAME\\mantis-mcp\\dist\\index.js"],
      "env": {
        "MANTIS_API_URL": "https://mantis.example.com/api/rest",
        "MANTIS_API_KEY": "your-api-token"
      }
    }
  }
}

Windows with WSL:

{
  "mcpServers": {
    "mantis": {
      "command": "wsl",
      "args": ["bash", "-c", "cd /home/YOURUSERNAME/mantis-mcp && node dist/index.js"],
      "env": {
        "MANTIS_API_URL": "https://mantis.example.com/api/rest",
        "MANTIS_API_KEY": "your-api-token"
      }
    }
  }
}

macOS / Linux:

{
  "mcpServers": {
    "mantis": {
      "command": "node",
      "args": ["/absolute/path/to/mantis-mcp/dist/index.js"],
      "env": {
        "MANTIS_API_URL": "https://mantis.example.com/api/rest",
        "MANTIS_API_KEY": "your-api-token"
      }
    }
  }
}

Claude Code (CLI)

Create a .mcp.json in any project directory:

{
  "mcpServers": {
    "mantis": {
      "command": "node",
      "args": ["/absolute/path/to/mantis-mcp/dist/index.js"],
      "env": {
        "MANTIS_API_URL": "https://mantis.example.com/api/rest",
        "MANTIS_API_KEY": "your-api-token"
      }
    }
  }
}

Configuration

Variable Required Default Description
MANTIS_API_URL Yes MantisBT REST API base URL
MANTIS_API_KEY Yes API token (from MantisBT → My Account → API Tokens)
DB_PATH No ./mantis-mcp.db SQLite database file path
EMBEDDING_MODEL No Xenova/paraphrase-multilingual-MiniLM-L12-v2 Hugging Face model for embeddings
SYNC_BATCH_SIZE No 50 Issues fetched per batch during sync
SYNC_ON_STARTUP No false Auto-sync when server starts
LOG_LEVEL No info error / warn / info / debug

Tools Reference

CRUD Tools (8)

Tool Description Key Parameters
get_issues List issues with filters page, page_size, project_id, filter_id
get_issue_by_id Get full issue details id
create_issue Create a new issue summary, description, project_id, category, priority
update_issue Update an existing issue id, summary, description, status, handler
add_issue_note Add a note/comment issue_id, text, view_state
get_projects List all projects
get_user Look up user by username username
get_users_by_project_id List project members project_id

Semantic Search Tools (3)

Tool Description Key Parameters
search Natural language search across indexed issues/notes query, limit
sync_index Sync MantisBT data into vector index project_id (optional)
sync_status Check index status and counts

Search Workflow

  1. First time: Call sync_index to populate the vector database (may take several minutes for large databases)
  2. Search: Use search with natural language queries — results include similarity scores
  3. Keep updated: Call sync_index periodically — it performs incremental sync (only changed issues)

Architecture

Claude Desktop / Claude Code
        │
        │ stdio (JSON-RPC)
        ▼
    mantis-mcp server
        │
        ├── CRUD tools ──────► MantisBT REST API
        │
        └── Search tools
              ├── sync ──────► MantisBT REST API → Embeddings → SQLite + sqlite-vec
              └── search ────► Embeddings → sqlite-vec KNN → Ranked results
  • Embeddings: Generated locally with Transformers.js (~80MB model downloaded on first use)
  • Vector storage: SQLite with sqlite-vec extension for fast cosine similarity search
  • Sync: Compares updated_at timestamps to detect changes, then re-embeds only modified issues

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选