Skip to main content
Glama
stackexchange-mcp

stackexchange-mcp

by YashLimbani

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SE_DEFAULT_SITENoSite used when a tool call does not specify one.stackoverflow
SE_MAX_BODY_CHARSNoMaximum characters of any question or answer body returned.2000
STACKEXCHANGE_KEYNoStack Exchange API key. Raises the daily quota. Optional; the server works without a key but with a smaller anonymous quota.
SE_CACHE_TTL_SECONDSNoHow long identical requests are cached (0 disables caching).300

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Search Stack Overflow and other Stack Exchange sites for questions and answers. Use search_by_error_message when the user pastes an error, otherwise search_questions; then get_question to read a question with its best answers. Use search_tags to find exact tag names and get_tag_overview to learn about a technology. Always cite the returned links. Content is licensed CC BY-SA, so keep the author and link when quoting.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_questionsA

Search Stack Overflow (or another Stack Exchange site) for questions about a topic.

Use this to find existing discussions and solutions. It returns short summaries (title, score, tags, link), not full text. To read a question and its answers, pass a question_id from the results to get_question.

get_questionA

Read one question in full, together with its best answers.

The question and answer bodies are returned as Markdown with code blocks preserved. Long posts are truncated and end with a link to the full text. Each item includes its author, link and license, so cite them when you use the content.

get_quota_statusA

Show the remaining Stack Exchange API quota and any active rate-limit wait.

Call this if requests start failing, or before a large batch of searches.

search_by_error_messageA

Find Stack Overflow discussions that match an error message or stack trace.

Use this when the user pastes an error. The tool picks the most informative line and strips file paths, line numbers and memory addresses before searching; the query it actually used is returned as cleaned_query. Adding a language tag helps. Use get_question on a promising result to read the answers.

search_tagsA

Find valid tag names containing some text, most popular first.

Use this before filtering other searches by tag, so you use tags that really exist instead of guessing (for example 'python-asyncio', not 'asyncio-python').

get_tag_overviewA

Get a short description of a tag (a technology or topic) and its most-voted questions.

Use this to get oriented on an unfamiliar technology: it returns the tag's summary, how many questions use it, and the classic high-vote questions with links.

Prompts

Interactive templates invoked by user choice

NameDescription
debug_errorDebug an error using Stack Overflow: search, read the best threads, explain the fix.
compare_approachesCompare two approaches using highly-voted Stack Overflow discussions.
tag_primerBuild a beginner-friendly overview of a technology from its Stack Overflow tag.

Resources

Contextual data attached and managed by the client

NameDescription
sites_resourceList of Stack Exchange sites and the slug to pass as the `site` parameter.
search_tips_resourceGuidance on writing effective searches and using tags.
quota_resourceLive snapshot of the remaining API quota.

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation4/5

The set is mostly distinct: search_questions and search_by_error_message are the only close pair, but the error-specific input and cleaned_query output make the boundary clear. get_question, search_tags, get_tag_overview, and get_quota_status each serve a separate stage of discovery, retrieval, or runtime awareness.

Naming Consistency5/5

All tool names use snake_case with a consistent verb_noun shape such as search_questions, get_question, and get_tag_overview. search_by_error_message is slightly longer but still follows the same readable convention.

Tool Count5/5

Six tools is well scoped for a read-only Stack Exchange client. Each tool earns its place by covering a distinct workflow, and the set avoids unnecessary redundancy.

Completeness4/5

The surface covers discovery, full question and answer retrieval, tag lookup, and quota awareness. Minor gaps remain around explicit site discovery or fetching a single answer by ID, but get_question and search_tags cover the primary workflows.