🚀 Simplify your work by integrating Haufe Copilot via API
Guides

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.

info

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.

info

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

info

Endpoint  https://api.haufe.ai/agents/v1/mcp
Transport  Streamable HTTP

Required HTTP headers:

HeaderValueRequired
api-keyYour API key — get one from the Developer PortalAlways
license-id-taxTax license ID (from your Haufe contact)Only when calling the Tax tool
license-id-hrHR license IDOnly when calling the HR tool
license-id-sustainabilitySustainability license IDOnly when calling the Sustainability tool
license-id-reReal Estate license IDOnly when calling the Real Estate tool
license-id-financeFinance license IDOnly when calling the Finance tool
license-id-lawLaw license IDOnly 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.

.mcp.json
{
  "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.

info

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.

warning

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 nameDomainLicense header required
haufe_copilot_tax_toolGerman tax law (income tax, VAT, corporate tax, payroll tax, trade tax)license-id-tax
haufe_copilot_hr_toolGerman employment & HR law (contracts, dismissal, works council)license-id-hr
haufe_copilot_sustainability_toolESRS standards, CSRD directive, ESG compliancelicense-id-sustainability
haufe_copilot_real_estate_toolGerman real estate law (tenancy, WEG, landlord/tenant rights)license-id-re
haufe_copilot_finance_toolGerman accounting & financial reporting (Rechnungswesen: bookkeeping, Bilanzierung, Jahresabschluss, VAT, controlling)license-id-finance
haufe_copilot_law_toolGerman 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 sources

The response schema matches the AssistantMessage returned by the Chat Completions endpoint.

Next Steps

On this page