Skip to main content
Glama

stackexchange-mcp-server

Server Details

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

Status
Healthy
Last Tested
Transport
Streamable HTTP
URL
Repository
cyanheads/stackexchange-mcp-server
GitHub Stars
1

Glama MCP Gateway

Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.

MCP client
Glama
MCP server

Full call logging

Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.

Tool access control

Enable or disable individual tools per connector, so you decide what your agents can and cannot do.

Managed credentials

Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.

Usage analytics

See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.

100% free. Your data is private.
Tool DescriptionsA

Average 4.4/5 across 5 of 5 tools scored.

Server CoherenceA
Disambiguation5/5

Each tool targets a distinct functionality: tag FAQ, thread retrieval, user profile, site listing, and search. No two tools overlap in purpose, and cross-references are clearly documented.

Naming Consistency5/5

All tools follow a consistent 'stackexchange_verb_noun' pattern with snake_case. Verbs are descriptive and nouns reflect the resource (e.g., get_thread, list_sites).

Tool Count5/5

With 5 tools, the server is tightly scoped to core Stack Exchange read operations. Each tool serves a necessary role without unnecessary duplication.

Completeness4/5

The set covers all major read actions: site discovery, search, tag-based FAQ, full thread retrieval, and user info. Missing operations like user question lists or comment retrieval are minor gaps for typical agent tasks.

Available Tools

5 tools
stackexchange_get_tag_faqGet Stack Exchange Tag FAQA
Read-onlyIdempotent
Inspect

Fetch the highest-voted answered questions for a tag on a Stack Exchange site — the canonical "best answers in X" list. Returns a question list without bodies; use stackexchange_get_thread to read the full body and answers for any result. Use this tool to find the authoritative community resources on a topic (e.g. tag "javascript" on stackoverflow). Use stackexchange_search_questions for free-text search rather than tag-based browsing.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagYesTag to look up (e.g. "python", "javascript", "docker"). Must match exactly.
siteNoStack Exchange site — use the api_site_parameter value (e.g. "stackoverflow", "superuser"). Defaults to "stackoverflow". Call stackexchange_list_sites to discover valid values.stackoverflow
pageSizeNoNumber of results to return (1–30, default 10).

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe pageSize cap applied to this request.
tagYesTag name used for this FAQ lookup.
siteYesStack Exchange site api_site_parameter used for this lookup.
shownNoNumber of results returned.
noticeNoActionable guidance when results are empty or filtered.
quotaMaxYesMaximum API quota calls per day (300 keyless, ~10,000 with API key).
questionsYesHighest-voted answered questions for the specified tag, ordered by votes.
truncatedNoTrue when results were capped at pageSize.
attributionYesContent license notice. Stack Exchange content is licensed under CC BY-SA 4.0 and requires attribution.
quotaRemainingYesRemaining API quota calls for the current day.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint and idempotentHint. Description adds that the result is a question list without bodies and directs to another tool for full content. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Has output schema, so return format not needed. Description explains that bodies are excluded, covers parameters via schema, and points to other tools. Adequate for the complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds minimal extra value beyond schema definitions (e.g., suggests stackexchange_list_sites for 'site' parameter).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch' and resource 'highest-voted answered questions for a tag', and distinguishes from sibling tools like stackexchange_search_questions for free-text search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (find authoritative community resources) and when not to (use stackexchange_search_questions for free-text), and suggests stackexchange_get_thread for reading full bodies/answers.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stackexchange_get_threadGet Stack Exchange Q&A ThreadA
Read-onlyIdempotent
Inspect

Fetch a complete Q&A thread — question body and all answers, accepted answer first then sorted by score, rendered as clean markdown with fenced code blocks. Accepts an integer question ID or a full Stack Exchange question URL (e.g. "https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster" or "11227809"). HTML is normalized to markdown automatically; attribution (author + link) included per CC BY-SA 4.0. Get question IDs from stackexchange_search_questions or stackexchange_get_tag_faq.

ParametersJSON Schema
NameRequiredDescriptionDefault
siteNoStack Exchange site — use the api_site_parameter value (e.g. "stackoverflow", "superuser"). Defaults to "stackoverflow". Must match the site where the question lives. Call stackexchange_list_sites to discover valid values.stackoverflow
maxAnswersNoMaximum number of answers to include (1–100, default 10). Answers are sorted: accepted first, then by score.
questionIdOrUrlYesNumeric question ID (e.g. "11227809") or a full Stack Exchange question URL (e.g. "https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster"). The integer immediately following /questions/ is extracted from URLs.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe maxAnswers cap applied to this request.
linkYesDirect URL to the question.
tagsYesTags applied to this question.
scoreYesQuestion score (upvotes minus downvotes).
shownNoNumber of answers returned.
titleYesQuestion title.
answersYesAnswers sorted: accepted answer first, then by score descending.
quotaMaxYesMaximum API quota calls per day (300 keyless, ~10,000 with API key).
truncatedNoTrue when answers were capped at maxAnswers.
authorLinkNoQuestion author profile URL when available.
authorNameNoQuestion author display name when available.
questionIdYesNumeric question ID — identifies this thread on the site.
answerCountNoTotal answers the question has upstream. When greater than the returned answers[] length, more answers exist — raise maxAnswers to fetch them.
authorUserIdNoQuestion author numeric user ID when available — pass to stackexchange_get_user to fetch the full profile.
bodyMarkdownYesQuestion body normalized from HTML to markdown.
quotaRemainingYesRemaining API quota calls for the current day.
acceptedAnswerIdNoID of the accepted answer when one exists.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint, openWorldHint, idempotentHint. The description adds behavioral details: automatic HTML-to-markdown normalization, attribution per CC BY-SA 4.0, and answer sorting (accepted first, then by score). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with main purpose. Every sentence adds unique information: first sentence states core function and output format, second explains accepted inputs and normalization, third mentions how to obtain IDs from siblings. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema (mentioned but not shown), annotations, and sibling tools, the description is complete. It covers input format, output format, sorting, attribution, and source of IDs. No missing context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds value for questionIdOrUrl (accepts ID or URL with extraction rule) and site (api_site_parameter value, defaults). For maxAnswers, it repeats schema info. Overall, it enhances understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs like 'Fetch' and 'complete Q&A thread', clearly distinguishing it from siblings that search or list sites. It explicitly mentions output format (markdown with fenced code blocks) and sorting order.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states when to use the tool (to get a thread), provides prerequisites (question IDs from two sibling tools), and implies when not to use (when you need to search). It does not explicitly list alternatives, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stackexchange_get_userGet Stack Exchange User ProfileA
Read-onlyIdempotent
Inspect

Fetch a Stack Exchange user profile by numeric user ID: reputation, badge counts, top tags by answer score, and account metadata. Useful for credibility context on an answer author — pass the authorUserId from any question or answer in stackexchange_get_thread output. Returns profile fields plus up to 10 top tags by answer score.

ParametersJSON Schema
NameRequiredDescriptionDefault
siteNoStack Exchange site — use the api_site_parameter value (e.g. "stackoverflow", "superuser"). Defaults to "stackoverflow". Call stackexchange_list_sites to discover valid values.stackoverflow
userIdYesNumeric user ID — use the authorUserId field from a question or answer in stackexchange_get_thread output.

Output Schema

ParametersJSON Schema
NameRequiredDescription
linkYesDirect URL to the user profile.
userIdYesNumeric user ID on this Stack Exchange site.
topTagsYesTop tags by answer score (up to 10). Empty array for new users with no answers.
locationNoUser-provided location string when available.
quotaMaxYesMaximum API quota calls per day (300 keyless, ~10,000 with API key).
reputationYesUser reputation score.
websiteUrlNoUser-provided website URL when available.
answerCountNoTotal number of answers posted when provided by the API.
badgeCountsNoBadge counts when provided by the API.
displayNameYesDisplay name shown on the site.
questionCountNoTotal number of questions posted when provided by the API.
quotaRemainingYesRemaining API quota calls for the current day.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true, openWorldHint=true, and idempotentHint=true, so the description does not need to restate safety. The description adds value by detailing that it returns reputation, badge counts, top tags by answer score, account metadata, and up to 10 top tags, which complements the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no superfluous words. It front-loads the main action and return fields, then adds usage context and additional detail. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 parameters, 1 required), 100% schema coverage, and presence of an output schema, the description fully covers purpose, input source, and return contents. It answers the key questions an AI agent would have to invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for both parameters. The description adds practical context by mentioning 'pass the authorUserId from...' and 'numeric user ID', which is consistent with the schema but reinforces usage. This slightly exceeds the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch a Stack Exchange user profile by numeric user ID' and lists specific return fields (reputation, badge counts, top tags, account metadata). It distinguishes from sibling tools like stackexchange_get_thread and stackexchange_search_questions by focusing on user profile rather than threads, tags, or search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'useful for credibility context on an answer author' and instructs to use 'the authorUserId from any question or answer in stackexchange_get_thread output'. This provides clear when-to-use guidance. However, it does not mention when not to use or list explicit alternatives, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stackexchange_list_sitesList Stack Exchange SitesA
Read-onlyIdempotent
Inspect

Enumerate all sites in the Stack Exchange network — name, api_site_parameter, audience, and URL. The api_site_parameter value is what other tools accept as the site input (e.g. "stackoverflow", "superuser", "serverfault"). Results are fetched live and optionally filtered by name. Use this tool to discover valid site parameters before calling other stackexchange_* tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
filterNoOptional case-insensitive name filter — returns only sites whose name contains all provided tokens. Omit to return all sites.

Output Schema

ParametersJSON Schema
NameRequiredDescription
sitesYesStack Exchange network sites matching the optional name filter.
noticeNoActionable guidance when results are empty or filtered.
quotaMaxYesMaximum API quota calls per day (300 keyless, ~10,000 with API key).
totalCountYesTotal number of sites returned after filtering.
quotaRemainingYesRemaining API quota calls for the current day.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is clear. The description adds that results are 'fetched live' and optionally filtered, but this is minimal additional behavioral context. With output schema present, no need to detail return values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each purposeful: first enumerates fields, second explains api_site_parameter, third gives usage context. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully covers the tool's simple behavior (list sites, optional filter), complements annotations and output schema, and guides the agent on when to call it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%. The description adds semantic value by explaining that filter is 'case-insensitive' and that omitting it returns all sites, which goes beyond the schema's basic description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verb 'enumerate' and resource 'sites in the Stack Exchange network', listing exact fields returned. It clearly distinguishes from sibling tools (which deal with tags, threads, users, or questions) by focusing on site enumeration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises using this tool before other stackexchange_* tools to discover valid site parameters. While it doesn't list negative cases, the context and sibling names imply when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stackexchange_search_questionsSearch Stack Exchange QuestionsA
Read-onlyIdempotent
Inspect

Search questions across a Stack Exchange site. Returns ranked questions with title, score, answer count, accepted status, tags, and excerpt — no bodies at this stage. Results supply question_id values for stackexchange_get_thread, which fetches the full question body and all answers. Use the site parameter to target a specific community (e.g. "stackoverflow", "superuser", "unix"); call stackexchange_list_sites to discover valid site values.

ParametersJSON Schema
NameRequiredDescriptionDefault
siteNoStack Exchange site to search — use the api_site_parameter value (e.g. "stackoverflow", "superuser", "serverfault"). Defaults to "stackoverflow". Call stackexchange_list_sites to discover valid values.stackoverflow
sortNoResult ordering: "relevance" (default, best match), "votes" (highest score first), "activity" (most recently active), "newest" (most recently created).relevance
tagsNoFilter results to questions with all specified tags.
queryYesFull-text search query (e.g. "python async generator send value").
minScoreNoMinimum question score — excludes questions with lower scores. Setting minScore orders results by score (votes), which may differ from the requested sort.
pageSizeNoNumber of results to return (1–30, default 10).
acceptedOnlyNoWhen true, return only questions that have an accepted answer.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe pageSize cap applied to this request.
shownNoNumber of results returned.
noticeNoActionable guidance when results are empty or filtered.
quotaMaxYesMaximum API quota calls per day (300 keyless, ~10,000 with API key).
questionsYesQuestions matching the search query, ordered by the specified sort.
truncatedNoTrue when results were capped at pageSize.
attributionYesContent license notice. Stack Exchange content is licensed under CC BY-SA 4.0 and requires attribution.
quotaRemainingYesRemaining API quota calls for the current day.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds value by disclosing that the tool returns no bodies (only excerpts), that results provide question_id for follow-up, and that minScore may override the sort order. This goes beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, with every sentence adding essential information. It is front-loaded with the core purpose and quickly moves to key differentiators and usage context. No redundant or extraneous text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the parameter count (7), presence of an output schema, and rich annotations, the description is thorough. It covers the return value, limitations, relationships to sibling tools, and parameter guidance. It does not mention pagination or rate limits, but these are likely handled by the output schema or general API knowledge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds context beyond the schema, such as suggesting stackexchange_list_sites for the site parameter and noting the behavior change when minScore is set. This extra guidance justifies a score above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches questions across a Stack Exchange site, specifies the returned fields (title, score, answer count, accepted status, tags, excerpt), and explicitly notes what is not returned (no bodies). It also distinguishes itself from siblings by mentioning how results feed into stackexchange_get_thread and how to discover sites via stackexchange_list_sites.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use this tool (initial search) and directs the agent to stackexchange_get_thread for full question bodies and stackexchange_list_sites for valid site values. It does not explicitly state when not to use it, but the context is clear enough to guide appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.