Adding UK Corporation Tax calculations to your AI assistant with a free MCP server
Ask a general-purpose AI assistant when a UK company's Corporation Tax is due and you'll usually get a confident answer. Sometimes it's right. Tax dates and rates are rule-based, though, so they're a good fit for a deter
Ask a general-purpose AI assistant when a UK company's Corporation Tax is due and you'll usually get a confident answer. Sometimes it's right. Tax dates and rates are rule-based, though, so they're a good fit for a deterministic tool the model can call instead of guessing.
This post shows how to connect an assistant to a free, public Model Context Protocol (MCP) server that does exactly that for UK limited companies, and what you get back when you call it directly with curl.
What is MCP, briefly?
The Model Context Protocol is an open protocol that lets AI clients (Claude, ChatGPT in developer mode, Cursor, VS Code and others) discover and call tools hosted by a server. A remote MCP server is just an HTTPS endpoint that speaks JSON-RPC 2.0:
-
initializenegotiates the protocol version and capabilities -
tools/listreturns each tool's name, description and JSON Schema for its inputs -
tools/callruns a tool with arguments and returns the result
The client reads the tool descriptions and schemas, and the model decides when a user's question needs one. You write no glue code.
The server
Taxley, UK Corporation Tax software from Taxley UK LLP, runs a public MCP server at:
https://taxley.co.uk/mcp
According to its developer docs, it:
- speaks MCP over Streamable HTTP, one JSON-RPC message per POST request
- needs no API key and never creates a session
- marks every tool read-only and idempotent
- returns a plain-text answer plus
structuredContentwith the figures, sources and ashare_urllinking to the same calculation on the website
The same calculators are also available as a plain JSON API and as website embeds, but MCP is the interesting bit here.
Connecting a client
Most MCP clients that support remote servers accept a config like this (the exact file and key names vary by client):
{
"mcpServers": {
"taxley": {
"url": "https://taxley.co.uk/mcp"
}
}
}
No headers and no auth block are needed. In Claude, you can add it through Settings â Connectors â Add custom connector: paste the URL and leave the authentication settings empty. In ChatGPT, developer mode lets you create a connector with the same URL and no authentication.
Then ask something like: "When is Corporation Tax due for a year ending 31 March 2026?"
Poking at it with curl
Since it's plain JSON-RPC over HTTPS, you can explore it without any client. Here's initialize:
curl -s https://taxley.co.uk/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-06-18",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": {
"name": "taxley",
"title": "Taxley â UK Corporation Tax tools",
"version": "1.0.0",
"websiteUrl": "https://taxley.co.uk/developers"
},
"instructions": "Free calculators for UK limited companies ... The results are general guidance, not tax advice."
}
}
And tools/list:
curl -s https://taxley.co.uk/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
The response lists 17 tools. Trimmed to one entry:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"tools": [
{
"name": "corporation_tax_deadlines",
"title": "Corporation Tax deadline calculator",
"description": "Works out a UK private limited company's Corporation Tax payment date, CT600 filing deadline and Companies House accounts deadline from its accounting period. ...",
"inputSchema": {
"type": "object",
"properties": {
"period_end": { "type": "string", "format": "date", "...": "..." },
"period_start": { "type": "string", "format": "date", "...": "..." }
},
"required": ["period_end"],
"additionalProperties": false
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}
}
]
}
}
Calling it:
curl -s https://taxley.co.uk/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"corporation_tax_deadlines","arguments":{"period_start":"2025-04-01","period_end":"2026-03-31"}}}'
The text content comes back as:
For accounts from 1 April 2025 to 31 March 2026, pay Corporation Tax by 1 January 2027
and file the CT600 by 31 March 2027. A private limited company must also deliver these
accounts to Companies House by 31 December 2026. ...
The structuredContent object has answer, figures, data, notes, sources, page_url, share_url and disclaimer, so your own code can use the dates directly, and the model can point the user to the share_url to check the working.
The tools
The five you'll probably reach for first:
-
uk_corporation_tax_estimate: Corporation Tax on taxable profits for one accounting period, applying the small profits rate, main rate and marginal relief, with associated companies, short periods and periods that straddle 1 April. -
corporation_tax_deadlines: payment date, CT600 filing deadline and Companies House accounts deadline. Accounts longer than 12 months are split into two periods. -
corporation_tax_late_penalty_and_interest: HMRC's flat and tax-geared late filing penalties plus late payment interest. -
directors_loan_s455_tax: section 455 tax and repayment relief on a director's loan, with an optional beneficial-loan estimate. -
uk_company_capital_allowances: annual investment allowance, full expensing, first-year allowances and writing-down allowances, with balancing charges and pools carried forward.
The rest cover chargeable gains with indexation, the micro-entity/small company size test, long accounting periods, company car and van benefits, mileage allowance, home office allowance, trivial benefits, dividend reserves, salary vs dividends, sole trader vs limited company, and pension contributions. Run tools/list for the full schemas.
A few practical notes
-
Dates are
YYYY-MM-DDand money is in pounds. Bad input comes back as a validation error, which models handle well. They usually fix the argument and retry. -
It's guidance, not advice. The server's own instructions tell the model to say so and to cite the
share_url. Keep that in your UI if you surface results to end users. -
Don't need MCP? The same tools are available as
GET/POSTendpoints under/api/v1/tools/, with an OpenAPI 3.1 description. Details are on the developers page.
If you're building anything for UK small businesses, such as a bookkeeping bot, an internal finance assistant or a founder's Slack helper, wiring in deterministic tax tools like these is a cheap way to cut down on hallucinated dates and rates.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes â full credit and traffic to the original publisher.