qtest-mcp

qtest-mcp

Enables AI tools to safely query and manage qTest test management data through an MCP server with a token portal and guardrails against destructive operations.

Category
访问服务器

README

qTest MCP Server + Token Portal

Production-ready starter scaffold for a qTest MCP server deployable on OpenShift.

See OPERATIONS_AND_ACCESS_CONTROL.md for environment-specific run/deploy instructions and no-DB access control design.

Access control is scope-based and enforced per MCP tool call. tools/list is filtered by token scopes. Optional service-token minting endpoint: POST /api/auth/generate-service-token (requires X-Admin-Token matching MCP_ADMIN_TOKEN).

What this project provides

  1. A web portal where a user enters qTest username/password once.
  2. The backend exchanges those credentials for a qTest bearer token.
  3. The portal returns a personal MCP access token for AI tools.
  4. AI clients connect to this MCP server using the personal token.
  5. The MCP server exposes safe qTest tools only.
  6. Guardrails block destructive operations such as deleting projects, users, releases, test cases, test runs, requirements, modules, attachments, and cycles.

High-level architecture

User Browser
   |
   | HTTPS
   v
Token Portal / FastAPI
   |
   | qTest username/password used once
   v
qTest Auth API
   |
   | qTest bearer token
   v
Encrypted token store
   |
   | personal MCP token
   v
AI Chatbot / MCP Client
   |
   | Authorization: Bearer <personal_mcp_token>
   v
qTest MCP Server
   |
   | Guardrailed qTest API calls
   v
qTest Manager

Safe MCP tools included

  • qtest_list_projects
  • qtest_get_project
  • qtest_search_test_cases
  • qtest_get_test_case
  • qtest_create_test_case
  • qtest_update_test_case
  • qtest_search_requirements
  • qtest_update_requirement
  • qtest_list_requirement_test_cases
  • qtest_get_test_run
  • qtest_list_test_runs
  • qtest_get_defect
  • qtest_list_defects_changed_since
  • qtest_create_defect
  • qtest_create_defect_from_test_run
  • qtest_add_comment

Explicitly blocked

  • delete_project
  • delete_user
  • delete_test_case
  • delete_requirement
  • delete_test_run
  • delete_release
  • delete_cycle
  • delete_module
  • delete_attachment
  • bulk_delete
  • user/admin/permission modification

Local development

cp .env.example .env
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload

Portal:

http://localhost:8000/

MCP endpoint:

http://localhost:8000/mcp

Health:

http://localhost:8000/healthz
http://localhost:8000/readyz

MCP smoke test

Run a quick protocol check against the local MCP endpoint:

python scripts/mcp_smoke_test.py --base-url http://127.0.0.1:8000

Run authenticated checks using an existing personal MCP token:

python scripts/mcp_smoke_test.py --base-url http://127.0.0.1:8000 --token <personal_mcp_token>

Mint a personal token and run authenticated checks in one command:

python scripts/mcp_smoke_test.py --base-url http://127.0.0.1:8000 --username <qtest_username> --password <qtest_password>

Optionally test one tool call:

python scripts/mcp_smoke_test.py --base-url http://127.0.0.1:8000 --token <personal_mcp_token> --tool-name qtest_get_project --tool-args '{"project_id": 123}'

Generate a one-shot capability report (safe probes only):

python scripts/mcp_capability_report.py --base-url http://127.0.0.1:8000 --token <personal_mcp_token> --project-id <project_id>

Capability report with token minting and optional IDs:

python scripts/mcp_capability_report.py --base-url http://127.0.0.1:8000 --username <qtest_username> --password <qtest_password> --project-id <project_id> --test-run-id <test_run_id> --requirement-id <requirement_id> --defect-id <defect_id> --parent-id <cycle_or_suite_id>

Run mutation probes (create/update/comment) as well:

python scripts/mcp_capability_report.py --base-url http://127.0.0.1:8000 --token <personal_mcp_token> --project-id <project_id> --include-mutations

OpenShift deployment

oc new-project qtest-mcp
oc apply -f openshift/secret.yaml
oc apply -f openshift/configmap.yaml
oc apply -f openshift/deployment.yaml
oc apply -f openshift/service.yaml
oc apply -f openshift/route.yaml

Production hardening checklist

  • Use OpenShift TLS route.
  • Store encryption key in OpenShift Secret or external vault.
  • Replace SQLite with PostgreSQL.
  • Enable network policy to qTest domain only.
  • Enable structured logs and audit logs.
  • Rotate personal MCP tokens.
  • Add SSO/OIDC in front of the portal if available.
  • Use short-lived qTest tokens if your qTest tenant supports it.

推荐服务器

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

官方
精选