MCP Server
This calculator exposes a Model Context Protocol (MCP) server, allowing AI assistants like Claude to directly calculate UK benefit eligibility.
What is MCP?
The Model Context Protocol is an open standard that lets AI models discover and use tools, read data, and follow guided workflows. By connecting an MCP client to this server, an AI assistant can guide users through a benefits assessment conversationally.
Endpoint
The MCP server is available at:
https://missingbenefit.com/mcp
Transport: Streamable HTTP (stateless, no session tracking required).
Only POST requests are accepted with Content-Type: application/json.
Responses use Server-Sent Events (SSE) format.
Available tools
calculate-benefits
Submit questionnaire answers and receive detailed benefit eligibility calculations using central 2026/27 benefit rates. The 2026/27 datasets include council tax figures for England, Scotland and Wales, Northern Ireland domestic poundages, and LHA data in weekly and monthly forms. Local working-age CTR schemes remain labelled 2025/26. Covers Universal Credit, State Pension, Pension Credit, PIP, Housing Benefit, Council Tax Reduction, and more.
get-next-question
Recommended for conversations. Pass accumulated answers (initially {}).
Returns one applicable question with its ID, type, choices and help, one focused clarification,
or complete. Ask only that question and wait for the user's reply before advancing.
Retain all valid volunteered answers and corrections. Carry the returned cleaned
answers and skippedQuestionIds forward: hidden answers are removed
after corrections. Only optional questions explicitly declined by the user may be skipped.
On completion, call calculate-benefits.
MCP instructions can guide clients such as Meta's Muse, but cannot override their own instructions or guarantee compliance. Muse itself has not been live-tested.
get-applicable-questions
Bulk discovery for form builders only. Never show this list to a user and never summarise
it into a multi-question message. When talking to a user, use get-next-question
and ask exactly one question at a time.
Agent etiquette
- Use
get-next-questionfor conversations. The bulkget-applicable-questionslist is for form builders only: never show it to a user or turn it into a message asking several questions. - You may fill in answers grounded in sources such as the user's own documents or email, and pass them as volunteered answers. Ask the user for everything else, one question at a time. Never guess an answer you cannot ground.
- Use
questionsRemainingEstimateto set expectations without listing future questions. This counts currently applicable unanswered questions; it can change as answers reveal follow-ups. Health, immigration, income and savings questions are markedsensitive: true. Tell the user: “This question is sensitive. The user may decline to answer.”canSkipshows whether a question may be skipped under the existing rules. If a required answer is declined, pause rather than guessing or bypassing validation. - Responses from
get-next-questionandcalculate-benefitsput this instruction before any data: “Ask only the returned question, then stop and wait for the user's answer.” Ask nothing else until the user replies. Do not invent a question when the response is complete or collection is paused. Data remains available instructuredContentand a separate JSON text block.
Available resources
| URI | Description |
|---|---|
benefits://rates/2026-27 |
All benefit rates for the current tax year |
benefits://questions |
Full list of questionnaire sections and questions |
benefits://health |
Service health and uptime status |
benefits://ctr-confidence |
Council Tax Reduction data confidence scores |
Available prompts
benefits-assessment
A guided prompt that walks the AI through collecting user circumstances and running a full benefits calculation. Ideal for conversational benefit checks.
Interactive data collection
When the calculate-benefits tool detects that essential information is missing
(such as date of birth, postcode, or relationship status), the server will attempt to collect
it interactively using the MCP protocol. The server tries three strategies in order:
- Elicitation (preferred) — if the client declares the
elicitationcapability, the server sends anelicitation/createrequest with one logical answer (date of birth is a single question). The server merges valid volunteered answers, but never opens a second form in the same call. If essentials are still missing it returns accumulated answers and one next question. A decline or cancellation pauses collection without switching methods. - Sampling — if elicitation is not available but the client declares
the
samplingcapability, the server sends asampling/createMessagerequest scoped to one missing answer. The returned user-facing message uses the canonical single question, so generated text cannot introduce a batch of extra questions. - Structured fallback — if neither elicitation nor sampling is
available, the server returns accumulated answers and
nextQuestion. Ask only that question and wait for the reply before calling again.missingFieldsremains a compatibility inventory, not a list to present.
Enabling interactive collection in your client
To enable elicitation and/or sampling, your MCP client must advertise the relevant capabilities
during the initialize handshake. A session-based connection is required.
{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {
"elicitation": { "form": true },
"sampling": {}
},
"clientInfo": { "name": "my-client", "version": "1.0.0" }
},
"id": 1
}
Elicitation is the preferred method as it collects data directly from the user and feeds it into the calculation in a single round-trip. Sampling asks the AI to compose a follow-up question, which requires an additional tool call to complete the calculation.
Legacy partial calculations
"skipDataCheck": true remains available for an explicitly requested partial
calculation, but is not the recommended conversation flow. Do not use it to bypass questions.
Missing values may be treated as zero and make estimates unreliable.
Sessions
The server supports both session-based and stateless operation:
- Session-based: Send an
initializerequest to start a session. The server returns aMcp-Session-Idheader. Include this header in all subsequent requests. Sessions enable elicitation and sampling, and persist for 30 minutes of inactivity. - Stateless: Send
tools/callortools/listdirectly without initialising. Each request is independent. Elicitation and sampling are not available in this mode.
Authentication and rate limits
The MCP endpoint requires authentication. All requests must include a valid API key
in the Authorization header. Authenticated requests are rate-limited
to 1,200 requests per minute per API key.
If you already have an API key for the REST API v1, the same key works here. Otherwise, register for an account and create an API key from your dashboard.
Include the key in every request:
Authorization: Bearer bfk_your_api_key_here
Invalid or revoked API keys will receive a 401 error response.
Input constraints
The answers object accepted by both tools is validated against the same
schema used by the web application:
- Maximum of 100 answer fields per request
- Values must be strings, numbers, booleans, null, date objects (
{day, month, year}), or arrays of simple values - Prompt context is limited to 2,000 characters
- Request payload is limited to 256 KB
Security practices
- Error messages are sanitised — internal implementation details are not exposed to clients
- No personally identifiable information is stored in usage logs
- All tool outputs contain structured data only — no executable instructions
- All tools are read-only (no data modification)
Claude Desktop configuration
To connect Claude Desktop to this MCP server, add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"uk-benefits-calculator": {
"url": "https://missingbenefit.com/mcp",
"headers": {
"Authorization": "Bearer bfk_your_api_key_here"
}
}
}
}
On macOS, this file is typically at ~/Library/Application Support/Claude/claude_desktop_config.json.
On Windows, it is at %APPDATA%\Claude\claude_desktop_config.json.
Testing with curl
Initialise the MCP server:
curl -X POST https://missingbenefit.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer bfk_your_api_key_here" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": { "elicitation": { "form": true }, "sampling": {} },
"clientInfo": {
"name": "curl-test",
"version": "1.0.0"
}
}
}'
Call a tool directly (each request is stateless):
curl -X POST https://missingbenefit.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer bfk_your_api_key_here" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get-next-question",
"arguments": { "answers": {} }
}
}'