Stackexchange MCP Server

Search Stack Exchange questions, fetch Q&A threads as markdown, look up tag FAQs and user profiles.

Remote serverstreamable-httpPython

What is the Stackexchange MCP Server?

Search Stack Exchange questions, fetch Q&A threads as markdown, look up tag FAQs and user profiles.

What it actually does

  • Declarative tool definitions — single file per primitive, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Configuration

  • Bun v1.3.0 or higher (or Node.js v24+) - A STACKEXCHANGE_API_KEY is optional but strongly recommended for any sustained use

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
stackexchange_search_questionsSearch questions across a Stack Exchange site with full-text query, tag filters, score threshold, and sort order
stackexchange_get_threadFetch a complete Q&A thread — question body and all answers as clean markdown, accepted answer first
stackexchange_get_tag_faqFetch the highest-voted answered questions for a tag — the canonical "best answers in X" list
stackexchange_get_userFetch a user profile by ID: reputation, badge counts, top tags by answer score, and account metadata
stackexchange_list_sitesEnumerate all Stack Exchange network sites and their api_site_parameter values

How to install the Stackexchange MCP Server

{
  "mcpServers": {
    "stackexchange-mcp-server": {
      "type": "streamable-http",
      "url": "https://stackexchange.caseyjhand.com/mcp"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Bun v1.3.0 or higher (or Node.js v24+) - A STACKEXCHANGE_API_KEY is optional but strongly recommended for any sustained use
VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
STACKEXCHANGE_API_KEYCredential the server authenticates with.Yes
MCP_HTTP_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • “Use Stackexchange to stackexchange search questions.”
  • “Use Stackexchange to stackexchange get thread.”
  • “Use Stackexchange to stackexchange get tag faq.”

Frequently asked questions

Search Stack Exchange questions, fetch Q&A threads as markdown, look up tag FAQs and user profiles. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.