Apache Answer + MCP: Give AI Agents Your Team's Answers
Your coding agent is confident. It will tell you exactly how your team deploys to staging, which Postgres flags you use, and why the billing service retries three times. It will be wrong about all three, because the real answers live in your team's heads and in a Q&A site the agent has never seen.
Apache Answer is that Q&A site for a lot of teams: a self-hosted, Stack Overflow-style knowledge base under the Apache 2.0 license. Since version 2.0 (January 2026), it also ships a built-in MCP server. Any agent that speaks the Model Context Protocol (Claude Code, Cursor, your own LangGraph thing) can search your team's questions and answers and cite them with links.
I read the source before writing this, because MCP release notes tend to be one line long. The feature works, but a few design choices will trip you up if you don't know about them. Here's the setup, plus the parts nobody documents.
What the MCP server actually exposes
Answer's MCP server is read-only. It registers six tools, and none of them can write:
| Tool | What it does |
|---|---|
get_questions | Keyword search over questions, with optional filters for tag, author and minimum score |
get_answers_by_question_id | All answers for a question ID returned by the search |
get_comments | Comments on a question or an answer |
get_tags | Search tags by name |
get_tag_detail | Details for a single tag |
get_user | Look up a user by username |
The flow an agent follows is simple: search questions, pick an ID, pull the answers. Every question comes back with a link to the page on your site, so the agent can cite its source instead of paraphrasing from memory.
That's the right shape for a knowledge base. You want agents reading what humans wrote and verified, not posting answers of their own.
Step 1: Deploy Answer and set the Site URL
If you don't have Answer running yet, you can deploy Apache Answer on Elestio in a few minutes. The smallest plan that's comfortable for a team is 2 vCPU and 4 GB of RAM, starting at $16/month, with backups, updates and TLS handled for you. Answer itself is open source, so that's the whole bill.
Check that you're on Answer 2.0 or later (the current stable release is 2.0.2); older versions have no MCP server. Then open Admin > Advanced > General and check the Site URL. The MCP server builds two things from it: the endpoint URL shown in the admin panel, and every link it hands to your agent. If that field still says http://localhost, your agent will cite links nobody can open.
Step 2: Turn on MCP and create a key
In the admin panel you'll find a new Intelligence section. Open MCP, flip the MCP server switch to Enabled, and save. The page then shows you three values:
- Type: Server-Sent Event (SSE)
- URL:
https://your-answer-domain/answer/api/v1/mcp/sse - HTTP header:
Authorization={key}
Next, open Admin > Advanced > API Keys and click Add API Key. You'll be asked to choose a scope: Read-only or Global.
This is where I would have gone wrong. The obvious choice is Read-only, since the MCP tools only read. A read-only key will not work.
Here's why. MCP over SSE uses two kinds of request: a GET that opens the event stream, and a POST to /answer/api/v1/mcp/message for everything else, including the handshake, the tool list and every tool call. Answer's API key check rejects any non-GET request made with a read-only key. So the stream opens, and then everything after it comes back 401.
You need a Global key. Be aware that a global key is also accepted for write requests on Answer's regular API, so treat it like a password: one key per agent or per machine, stored in a secrets manager, never committed. Delete the key when you retire the agent. The API Keys page shows a "last used" timestamp, which helps you spot keys nobody needs anymore.
Step 3: Check the endpoint with curl
Before touching an agent config, prove the endpoint works:
curl -N \
-H "Authorization: sk_your_key_here" \
https://your-answer-domain/answer/api/v1/mcp/sse
You should get a streaming response with an endpoint event that contains a session ID. The connection stays open, so press Ctrl+C when you've seen it. A JSON error instead of a stream means something's wrong; the troubleshooting section below covers the usual causes.
Answer strips an optional Bearer prefix from the header, so Authorization: Bearer sk_... works too if your client insists on it.
Step 4: Connect your agent
For Claude Code, one command does it:
claude mcp add --transport sse answer \
https://your-answer-domain/answer/api/v1/mcp/sse \
--header "Authorization: sk_your_key_here"
For Cursor and most other clients that take a JSON config:
{
"mcpServers": {
"answer": {
"url": "https://your-answer-domain/answer/api/v1/mcp/sse",
"headers": {
"Authorization": "sk_your_key_here"
}
}
}
}
Then ask the agent something your team has actually answered, like "How do we rotate the staging database password?". You should see a get_questions call, then get_answers_by_question_id, then a reply with a link back to your Answer site.
The limits worth knowing
Search returns five questions, newest first. get_questions takes the top five keyword matches sorted by date, not by relevance or score. For a busy site, that means a vague query surfaces whatever was posted last week. Tags help: tell your agent (in its system prompt or project rules) to filter by tag when it can, such as postgres or deploy.
No semantic search over MCP. Answer has a semantic_search tool that works with a vector search plugin, but it's wired into Answer's own built-in AI assistant, not the external MCP server. Your agent gets keyword search only. Write question titles the way people search for them.
It only knows what's written down. This sounds obvious, but it's the real value. Once agents start citing your Answer site, there's a reason to write answers down. A question answered once in Slack helps one person. The same answer posted on Answer helps every agent from then on.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
403 Forbidden on /mcp/sse | MCP is not enabled. Turn it on under Admin > Intelligence > MCP and save. |
| The stream connects, but the client shows 401 errors or no tools | The key is Read-only. Create a Global key. |
| 401 on the stream itself | Missing or mistyped header. The header name is Authorization and the key starts with sk_. |
Agent cites localhost links | Site URL is wrong. Fix it under Admin > Advanced > General. |
| Agent finds nothing you know exists | Keyword mismatch or too many newer results. Search with the words used in the title, or filter by tag. |
Is it worth it?
For a team that already runs Answer, this takes minutes and adds nothing to the server bill you already pay. For a team that doesn't, the MCP server is a good reason to start. Your internal knowledge becomes something agents can use, and the answers stay on a server you control instead of inside a SaaS vendor's AI index.
If you'd like to try it without maintaining the server, Apache Answer on Elestio gets you there with automated backups and updates.
Thanks for reading ❤️ See you in the next one 👋