Issue Fix
БесплатноНе проверенA Model Context Protocol server that enables coding agents to search for and record software issue fixes with semantic search using natural language queries.
Описание
A Model Context Protocol server that enables coding agents to search for and record software issue fixes with semantic search using natural language queries.
README
A Model Context Protocol (MCP) server that enables coding agents to search for and record software issue fixes with semantic search capabilities. Issues are stored with embeddings for intelligent similarity-based retrieval using natural language queries.
Features
- Semantic Search: Find similar issues using natural language queries powered by local embeddings
- Local Embeddings: Uses sentence-transformers (all-MiniLM-L6-v2) for 100% local operation - no API keys needed
- Vector Search: Leverages PostgreSQL with pgvector extension for efficient similarity search
- Rich Issue Data: Track title, description, language, project, error messages, recreation steps, and fixes
- Full CRUD Operations: Create, read, update, delete, list, and search issue records
- Filter Support: Filter searches and lists by programming language or project identifier
Architecture
- Language: Python
- Database: PostgreSQL with pgvector extension
- Embeddings: Local sentence-transformers (384-dimensional vectors)
- MCP SDK: Official Anthropic MCP Python SDK
Prerequisites
- Python 3.8 or higher
- PostgreSQL 12 or higher with pgvector extension
- At least 500MB free disk space (for embedding model)
Installation
1. Clone the Repository
git clone <repository-url>
cd issue-fix-mcp
2. Install Python Dependencies
pip install -r requirements.txt
On first run, sentence-transformers will download the embedding model (~90MB).
3. Set Up PostgreSQL
Install PostgreSQL if not already installed:
# Ubuntu/Debian
sudo apt-get install postgresql postgresql-contrib
# macOS
brew install postgresql
# Start PostgreSQL service
sudo service postgresql start # Linux
brew services start postgresql # macOS
4. Install pgvector Extension
# Ubuntu/Debian
sudo apt-get install postgresql-14-pgvector
# macOS
brew install pgvector
# Or build from source
git clone https://github.com/pgvector/pgvector.git
cd pgvector
make
sudo make install
5. Create Database
# Connect to PostgreSQL
sudo -u postgres psql
# Create database and user
CREATE DATABASE issue_fixes;
CREATE USER issue_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE issue_fixes TO issue_user;
\q
6. Configure Environment
Copy the example environment file and update with your database credentials:
cp .env.example .env
Edit .env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=issue_fixes
DB_USER=issue_user
DB_PASSWORD=your_secure_password
EMBEDDING_MODEL=all-MiniLM-L6-v2
7. Initialize Database Schema
The schema will be automatically initialized on first run, or you can manually run:
psql -U issue_user -d issue_fixes -f schema.sql
Usage
Running the Server
The MCP server runs via stdio transport:
python server.py
Connecting from Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"issue-fix": {
"command": "python",
"args": ["/absolute/path/to/issue-fix-mcp/server.py"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "issue_fixes",
"DB_USER": "issue_user",
"DB_PASSWORD": "your_password"
}
}
}
}
Restart Claude Desktop after configuration.
Available Tools
1. create_issue
Create a new issue fix record with automatic embedding generation.
Parameters:
title(required): Brief title of the issueissue_description(required): Detailed descriptionlanguage(optional): Programming language (e.g., "Python", "JavaScript")project_identifier(optional): Project name or identifiererror_message(optional): Error message textrecreation_steps(optional): Steps to recreate the issuefix_description(optional): Description of the fix/solution
Example:
Create an issue fix record:
- Title: "TypeError when parsing JSON with null values"
- Description: "Application crashes when API returns JSON with null fields"
- Language: "Python"
- Project: "api-client"
- Error: "TypeError: 'NoneType' object is not subscriptable"
- Fix: "Added null checks before accessing dictionary keys"
2. search_issues
Semantically search for similar issues using natural language.
Parameters:
query(required): Natural language search querylimit(optional): Maximum results (default: 10)language(optional): Filter by programming languageproject_identifier(optional): Filter by project
Example:
Search for issues about: "JSON parsing errors with null values in Python"
3. get_issue
Retrieve a specific issue by ID.
Parameters:
issue_id(required): The issue ID number
Example:
Get issue #42
4. update_issue
Update an existing issue record. Automatically regenerates embeddings if searchable fields change.
Parameters:
issue_id(required): The issue ID to update- Any other field from create_issue (all optional)
Example:
Update issue #42 with a better fix description:
"Added comprehensive null checks and default values for all optional fields"
5. delete_issue
Permanently delete an issue record.
Parameters:
issue_id(required): The issue ID to delete
Example:
Delete issue #42
6. list_issues
List all issues with optional filtering.
Parameters:
language(optional): Filter by programming languageproject_identifier(optional): Filter by projectlimit(optional): Maximum results (default: 100)offset(optional): Number of results to skip (default: 0)
Example:
List all Python issues in the api-client project
How Semantic Search Works
Embedding Generation: When creating/updating an issue, the system generates a 384-dimensional vector embedding from the combined text of:
- Title (weighted 2x)
- Issue description
- Error message (weighted 2x)
- Fix description
Query Processing: Search queries are converted to embeddings using the same model
Similarity Matching: PostgreSQL's pgvector performs cosine similarity search to find the most relevant issues
Ranking: Results are ranked by similarity score (0-100%)
Database Schema
CREATE TABLE issues (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
issue_description TEXT NOT NULL,
language TEXT,
project_identifier TEXT,
error_message TEXT,
recreation_steps TEXT,
fix_description TEXT,
embedding vector(384),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Performance Notes
- First Run: The embedding model (~90MB) downloads automatically on first use
- Embedding Speed: ~50-100ms per issue on modern CPUs
- Search Speed: Sub-100ms for databases with <100k issues
- Storage: ~500 bytes per issue (plus embedding vector)
Troubleshooting
"pgvector extension not found"
# Install pgvector extension
sudo apt-get install postgresql-14-pgvector
# Then reconnect to database and run:
CREATE EXTENSION vector;
"Connection refused" errors
- Ensure PostgreSQL is running:
sudo service postgresql status - Check database credentials in
.env - Verify database exists:
psql -l
Slow embedding generation
- First run downloads the model (~90MB)
- CPU-only inference is normal; GPU not required
- Subsequent runs use cached model
Import errors
# Reinstall dependencies
pip install --upgrade -r requirements.txt
Development
Project Structure
issue-fix-mcp/
├── server.py # Main MCP server implementation
├── database.py # Database operations layer
├── embeddings.py # Local embedding service
├── config.py # Configuration management
├── schema.sql # Database schema
├── requirements.txt # Python dependencies
├── .env.example # Environment template
└── README.md # This file
Adding New Features
- New fields: Update
schema.sql,database.py, andserver.py - Different embedding model: Change
EMBEDDING_MODELin.env(must match vector dimension) - Custom search logic: Modify
DatabaseService.search_issues()indatabase.py
Testing
The project includes a comprehensive test suite with >90% code coverage.
Running Tests
# Quick verification
python verify_tests.py
# Run all tests
pytest
# Run with coverage
pytest --cov
# Run with coverage report
make test-cov
# Use interactive test runner
./run_tests.sh -v -c
Test Suite
- 65 unit tests across 4 test files
- 100% mocked dependencies - no external services required
- Fast execution - full suite runs in <10 seconds
- CI/CD integration - automated testing on push/PR
Test Coverage
| Module | Coverage Target |
|---|---|
| config.py | 100% |
| embeddings.py | >95% |
| database.py | >90% |
| server.py | >85% |
| Overall | >90% |
Documentation
- TESTING.md - Comprehensive testing guide
- TEST_SUMMARY.md - Test suite overview and metrics
See TESTING.md for detailed testing documentation.
License
MIT License - See LICENSE file for details
Contributing
Contributions welcome! Please open an issue or pull request.
Support
For issues and questions:
- Open a GitHub issue
- Check existing issues for solutions
- Review PostgreSQL and pgvector documentation
Установка Issue Fix
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/ehartye/issue-fix-mcpFAQ
Issue Fix MCP бесплатный?
Да, Issue Fix MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Issue Fix?
Нет, Issue Fix работает без API-ключей и переменных окружения.
Issue Fix — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Issue Fix в Claude Desktop, Claude Code или Cursor?
Открой Issue Fix на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Issue Fix with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
