bug_report_tool
MCP server that converts informal issue descriptions into structured, developer-ready bug reports using Groq, with automatic classification into bug, feature request, question, or unclear. Enables agents to generate bug reports directly without the web form.
README
AI Bug Report Generator
Converts an informal issue description into a structured, developer-ready bug report. A classification step runs first, so feature requests and questions aren't forced into fake bug reports with fabricated severity or reproduction steps. The core logic is exposed two ways: a REST API for the human-facing web form, and an MCP tool for agent callers.
What you need before starting
- Python 3.10+
- Node.js 18+ and npm
- A Groq API key — required. Get one free at https://console.groq.com/keys (sign up, go to "API Keys", create a new key, no credit card, ~2 minutes). Without this key the backend will not start.
- Docker Desktop (optional, only if running via Docker Compose) — https://www.docker.com/products/docker-desktop/
Project structure
bug_report/
├── backend/
│ ├── main.py FastAPI REST endpoint (/api/generate)
│ ├── mcp_server.py MCP tool, same logic, for agent callers
│ ├── groq_client.py Single Groq call shared by both interfaces
│ ├── schema.py Pydantic schema — shared response shape
│ ├── Dockerfile Container build for the backend
│ ├── .env Your Groq API key goes here (you create this)
│ └── .env.example Template for the above
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── components/
│ │ │ ├── ReportEditor.jsx
│ │ │ └── ExportPreview.jsx
│ │ └── lib/api.js
│ ├── Dockerfile Container build for the frontend
│ └── package.json
├── docker-compose.yml
├── .dockerignore
├── requirements.txt
└── README.md
Option A: Run locally (Python + Node)
1. Backend setup
Open a terminal in the project root.
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r ..\requirements.txt
Create your .env file:
copy .env.example .env
Open backend\.env in a text editor and paste in your key:
GROQ_API_KEY=your_actual_key_here
Start the backend:
uvicorn main:app --reload --port 8000
Leave this terminal running. You should see Application startup complete. Confirm it's up by visiting http://localhost:8000/health in a browser — it should return {"status":"ok"}.
2. Frontend setup
Open a second terminal in the project root.
cd frontend
npm install
npm run dev
Open http://localhost:5173 in your browser. The backend must already be running (step 1) for report generation to work.
3. (Optional) MCP server, for agent access
The MCP server exposes the same bug-report logic as a tool other agents (Claude Desktop, MCP Inspector, etc.) can call directly, without going through the web form.
cd backend
venv\Scripts\activate
python mcp_server.py
To test it with MCP Inspector:
npx @modelcontextprotocol/inspector
In the Inspector UI: Transport Type STDIO, Command python, Arguments mcp_server.py, then click Connect.
Option B: Run with Docker
Requires Docker Desktop installed and running.
1. Add your API key. Docker Compose reads it from backend/.env, this file is not included in the repo (it's gitignored for security). Create it before starting:
cd backend
copy .env.example .env
Edit backend\.env and paste in your key:
GROQ_API_KEY=your_actual_key_here
2. Build and start both services from the project root:
cd ..
docker compose up --build
First run takes a few minutes while images build. Watch the logs for Uvicorn running on http://0.0.0.0:8000 from the backend service with no errors.
3. Verify:
- http://localhost:8000/health → should return
{"status":"ok"} - http://localhost:5173 → app UI, submit a test description end to end
4. Stop:
Ctrl+C
docker compose down
Environment variables reference
| Variable | Required | Where | Description |
|---|---|---|---|
GROQ_API_KEY |
Yes | backend/.env |
Your Groq API key. The app calls llama-3.3-70b-versatile via Groq's chat completions API. Never committed to the repo, both local and Docker setups require you to supply your own. |
No other environment variables or API keys are needed.
Guardrails implemented
- Classification gate: every input is classified as
bug,feature_request,question, orunclearbefore any bug-specific fields are generated. Onlybuggets severity, priority, and repro steps populated. - Structured output enforced: Groq's
response_format: json_objectkeeps the model's output inside the expected schema. - Instruction isolation: the system prompt explicitly states user input cannot override its rules (basic prompt-injection guard).
- Input floor: descriptions under 10 characters are rejected before an API call is made.
Troubleshooting
KeyError: 'GROQ_API_KEY'on startup: your.envfile is missing or not inbackend/, or the key name is misspelled.TypeError: Client.__init__() got an unexpected keyword argument 'proxies': version mismatch betweengroqandhttpx. Runpip install --upgrade groqinside the activated venv.- Frontend shows a network error: confirm the backend is running on port 8000 and
frontend/src/lib/api.jspoints tohttp://localhost:8000. - CORS error in browser console: confirm the frontend is running on port 5173 (
main.py's CORS config only allows that origin by default). - Docker build fails or hangs: confirm Docker Desktop is fully started (steady whale icon, not animating) before running
docker compose up. - Docker backend container exits immediately: almost always a missing or empty
backend/.env, see Option B step 1.
Roadmap
- Screenshot analysis via a vision-capable Groq model
- Log file analysis and stack trace correlation
- Duplicate bug detection via embedding similarity
- Trace-to-code mapping (agentic repository search)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。