
Stackexchange Mcp
io.github.YashLimbaniPublished by GitHub account YashLimbaniv0.1.0Updated Nov 7, 2026
An MCP server that provides [describe what your server does]
Overview
Read-only MCP server that lets an assistant search Stack Overflow and other Stack Exchange sites and read questions with their best answers.
- What you can do
- Search questions by topic, tag, site, sort order or accepted-answer filter
- Read a single question with its best answers, accepted answer first
- Search threads for a pasted error message or stack trace, with paths and addresses stripped
- Look up exact tag names and get a tag overview with question counts and top-voted questions
- Check remaining API quota and any active rate-limit wait
- Expose site slugs, search tips and a quota snapshot as resources, plus debug, comparison and tag-primer prompts
- When to use it
- Useful when you want debugging help or technical explanations grounded in real, voted Stack Overflow answers rather than model guesses, for example pasting a traceback, comparing two approaches, or getting a primer on an unfamiliar technology tag.
- Requirements
- Runs locally over stdio from the PyPI package stackexchange-mcp, launched with uvx, so uv must be installed. An optional Stack Exchange API key is passed as STACKEXCHANGE_KEY; without it the anonymous quota is much smaller. Optional settings cover default site, cache TTL and maximum body length. Network access to the Stack Exchange API is required.
Installation
In SourceWeft
- Open Stackexchange Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
stackexchange-mcp
An MCP server that lets your AI assistant search Stack Overflow and other Stack Exchange sites, read questions with their best answers, and ground its debugging help in real, voted answers instead of guessing.
- Read-only: it never posts, votes or edits anything.
- Model-friendly output: short summaries, Markdown instead of HTML, code blocks preserved, long posts truncated with a link.
- Respects the API: optional API key, backoff handling, request spacing, retries, caching and quota tracking.
- Clear errors: every failure tells the model what happened and what to try next.
Not affiliated with Stack Exchange, Inc. Content returned by the API is licensed CC BY-SA (3.0 or 4.0 depending on the post). The server returns the author, link and license so assistants can attribute it.
What it provides
[project] name = "mcp-server" version = "0.1.0" requires-python = ">=3.12" dependencies = [ "httpx>=0.28.1", "mcp[cli]>=1.0,<2", "pydantic>=2.14.2", ]
[dependency-groups] dev = [ "pytest>=9.2.0", ]
Tools
Resources
Prompts
Quick start
1. Get a free API key (recommended)
The server works without a key, but the anonymous quota is small: the API reported 300 requests per day without a key and 10,000 with one. Register an app on Stack Apps to get a key; you do not need OAuth for read-only use.
2. Install
You need uv. The server runs straight from PyPI:
(That starts a stdio server and waits; you normally let your AI app launch it using one of the configs below.)
3. Connect your AI app
Use the full path to uvx if your app cannot find it (which uvx).
VS Code (GitHub Copilot, Agent mode) - .vscode/mcp.json:
Antigravity CLI - .agents/mcp_config.json in your project (or ~/.gemini/config/mcp_config.json globally):
Start agy and run /mcp to confirm it is connected.
Claude Code:
Claude Desktop (macOS/Windows) and Cursor - same JSON shape as Antigravity (mcpServers), in claude_desktop_config.json or ~/.cursor/mcp.json.
Keep your key out of files you commit.
Configuration
Rate limits and errors
- Identical requests within the cache window cost no quota.
- If the API sends a
backoffvalue, the server waits it out (up to 10 seconds) before the next call; longer waits are reported instead of blocking. - Requests are spaced at least 0.2 seconds apart.
- Timeouts, network errors and 5xx responses are retried twice with exponential delay (0.5 s, then 1 s).
- When the daily quota is exhausted the server stops calling the API until the next UTC day.
The API key is never written to logs or error messages.
Example prompts
You do not need to name a tool. Things that should make the assistant use this server:
- "What's the difference between
asyncio.sleepandtime.sleep? Check Stack Overflow." - "I get
AttributeError: 'NoneType' object has no attribute 'foo'- find help on Stack Overflow." (paste the traceback) - "Is there a Stack Overflow tag for testing async code with pytest?"
- "I'm new to python-asyncio. Give me an overview from Stack Overflow."
- "Find recent discussions about Docker networking on Server Fault."
Tested with
Results for each prompt are in TESTING.md.
- Antigravity CLI: connects and lists all 6 tools. In a 10-prompt run, the model picked the expected tool without being told its name in 9 of 10 prompts (one prompt still needs a re-run) and chose sensible arguments such as
site,sortandaccepted_only. It correctly used no tool for an unrelated question. - VS Code (Copilot Agent mode): the server starts and 6 tools are discovered; tool-call results are not recorded yet.
- MCP Inspector: connects and lists the server's tools (re-check all resources and prompts before release).
Troubleshooting
- Server "anonymous (low quota)" in the log: the key did not reach the server. Put
STACKEXCHANGE_KEYin theenvblock of your client's config. - Command not found: use the absolute path of
uvxin the config. - VS Code shows no tools: use a normal Copilot Agent mode chat session in a workspace that contains
.vscode/mcp.json; some session types keep their own separate server list. - The assistant never calls a tool: ask it explicitly once ("search Stack Overflow for ...") and check the tool list in your client.
- Logs: the server writes logs to stderr (never stdout, which carries the protocol). In VS Code, open the Output panel and choose the server.
Development
Tests need no network: the API is mocked using real saved responses in samples/. See DESIGN.md for the design and CONTRIBUTING.md for how to help.
License
MIT for the code (see LICENSE). Stack Exchange content is CC BY-SA; attribute the author and link when you reuse it.
Source: README.md at commit b9bce4a
Tools
0Version history
1- v0.1.0LatestNov 7, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts