Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

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.md

Issue Fix MCP Server

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 issue
  • issue_description (required): Detailed description
  • language (optional): Programming language (e.g., "Python", "JavaScript")
  • project_identifier (optional): Project name or identifier
  • error_message (optional): Error message text
  • recreation_steps (optional): Steps to recreate the issue
  • fix_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 query
- `limit` (optional): Maximum results (default: 10)
- `language` (optional): Filter by programming language
- `project_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 language
  • project_identifier (optional): Filter by project
  • limit (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

  1. 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
  1. Query Processing: Search queries are converted to embeddings using the same model
  1. Similarity Matching: PostgreSQL's pgvector performs cosine similarity search to find the most relevant issues
  1. 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

  1. New fields: Update schema.sql, database.py, and server.py
  2. Different embedding model: Change EMBEDDING_MODEL in .env (must match vector dimension)
  3. Custom search logic: Modify DatabaseService.search_issues() in database.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

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.