Stack Exchange API and MCP server for AI agents
Let Claude, ChatGPT or your own agent read Stack Exchange. No Stack Exchange API key needed.
Add to your agent
Paste this into Claude Code, Cursor, Codex or any agent. It adds the server itself.
Read https://bowmark.ai/sites/stackexchange.md and add Bowmark's Stack Exchange MCP server to my agent.Run this in a terminal, then sign in when the browser opens. Claude Code keeps its own sign-in (a claude.ai sign-in does not carry over), so add only this one server. Adding the Bowmark plugin as well lists every tool twice.
claude mcp add --transport http bowmark-stackexchange https://api.bowmark.ai/mcp/site/stackexchangePress the button, or add this to ~/.cursor/mcp.json.
{
"mcpServers": {
"bowmark-stackexchange": {
"url": "https://api.bowmark.ai/mcp/site/stackexchange"
}
}
}Press the button, or run this in a terminal.
code --add-mcp '{"name":"bowmark-stackexchange","type":"http","url":"https://api.bowmark.ai/mcp/site/stackexchange"}'Run this in a terminal.
codex mcp add bowmark-stackexchange --url https://api.bowmark.ai/mcp/site/stackexchangeIn Claude, open Plugins → Add → Add custom connector, paste this URL, and pick Sign in now.
https://api.bowmark.ai/mcp/site/stackexchangeIn ChatGPT, open Plugins, press +, choose Add custom MCP server and paste this URL.
https://api.bowmark.ai/mcp/site/stackexchangeAny MCP client that takes a remote (streamable HTTP) server: give it this URL.
https://api.bowmark.ai/mcp/site/stackexchangeFunctions
Open a function to see its parameters and run it with your own API key.
getQuestionReads one question on any Stack Exchange site by url or id plus site.POST /v1/sites/stackexchange/getQuestion
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/stackexchange/getQuestion \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"ref":1,"site":"math"}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.stackexchange.getQuestion(1, "math");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.stackexchange.getQuestion(1, "math"))Responsereturns StackExchangeQuestioninterface StackExchangeQuestionHit { site: string; questionId: number; title: string; link: string; tags: string[]; score: number | null; answerCount: number | null; isAnswered: boolean; acceptedAnswerId: number | null; viewCount: number | null; author: string | null; createdAt: string | null; } interface StackExchangeAnswer { answerId: number; score: number | null; isAccepted: boolean; author: string | null; createdAt: string | null; body: string; link: string; } interface StackExchangeQuestion extends StackExchangeQuestionHit { body: string; answers: StackExchangeAnswer[]; }listSitesLists the Stack Exchange network's Q&A sites (slug, name, url, audience), optionally narrowed by a topic word, through the official Stack Exchange…POST /v1/sites/stackexchange/listSites
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/stackexchange/listSites \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"math"}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.stackexchange.listSites("math");import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.stackexchange.listSites("math"))Responsereturns { results: StackExchangeSite[]; total: number | null; page: number; pageCount: number | null; returned: number; warnings: string[] }interface StackExchangeSite { site: string; // API slug, pass as `site` name: string; url: string; audience: string | null; siteType: string | null; state: string | null; }searchQuestionsSearches one Stack Exchange site's questions by keyword and tag through the official Stack Exchange API, returning title, link, tags, score, answer…POST /v1/sites/stackexchange/searchQuestions
Parameters
Slug, domain or url.
curl -X POST https://api.bowmark.ai/v1/sites/stackexchange/searchQuestions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"site":"serverfault","query":"nginx reverse proxy"}}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.stackexchange.searchQuestions({ site: "serverfault", query: "nginx reverse proxy" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.stackexchange.searchQuestions({"site": "serverfault", "query": "nginx reverse proxy"}))Responsereturns { results: StackExchangeQuestionHit[]; total: number | null; page: number; pageCount: number | null; returned: number; warnings: string[] }interface StackExchangeQuestionHit { site: string; questionId: number; title: string; link: string; tags: string[]; score: number | null; answerCount: number | null; isAnswered: boolean; acceptedAnswerId: number | null; viewCount: number | null; author: string | null; createdAt: string | null; }