---
name: immojump-setup
description: Set up the immoJUMP MCP server connection for Claude Code or OpenAI Codex. Use when the user says "immojump setup", "connect to immojump", "MCP einrichten", "immoJUMP konfigurieren", or needs to configure their API access to the immoJUMP real estate platform.
metadata:
  version: 1.0.0
---

# immoJUMP MCP Setup

You are helping the user connect their AI coding assistant (Claude Code or OpenAI Codex) to the immoJUMP real estate platform via MCP (Model Context Protocol).

## Setup Flow

### Step 1: Detect the environment

Check which tool the user is running in:
- **Claude Code**: Look for `.mcp.json` or `.claude/` directory
- **OpenAI Codex**: Look for `~/.codex/config.toml`

If unclear, ask:
> Nutzt du **Claude Code** oder **OpenAI Codex**?

### Step 2: Ask for API token

> Um immoJUMP zu verbinden, brauche ich deinen **API-Token**.
> Du findest ihn unter: **immoJUMP → Einstellungen → API-Zugang**
>
> Bitte gib mir den Token (beginnt mit `eyJ...`).

### Step 3: Test the connection

Once you have the token, test it by calling:

```bash
curl -s -X POST https://mcp.immojump.de/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer TOKEN_HERE" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"setup","version":"1.0"}}}'
```

If it returns `"serverInfo":{"name":"immojump"}` → token works.
If it returns an error → ask user to check their token.

### Step 4: Get the organisation ID

After successful connection test, call the user endpoint to find their organisations:

```bash
# Use the session from Step 3 to call user_me
curl -s -X POST https://mcp.immojump.de/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer TOKEN_HERE" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"user_me","arguments":{}}}'
```

If the user has multiple organisations, list them and ask which one to use:
> Du hast Zugang zu diesen Organisationen:
> 1. Org Name A (ID: ...)
> 2. Org Name B (ID: ...)
>
> Welche soll ich konfigurieren?

### Step 5: Write the configuration

#### For Claude Code (.mcp.json)

Write to the project root `.mcp.json`:

```json
{
  "mcpServers": {
    "immojump": {
      "url": "https://mcp.immojump.de/sse",
      "headers": {
        "Authorization": "Bearer <TOKEN>",
        "X-Organisation-Id": "<ORG_ID>"
      }
    }
  }
}
```

#### For OpenAI Codex (~/.codex/config.toml)

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.immojump]
url = "https://mcp.immojump.de/mcp"
env_http_headers = { "Authorization" = "IMMOJUMP_AUTH_HEADER", "X-Organisation-Id" = "IMMOJUMP_ORGANISATION_ID" }
tool_timeout_sec = 60
```

And add to `~/.zshrc` (or `~/.bashrc`):

```bash
export IMMOJUMP_AUTH_HEADER="Bearer <TOKEN>"
export IMMOJUMP_ORGANISATION_ID="<ORG_ID>"
```

### Step 6: Confirm and instruct restart

> immoJUMP MCP ist konfiguriert!
>
> **Nächster Schritt:** Starte eine neue Session (Claude Code oder Codex neu starten).
> Danach kannst du z.B. fragen:
> - "Wie viele Immobilien habe ich?"
> - "Liste meine Kontakte"
> - "Erstelle eine Aktivität: Besichtigung morgen um 14 Uhr"
>
> **195 Tools** stehen zur Verfügung: Immobilien, Kontakte, Deals, Pipelines,
> Tickets, Dokumente, E-Mail, Feed, und mehr.

## Important Notes

- The MCP server runs at `https://mcp.immojump.de`
- It supports both SSE (`/sse`) and Streamable HTTP (`/mcp`) transports
- Claude Code uses SSE, Codex uses Streamable HTTP
- All 195 tools accept optional `token` and `organisation_id` parameters as fallback
- If headers are configured, credentials are automatic — no per-call params needed
- The server is stateless — credentials are not stored server-side
