Spiral gives your agent every tool with one account. Browse the tools →

Claude Code · Social Media

How to Use Stack Exchange site directory in Claude Code

Lists Stack Exchange communities with their names, URLs, audiences, and site identifiers. Use it to find the right subject community before researching questions there.

Prompts to try with Stack Exchange site directory in Claude Code

Copy an example into Claude Code, or ask in your own words.

Use Stack Exchange site directory to find communities relevant to PostgreSQL administration and Ubuntu deployment. Add their names, audiences, and URLs to our research notes.

Stack Exchange site directoryClaude Code
Try asking
  • Use Stack Exchange site directory to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from Stack Exchange site directory and tell me what changed since last week.

  • Check Stack Exchange site directory and summarize what you find in three bullet points.

  • Pull the newest data from Stack Exchange site directory and give me the result as a table.

How to set up Stack Exchange site directory in Claude Code

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the hosted server

    This adds Spiral to the current project. Add --scope user to use it in every project.

    claude mcp add --transport http spiral https://api.spiral.ai/mcp
  2. Sign in

    Start claude, type /mcp, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

Use the Spiral skill

  1. Send Claude Code this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Stack Exchange site directory

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "alexandria",
        "model": "stackexchange-com/questions/sites",
        "input": {
          "key": "<key>"
        }
      }'

Then paste one of the prompts above: Claude Code finds Stack Exchange site directory on Spiral, shows the price and runs it.

Stack Exchange site directory providers and prices

Spiral runs Stack Exchange site directory through Alexandria. Open a card for today's price, with every fee included.

AlexandriaSocial Media
Stack Exchange · Sites
stackexchange-com/questions/sites

Settings you can ask for

Ask Claude Code for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page1 to 100001

Pages above 25 need key: Stack Exchange serves deeper pages only with an application key (access_denied otherwise). Without one the last page reports partial coverage.

Pagesize1 to 100100

pagesize

Every API field of Stack Exchange · Sites is on its tool page: open its card above.

What can you do with Stack Exchange site directory in Claude Code?

Build a cited troubleshooting guide around the libraries and errors in your project. A coding agent can use Stack Exchange community information, questions, answers, and recorded edits to select relevant evidence and check whether saved explanations have changed.

Build a troubleshooting handbook

Choose the relevant community, find recurring PostgreSQL errors, collect accepted solutions, and compare other answers against each question's constraints.

Review migration advice

Find communities covering Ubuntu and Python, search migration problems, collect accepted solutions, and inspect cited answers and their revisions for changes in recommended commands.

Find gaps in product documentation

Locate the community serving a product's users, search recurring configuration questions, and compare problem descriptions with the explanations supplied in answers.

Create a technical reading list

Choose a subject community, collect questions with accepted solutions, read the full problem context, and retrieve individual answers selected for a linked study guide.

Questions about Stack Exchange site directory in Claude Code

Can Claude Code use Stack Exchange site directory?

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Stack Exchange site directory like any built-in tool.

How much does Stack Exchange site directory cost in Claude Code?

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

Do I need an Alexandria account to use Stack Exchange site directory in Claude Code?

No. Spiral runs Stack Exchange site directory on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up Stack Exchange site directory in Claude Code?

About two minutes: add the hosted server, then sign in.

Does Claude Code wait while Stack Exchange site directory runs?

Stack Exchange site directory runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

Does Stack Exchange search cover the whole network at once?

Question searches run against one community at a time. The site directory lists communities across the network so you can choose where to search.

How fresh is Stack Exchange data?

API responses are heavily cached, and Stack Exchange considers repeating an equivalent request more than once per minute abusive. The site directory changes much less often; its documentation recommends caching it for at least one day.

Does one response contain every matching result?

Stack Exchange generally limits upstream result pages to 100 items, and an endpoint may return fewer. A response indicating more results requires additional pages before the collection is complete.

Does an accepted answer mean the solution is still correct?

Acceptance means the question author received an answer that worked for them personally. Stack Exchange explicitly warns that authors may leave an answer accepted even after a better answer appears.

Does revision history show every edit separately?

No. Stack Exchange documents that multiple edits can result in a single revision, so recorded revisions cannot establish the exact number of editing actions.

Get started

Start using Stack Exchange site directory in Claude Code

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Claude Code:

Set up Claude Code

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options