Skip to content

Ask from an agent (MCP)

The Ask MCP server lets an AI agent ask hubs questions. It’s a Model Context Protocol server with one tool, ask. A call sends up to four questions to the hubs and returns what the hubs said to each. You pay only for answers, from your WarmHub account’s credits.

It does nothing else: it can’t read repositories, write data, or manage a hub. To give an agent those, add the WarmHub MCP server beside it. The two servers don’t overlap.

The endpoint is https://ask.warmhub.ai/mcp. Most MCP clients need only the URL: the first time the agent connects, the client opens WarmHub sign-in in your browser, and the agent then asks as you.

{
"mcpServers": {
"warmhub-ask": {
"type": "http",
"url": "https://ask.warmhub.ai/mcp"
}
}
}

In Claude Code, add the server, then run /mcp and sign in:

Terminal window
claude mcp add --transport http warmhub-ask https://ask.warmhub.ai/mcp

The server publishes its sign-in details as OAuth protected-resource metadata, at https://ask.warmhub.ai/.well-known/oauth-protected-resource/mcp, with https://signin.warmhub.ai as its sign-in server. A client that can’t sign in through a browser, such as an agent that runs unattended, sends a WarmHub personal access token in the Authorization header instead:

{
"mcpServers": {
"warmhub-ask": {
"type": "http",
"url": "https://ask.warmhub.ai/mcp",
"headers": {
"Authorization": "Bearer ${WH_TOKEN}"
}
}
}
}
Terminal window
claude mcp add --transport http warmhub-ask https://ask.warmhub.ai/mcp --header "Authorization: Bearer $WH_TOKEN"

Signing in and a token reach the same account. What the sign-in or token must be able to do depends on which account pays and which hubs you ask:

  • Paying from your personal organization. Without orgId, your personal organization’s account pays, so the token must be able to read that organization. A token limited by scope needs org:read on it; without that, the call is refused and tells you to pass an orgId the token can read.
  • Paying from another organization. With orgId, the token must be able to read that organization, and you need org:spend on it. Today its owners, admins, and editors have that.
  • A hub limited to an org. Such a hub answers only a token that holds org:read on its org. For any other token it behaves like a hub that doesn’t exist.
ArgumentTypeWhat it is
questionsarray, requiredThe questions, 1 to 4. Each is an object with the three fields below.
questions[].questionstring, requiredThe question, in plain words: up to 25 words and 300 characters.
questions[].hubsstring[]The hubs to ask this question, as org/name or a glob such as org/**. Leave it out to ask every hub you can reach.
questions[].maxCostPerAnswernumberYour bid for this question: the most to pay for its answer, in credits per 1,000 answers. The default is 1000, which is 1 credit for one answer.
maxTotalCostnumberThe most the whole call may cost, in credits. Leave it out for no limit but the bids.
orgIdstringThe organization whose account pays. Leave it out to pay from your personal organization’s account.
{
"questions": [
{ "question": "What is the capital of France?" },
{ "question": "How tall is Mount Everest?", "maxCostPerAnswer": 2000 }
]
}

Each question gets at most one answer, so the bids add up to the most a call can cost: 4 credits for four questions at the default bid. Set maxTotalCost to hold a call to less. A question it leaves no budget for isn’t asked, and its response says so.

An argument the tool doesn’t list is refused, so a misspelt maxCostPerAnswer can’t become a question at the default bid.

Only an answer is charged, at the hub’s price, which is never more than your bid. Every other response is free. The charge goes to the paying organization’s account: your personal organization’s without orgId, and the named organization’s with it. A call the token can’t pay for is refused before any hub is asked, so it is never charged to another account.

Prices and bids are in credits per 1,000 answers, so a price of 200 is 0.2 credits for one answer. Your personal organization’s account gets starting credit once, 5,000 credits today. You can reject a wrong answer for a full refund within 7 days.

Sign in to WarmHub Ask to see each organization’s balance and every charge, to add credits, and to reject an answer.

Calling ask again asks again and charges again, even with the same questions. An agent that retries in a loop spends on every answer it gets, so give it a bid you’re content to pay more than once.

The result holds answers, one entry for each question in the order you asked them, with the cost of the call in credits and your balance in whole credits, rounded down. Each entry holds that question’s hub responses and what it cost:

{
"requestId": "c25d5464-0317-4fc6-bcaf-38ed080d7c2f",
"answers": [
{
"responses": [
{
"_tag": "Answer",
"answerId": "bb9d19ff-c65f-4c96-beea-d9658a91569a",
"hub": "warmhub-data/us.geography",
"price": 200,
"answer": { /* the answer and the Things it cites */ }
}
],
"cost": 0.2
},
{
"responses": [
{ "_tag": "OutOfScope", "reason": "No hub matched the question." }
],
"cost": 0
}
],
"cost": 0.2,
"balance": 9999
}

Each entry in responses is one hub’s response. Reading answers explains an answer’s structure and its sources.

A response that isn’t an answer tells the agent what to do next:

ResponseWhat to change
PriceTooLowThe hub’s price is above your bid. The response gives the price as ask; call again with a maxCostPerAnswer at or above it.
MissingParametersThe question lacks a detail the hub needs. The response names it; add it to the question.
OutOfScope, NotFound, NotImplementedThe hub doesn’t answer this question.
HubErrorThe hub failed. retryable says whether asking again can help.

When the request itself is refused, the tool returns an error result that carries an error body: its _tag, a detail that says what to do, retryable, and requestId. The usual ones are InsufficientBalance, RateLimited, and InvalidRequest.

A call with no token, or with one WarmHub doesn’t accept, gets an HTTP 401 instead of a tool result.

The result is also marked as an error when every question failed: no hub answered it and one returned HubError. When at least one question was answered it isn’t, so read each entry of answers.

Each WarmHub user can make 120 requests a minute. A call counts as one, however many questions it holds; over the limit, it is refused with RateLimited.

The tool asks and returns.

To reject an answer or read your balance, use WarmHub Ask. To open the Things an answer cites, see Reading answers.