> ## Documentation Index
> Fetch the complete documentation index at: https://absentify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect AI assistants to absentify to manage absences, search documentation, and execute API operations — all through natural language.

## What is the MCP server?

The absentify MCP server connects AI assistants directly to your absentify workspace. Using the [Model Context Protocol](https://modelcontextprotocol.io/) — an open standard supported by Claude, ChatGPT, Cursor, and more — your AI assistant can **manage absences, list members, approve requests, search documentation**, and much more.

<Info>
  **API MCP server URL:** `https://api.absentify.com/api/mcp`

  This is the main MCP server. It requires a [Plus plan](/docs/en/api-reference/quick_start) and an API key.
</Info>

## What can the AI do?

Once connected, your AI assistant can:

<CardGroup cols={2}>
  <Card title="Manage Absences" icon="calendar-check">
    Create, approve, decline, or cancel absence requests. List upcoming absences for your team.
  </Card>

  <Card title="Query Members" icon="users">
    Look up team members, check their schedules, view allowances, and manage department assignments.
  </Card>

  <Card title="Search Documentation" icon="magnifying-glass">
    Search the full absentify documentation and retrieve detailed guides — built right into the same server.
  </Card>

  <Card title="Configure Workspace" icon="gear">
    View and update workspace settings, leave types, public holidays, and department configurations.
  </Card>
</CardGroup>

### Example prompts

Here are some things you can ask your AI assistant once connected:

**Absence management:**

* *"Show me all pending absence requests"*
* *"Create a vacation request for next Monday to Friday"*
* *"Approve the absence request from Sarah"*
* *"How many sick days has the team taken this quarter?"*

**Team & members:**

* *"List all members in the Engineering department"*
* *"What's the remaining vacation allowance for John?"*
* *"Show me who is out of office this week"*

**Documentation & help:**

* *"How do I configure approval workflows with multiple approvers?"*
* *"What are the API rate limits?"*
* *"How does calendar synchronization work?"*

## Available tools

The MCP server provides **50+ tools** covering all API endpoints, plus documentation search:

| Category                 | Tools    | Examples                                                                                           |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------- |
| **Members**              | 14 tools | List, get, invite, update, delete members; manage approvers, schedules, representatives            |
| **Requests**             | 10 tools | List, create, approve, decline, cancel requests; recurring requests                                |
| **Allowance management** | 10 tools | List, create, update, delete allowance rules; assign members to a rule; add and remove adjustments |
| **Leave Types**          | 6 tools  | List, create, update, delete, restore leave types                                                  |
| **Departments**          | 5 tools  | List, create, update, delete departments                                                           |
| **Workspace**            | 2 tools  | Get and update workspace settings                                                                  |
| **Public Holidays**      | 2 tools  | List and get public holidays                                                                       |
| **Absences**             | 1 tool   | List absences per day with filters                                                                 |
| **Documentation**        | 2 tools  | Search docs and query documentation filesystem                                                     |

## Setup guide

### Requirements

* A [Plus plan subscription](/docs/en/api-reference/quick_start) with API access
* An API key (create one in **Settings > Integrations > API**)
* An MCP-compatible AI client

### Connect with OAuth (recommended)

The easiest way to connect — just add the URL. A browser window will open where you enter your API key.

<Tabs>
  <Tab title="Claude Desktop">
    <Steps>
      <Step title="Open settings">
        Select the Claude menu in your system's menu bar, then select **Settings...**
      </Step>

      <Step title="Open developer settings">
        Select the **Developer** tab in the left sidebar, then select **Edit Config**
      </Step>

      <Step title="Add the absentify MCP server">
        Add the following to your configuration file:

        ```json theme={null}
        {
          "mcpServers": {
            "absentify": {
              "url": "https://api.absentify.com/api/mcp"
            }
          }
        }
        ```

        <Note>
          If you already have other MCP servers configured, add the `"absentify"` entry inside the existing `"mcpServers"` object.
        </Note>
      </Step>

      <Step title="Restart and authorize">
        Restart Claude Desktop. A browser window will open asking for your API key. Enter it and select **Authorize**. You're connected!
      </Step>
    </Steps>
  </Tab>

  <Tab title="Claude Code (CLI)">
    Add the MCP server with a single command:

    ```bash theme={null}
    claude mcp add absentify --transport http https://api.absentify.com/api/mcp
    ```

    On first use, a browser window will open for authorization. Enter your API key and you're ready to go.

    Verify the connection:

    ```bash theme={null}
    claude mcp list
    ```
  </Tab>

  <Tab title="Cursor">
    <Steps>
      <Step title="Open MCP settings">
        Go to **Cursor Settings** > **MCP Servers**
      </Step>

      <Step title="Add new server">
        Select **Add new MCP server** and configure:

        * **Name**: `absentify`
        * **Type**: `http`
        * **Server URL**: `https://api.absentify.com/api/mcp`
      </Step>

      <Step title="Authorize">
        A browser window will open. Enter your API key and select **Authorize**.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Windsurf">
    <Steps>
      <Step title="Open MCP configuration">
        Open the command palette and search for **MCP: Configure Servers**
      </Step>

      <Step title="Add absentify server">
        Add the server configuration:

        ```json theme={null}
        {
          "absentify": {
            "serverUrl": "https://api.absentify.com/api/mcp"
          }
        }
        ```
      </Step>

      <Step title="Authorize">
        A browser window will open. Enter your API key and select **Authorize**.
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code + Copilot">
    <Steps>
      <Step title="Open MCP settings">
        Open Settings (Ctrl+,) and search for **MCP**
      </Step>

      <Step title="Add server">
        Add the server URL: `https://api.absentify.com/api/mcp`
      </Step>

      <Step title="Authorize">
        A browser window will open. Enter your API key and select **Authorize**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### Connect with API key header (alternative)

If your client doesn't support OAuth, you can pass the API key directly as a header:

<Tabs>
  <Tab title="Claude Desktop">
    ```json theme={null}
    {
      "mcpServers": {
        "absentify": {
          "url": "https://api.absentify.com/api/mcp",
          "headers": {
            "X-API-KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code (CLI)">
    ```bash theme={null}
    claude mcp add absentify --transport http https://api.absentify.com/api/mcp \
      --header "X-API-KEY: your-api-key-here"
    ```
  </Tab>

  <Tab title="Cursor">
    Configure in **MCP Settings**:

    * **Name**: `absentify`
    * **Type**: `http`
    * **Server URL**: `https://api.absentify.com/api/mcp`
    * **Header**: `X-API-KEY: your-api-key-here`
  </Tab>
</Tabs>

## Example: real conversation

Here's a real example of what a conversation with an MCP-connected AI looks like:

```
You: "Who is out of office this week in the Marketing department?"

AI: Let me check the current absences for the Marketing department.
    [Calls list_absences_per_day tool]

    Here are the Marketing team members currently out:
    - Anna Mueller: Vacation (Mon-Fri)
    - Tom Schmidt: Sick leave (Mon-Wed)
    - Lisa Weber: Working from home (Thu-Fri)

You: "Approve the pending request from Julia for next week"

AI: I found Julia's pending vacation request for May 19-23.
    [Calls approve_request tool]

    Done! Julia's vacation request has been approved.

You: "How many vacation days does our team have left this year?"

AI: Let me look up the remaining allowances.
    [Calls list_members tool with department filter]

    Here's the vacation allowance summary for Marketing:
    - Anna Mueller: 12 of 30 days remaining
    - Tom Schmidt: 18 of 28 days remaining
    - Julia Braun: 22 of 30 days remaining
    - Lisa Weber: 15 of 25 days remaining
```

<Note>
  **No Plus plan?** You can still use a free, read-only documentation MCP server at `https://absentify.com/docs/mcp` — no API key required. It lets your AI assistant search our docs and answer setup questions, but it cannot interact with your workspace.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Browser doesn't open for authorization">
    * Make sure you're using the correct URL: `https://api.absentify.com/api/mcp`
    * Check your default browser settings
    * Try the API key header method as an alternative
  </Accordion>

  <Accordion title="Authorization fails with 'Invalid API key'">
    * Verify your API key is correct in **Settings > Integrations > API**
    * Make sure you have an active [Plus plan subscription](/docs/en/api-reference/quick_start)
    * Try generating a new API key
  </Accordion>

  <Accordion title="Tools return errors after connecting">
    * Check the [API Limits](/docs/en/api-reference/limits) — you may be rate limited
    * Verify your API key has the correct permissions
    * Review the [Responses](/docs/en/api-reference/responses) documentation for error codes
  </Accordion>

  <Accordion title="AI is not using the MCP tools">
    * Mention "absentify" in your prompt to help the AI use the right tools
    * Check if the MCP tools icon appears in your client's interface
    * Try explicitly asking: *"Use the absentify tools to..."*
    * Restart your AI client after adding the MCP server
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Get an API Key" icon="key" href="/docs/en/api-reference/quick_start">
    Set up API access to start using the MCP server
  </Card>

  <Card title="API Reference" icon="square-terminal" href="/docs/en/api-reference/introduction">
    Browse all available API endpoints
  </Card>
</CardGroup>
