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.

Functions

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"}'
    Sign in to run
    Responsereturns StackExchangeQuestion
    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;
    }
    
    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"}'
    Sign in to run
    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"}}'
    Sign in to run
    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;
    }