Stack Over MCP

Stack Over MCP

Provides LLMs with tools to search Stack Overflow for programming solutions, helping ground responses in real-world code examples.

Category
Visit Server

README

Stack Over MCP

An MCP (Model Context Protocol) server that provides LLMs with tools to search Stack Overflow for programming solutions, helping ground responses in real-world code examples and reduce hallucinations.

Features

  • Smart Search: Search Stack Overflow questions with customizable filters
  • Detailed Question Analysis: Get complete question details with all answers
  • Tag-Based Discovery: Find popular solutions by programming language/framework
  • Real-time Results: Direct access to Stack Overflow's API
  • Rich Metadata: Scores, view counts, acceptance status, and more

Installation

  1. Clone and setup the project:

    cd stack-over-mcp
    python -m venv venv
    # On Windows:
    venv\Scripts\activate
    # On macOS/Linux:
    source venv/bin/activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Usage

Running the MCP Server

python main.py

The server will start and provide three main tools:

1. search_stackoverflow

Search Stack Overflow questions with flexible filtering:

# Basic search
search_stackoverflow("python list comprehension")

# Advanced search with filters
search_stackoverflow(
    query="react hooks error",
    limit=5,
    sort="votes",
    tags=["javascript", "react"],
    accepted_only=True
)

Parameters:

  • query: Search terms
  • limit: Max results (1-100, default: 10)
  • sort: "relevance", "activity", "votes", or "creation"
  • tags: Filter by programming tags
  • accepted_only: Only questions with accepted answers

2. get_question_details

Get complete information about a specific question:

# Get question with all answers
get_question_details(question_id=12345678)

# Get just question metadata
get_question_details(question_id=12345678, include_answers=False)

3. search_by_tags

Find popular questions by technology tags:

# Find top Python questions
search_by_tags(tags=["python"], sort="votes", min_score=10)

# Find recent React + TypeScript questions
search_by_tags(
    tags=["javascript", "react", "typescript"],
    sort="activity",
    limit=5
)

Integration with MCP Clients

This server is designed to work with MCP-compatible clients like Claude Desktop. Add it to your MCP configuration:

{
  "mcpServers": {
    "stack-over-mcp": {
      "command": "python",
      "args": ["path/to/stack-over-mcp/main.py"]
    }
  }
}

Use Cases

  • Debugging: Find solutions to specific error messages
  • Learning: Discover best practices and common patterns
  • Code Review: Validate approaches against community solutions
  • Architecture: Find proven solutions for complex problems
  • API Usage: Get real examples of library/framework usage

API Rate Limits

The Stack Overflow API has rate limits:

  • Unauthenticated: 300 requests per day per IP
  • Authenticated: 10,000 requests per day (requires API key)

For production use, consider implementing API key authentication in stack_api.py.

Project Structure

stack-over-mcp/
├── main.py          # FastMCP server with tool definitions
├── stack_api.py     # Stack Overflow API client
├── requirements.txt # Python dependencies
└── README.md        # This file

Contributing

Feel free to enhance the server with additional features:

  • API key authentication for higher rate limits
  • Caching for frequently requested questions
  • Advanced filtering options
  • Support for other Stack Exchange sites

License

This project is open source and available under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured