🚀 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, ...) as native tools.

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

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>"
      }
    }
  }
}

Restart your MCP client and the copilot tools will appear in the tool list. See Python MCP SDK below for a non-Claude example.

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 MCP server exposes one tool per copilot. 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

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