loading…
Search for a command to run...
loading…
MCP server for searching Stack Overflow questions and retrieving answers with body content, supporting advanced filters and multiple transport types.
MCP server for searching Stack Overflow questions and retrieving answers with body content, supporting advanced filters and multiple transport types.
A Model Context Protocol (MCP) server that provides comprehensive tools for interacting with Stack Overflow through the Stack Exchange API. This server enables AI assistants to search questions, get detailed answers, and explore Stack Overflow content through a standardized interface.
License: MIT Python 3.11+ FastMCP
uvx stack-overflow-mcp-light
uv add stack-overflow-mcp-light
uv run stack-overflow-mcp-light
pip install stack-overflow-mcp-light
stack-overflow-mcp-light
STACK_EXCHANGE_API_KEY (Optional): Stack Exchange API key for increased rate limits. Get one at Stack AppsSTACK_OVERFLOW_MCP_SHOW_LOGS (Optional): Set to "true" to enable detailed logging💡 API Key: While optional, an API key significantly increases your rate limits from 300 to 10,000 requests per day.
stdio (default) - Standard input/output, client launches server automaticallyhttp (recommended for remote) - Modern HTTP transport (aliases: streamable-http, streamable_http)sse (legacy) - Server-Sent Events transport (deprecated){
"mcpServers": {
"stack-overflow": {
"command": "uvx",
"args": ["--no-progress", "stack-overflow-mcp-light"],
"env": {
"STACK_EXCHANGE_API_KEY": "your_api_key_here",
"STACK_OVERFLOW_MCP_SHOW_LOGS": "false"
}
}
}
}
Start server:
export STACK_EXCHANGE_API_KEY="your_api_key_here"
uvx --no-progress stack-overflow-mcp-light --transport http --port 8000 --host 0.0.0.0
Client config:
{
"mcpServers": {
"stack-overflow": {
"url": "http://localhost:8000/mcp",
"transport": "http"
}
}
}
Start server:
export STACK_EXCHANGE_API_KEY="your_api_key_here"
uvx --no-progress stack-overflow-mcp-light --transport sse --port 8000 --host 0.0.0.0
Client config:
{
"mcpServers": {
"stack-overflow": {
"url": "http://localhost:8000/sse",
"transport": "sse"
}
}
}
uv run --with{
"mcpServers": {
"stack-overflow": {
"command": "uv",
"args": ["run", "--with", "stack-overflow-mcp-light", "stack-overflow-mcp-light"],
"env": {
"STACK_EXCHANGE_API_KEY": "your_api_key_here",
"STACK_OVERFLOW_MCP_SHOW_LOGS": "false"
}
}
}
}
uv run --directory (Local Development){
"mcpServers": {
"stack-overflow": {
"command": "uv",
"args": ["run", "--directory", "/path/to/stack-overflow-mcp-light", "stack-overflow-mcp-light"],
"env": {
"STACK_EXCHANGE_API_KEY": "your_api_key_here",
"STACK_OVERFLOW_MCP_SHOW_LOGS": "true"
}
}
}
}
pip Install{
"mcpServers": {
"stack-overflow": {
"command": "stack-overflow-mcp-light",
"args": [],
"env": {
"STACK_EXCHANGE_API_KEY": "your_api_key_here",
"STACK_OVERFLOW_MCP_SHOW_LOGS": "false"
}
}
}
}
All transport types can use these alternative commands:
# Using uv run --with
export STACK_EXCHANGE_API_KEY="your_api_key_here"
uv run --with stack-overflow-mcp-light stack-overflow-mcp-light --transport http --port 8000
# Using uv run --directory (local development)
export STACK_EXCHANGE_API_KEY="your_api_key_here"
cd /path/to/stack-overflow-mcp-light
uv run stack-overflow-mcp-light --transport http --port 8000
# Using pip install
export STACK_EXCHANGE_API_KEY="your_api_key_here"
stack-overflow-mcp-light --transport http --port 8000
search_questionsSearch Stack Overflow questions with advanced filters.
q - Free-form text searchtagged - Semi-colon delimited list of tagsintitle - Search in question titlesnottagged - Exclude these tagsbody - Text in question bodyaccepted - Has accepted answer (boolean)closed - Question is closed (boolean)answers - Minimum number of answersviews - Minimum view countsort - Sort criteria ("activity", "votes", "creation", "hot", "week", "month", "relevance")order - Sort order ("asc" or "desc")page - Page number (1-25)page_size - Items per page (1-100)question_id - Question IDis_answered - Whether the question has answersscore - Question scorelink - Link to the questiontitle - Question titlefetch_question_answersFetch a specific question, always including answers with body content sorted by the specified criteria.
question_id - Question ID (required)sort - Answer sort criteria ("activity", "votes", "creation") - defaults to "votes"order - Sort order ("asc" or "desc") - defaults to "desc"page_size - Maximum number of answers to return (1-100) - defaults to 30question_id - Question IDis_answered - Whether the question has answersscore - Question scorelink - Link to the questiontitle - Question titleanswers - Array of AnswerItem objects with:answer_id - Answer IDis_accepted - Whether the answer is acceptedscore - Answer scorebody - Answer body contentsearch_questions_by_tagSearch questions that have a specific tag.
tag (tag name), sort, order, page, page_sizequestion_id - Question IDis_answered - Whether the question has answersscore - Question scorelink - Link to the questiontitle - Question titleThe project includes comprehensive tests covering all tools:
# Run all tests
make test
# Run with coverage
make test-cov
# Run specific test categories
uv run pytest tests/test_server.py::TestQuestionTools -v
# Clone the repository
git clone https://github.com/midodimori/stack-overflow-mcp-light.git
cd stack-overflow-mcp-light
# Install with development dependencies
make install-dev
# Run tests
make test
# Format and lint code
make format
# Check code style and types
make lint
# Run the server locally
make run
# See all available commands
make help
stack-overflow-mcp-light/
├── src/stack_overflow_mcp_light/
│ ├── __init__.py
│ ├── server.py # MCP server implementation
│ ├── logging_config.py # Logging configuration
│ ├── models/ # Pydantic models
│ │ ├── __init__.py
│ │ ├── requests.py # Request models
│ │ └── responses.py # Response models
│ └── tools/ # Tool implementations
│ ├── __init__.py
│ ├── base_client.py # Base client for Stack Exchange API
│ └── questions.py # Question search and retrieval tools
├── tests/
│ ├── test_server.py # Tool function tests
│ └── test_mcp_integration.py # MCP integration tests
├── pyproject.toml # Project configuration
└── README.md
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
This software is provided for educational and informational purposes only. This tool interacts with Stack Overflow's public API and respects their rate limits and terms of service. The authors are not responsible for any misuse of the Stack Exchange API or violation of their terms of service.
For questions, issues, or contributions:
Выполни в терминале:
claude mcp add stack-overflow-mcp-light -- npx Да, Stack Overflow Light MCP бесплатный — установка в один клик через Unyly без оплаты.
Нет, Stack Overflow Light работает без API-ключей и переменных окружения.
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Открой Stack Overflow Light на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.