MCP Integration
Connect Haufe Copilot tools to AI agents and workflows via the Model Context Protocol (MCP).
The MCP lets any MCP-compatible AI agent or workflow call Haufe Copilot tools directly — without building a REST integration. Once configured, your agent can invoke specialized copilots (Tax, HR, Sustainability, Real Estate, Finance, Law, ...) as native tools.
An update is on the way. We will release a new version of the MCP integration soon. The way you use the MCP server changes with that version. This page describes the current version.
The MCP server shows you only the tools that your API key can use. The table in Available Tools is the full catalog. You see the part of the catalog that matches your subscription and your licenses.
Quick Start
Endpoint https://api.haufe.ai/agents/v1/mcp
Transport Streamable HTTP
Required HTTP headers:
| Header | Value | Required |
|---|---|---|
api-key | Your API key — get one from the Developer Portal | Always |
license-id-tax | Tax license ID (from your Haufe contact) | Only when calling the Tax tool |
license-id-hr | HR license ID | Only when calling the HR tool |
license-id-sustainability | Sustainability license ID | Only when calling the Sustainability tool |
license-id-re | Real Estate license ID | Only when calling the Real Estate tool |
license-id-finance | Finance license ID | Only when calling the Finance tool |
license-id-law | Law license ID | Only when calling the Law tool |
Claude Code config (.mcp.json):
Only include the license-id-* headers for the copilots you want to use and have access to — omit the rest.
{
"mcpServers": {
"haufe-copilot": {
"type": "http",
"url": "https://api.haufe.ai/agents/v1/mcp",
"headers": {
"api-key": "<YOUR_API_KEY>",
"license-id-tax": "<YOUR_TAX_LICENSE_ID>",
"license-id-hr": "<YOUR_HR_LICENSE_ID>",
"license-id-sustainability": "<YOUR_SUSTAINABILITY_LICENSE_ID>",
"license-id-re": "<YOUR_REAL_ESTATE_LICENSE_ID>",
"license-id-finance": "<YOUR_FINANCE_LICENSE_ID>",
"license-id-law": "<YOUR_LAW_LICENSE_ID>"
}
}
}
}Restart your MCP client and the copilot tools will appear in the tool list. See Python MCP SDK below for a non-Claude example.
A call to a copilot that is not enabled for your API key fails with
Your API key has no access to the tool .... Ask your Haufe contact to enable more copilots.
License IDs are validated per tool call. Calling a tool without the corresponding license header will result in an authentication error.
MCP tool calls count against your answer-generation rate limit — see Rate Limits.
Available Tools
The table below is the full catalog of copilot tools. Each tool accepts a single
user_message argument and returns a JSON-encoded assistant response.
| Tool name | Domain | License header required |
|---|---|---|
haufe_copilot_tax_tool | German tax law (income tax, VAT, corporate tax, payroll tax, trade tax) | license-id-tax |
haufe_copilot_hr_tool | German employment & HR law (contracts, dismissal, works council) | license-id-hr |
haufe_copilot_sustainability_tool | ESRS standards, CSRD directive, ESG compliance | license-id-sustainability |
haufe_copilot_real_estate_tool | German real estate law (tenancy, WEG, landlord/tenant rights) | license-id-re |
haufe_copilot_finance_tool | German accounting & financial reporting (Rechnungswesen: bookkeeping, Bilanzierung, Jahresabschluss, VAT, controlling) | license-id-finance |
haufe_copilot_law_tool | German law across ~15 practice areas (labor, family & inheritance, corporate, tenancy/property, traffic, fee law, case law) | license-id-law |
Python MCP SDK
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client(
"https://api.haufe.ai/agents/v1/mcp",
headers={
"api-key": "<YOUR_API_KEY>",
"license-id-tax": "<YOUR_TAX_LICENSE_ID>",
},
) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool(
"haufe_copilot_tax_tool",
{"user_message": "Was sind die Fristen für die Steuererklärung?"},
)
print(result.content[0].text)
asyncio.run(main())Tool Response Format
Each tool returns a JSON string. Parse it to access the structured response:
import json
raw = result.content[0].text
response = json.loads(raw)
print(response["content"]) # main answer text
print(response["sources"]) # list of cited sourcesThe response schema matches the AssistantMessage returned by the Chat Completions endpoint.