# Mogacode-ma/infomaniak-mcp-agent [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/Mogacode-ma/infomaniak-mcp-agent  
**GitHub Stars:** 8  
**npm Downloads (last month):** 480  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mogacode-ma-infomaniak-mcp-agent

## Description
Unofficial agentic MCP server for Infomaniak (Swiss cloud provider). 54 tools covering web hosting, mail, kDrive, domains, DNS, DNSSEC, FTP/SSH users, AI catalogue and more. Two-phase commit on every destructive operation, history & undo, transparent reverse-engineering of undocumented manager-private endpoints.

## Tools
Capabilities this server exposes over MCP:

- **infomaniak_overview** — Summary of organizations + products. Best first call.
- **infomaniak_help** — Suggest tools matching a free-form intent ("create site", "list mailboxes"…).
- **infomaniak_explain** — Returns the full definition (description + schemas) of a specific tool.
- **infomaniak_audit_account** — Scan an organization for expirations / locked products / ongoing ops.
- **infomaniak_history** — List destructive actions taken in this session.
- **infomaniak_undo** — Reverse a session action when reversible (two-phase commit).
- **infomaniak_list_organizations** — Accounts you have technical access to.
- **infomaniak_list_hostings** — Web hostings (classic + Node.js) for one organization.
- **infomaniak_list_domains** — Domains for one organization, with creation + expiration dates.
- **infomaniak_get_domain** — Detail of one domain (DNS managed?, DNSSEC, errors).
- **infomaniak_find_site** — Domain-first lookup.** Resolves a public domain (e.g. `example.com`) to `{account_id, hosting_id, hosting_label, site_id, full site object}`. Use this BEFORE any tool that needs `hosting_id + site_id`. Replaces iterating every hosting's `list_sites` (46+ API calls on a real fleet).
- **infomaniak_list_sites** — Sites on a given web hosting (with applications).
- **infomaniak_create_site** — Two-phase: returns a plan + token, second call with token actually creates.
- **infomaniak_delete_site** — Two-phase delete (full preview of the site to be removed).
- **infomaniak_list_site_aliases** — FQDNs (main + aliases) bound to a site.
- **infomaniak_add_site_aliases** — Bind one or more FQDNs (wildcards like `*.example.com` accepted). Two-phase. Asynchronous: returns a `progress_id`, the alias shows up in `list_site_aliases` a few seconds later.
- **infomaniak_delete_site_alias** — Unbind one alias FQDN (the main FQDN cannot be removed). Two-phase.
- **infomaniak_get_certificate** — Current cert status (`updating`/`ok`/`error`), issuer, expiry, ACME identifier errors.
- **infomaniak_request_certificate** — Two-phase. Issue or renew a cert. Three `type` values: `free` (Let's Encrypt), `paid` (Sectigo, requires `certificate_id`), `custom` (BYO PEM, requires `certificate` + `private_key`).
- **infomaniak_delete_certificate** — Two-phase. Remove the cert from a site. Undo via `request_certificate` with `type: "free"`.
- **infomaniak_list_databases** — MariaDB databases attached to a hosting (with disk usage).
- **infomaniak_get_database** — Detail of one database.
- **infomaniak_create_database** — Two-phase create.
- **infomaniak_delete_database** — Two-phase delete (plan shows disk usage + linked app).
- **infomaniak_list_database_users** — MariaDB-level user accounts attached to a hosting (`applications`, `permissions`, phpMyAdmin link).
- **infomaniak_get_database_user** — Detail of a single MariaDB user.
- **infomaniak_change_database_user_password** — Rotate a MariaDB user's password **and** re-declare its grants atomically. Two-phase.
- **infomaniak_change_database_user_permissions** — Change which databases a user can reach (read/write/admin per DB), password untouched. Two-phase.
- **infomaniak_list_hosting_users** — FTP / SSH users on a web hosting.
- **infomaniak_create_hosting_user** — Two-phase create with `connection_type`: `ftp` (SFTP-only) or `ssh` (full shell + FTP).
- **infomaniak_change_hosting_user_password** — Rotate an FTP/SSH user's password. Two-phase. Pass the user's current `connection_type` to leave it untouched.
- **infomaniak_change_hosting_user_connection_type** — Promote / demote a user between `ftp` and `ssh`. Password untouched. Two-phase.
- **infomaniak_delete_hosting_user** — Two-phase revoke (files preserved).
- **infomaniak_dns_list_records** — Every DNS record on an Infomaniak-managed zone.
- **infomaniak_dns_create_record** — Two-phase create record (A, AAAA, CNAME, MX, TXT, SRV, NS, CAA, PTR, SPF).
- **infomaniak_dns_update_record** — Two-phase update (current vs proposed diff in the plan).
- **infomaniak_dns_delete_record** — Two-phase delete record (with full preview before commit).
- **infomaniak_manage_dnssec** — Unified DNSSEC: `action: check` (read-only, KSK/DS records), `action: enable` or `action: disable` (two-phase commit destructive). Replaces the v0.9 trio `dnssec_check` / `dnssec_enable` / `dnssec_disable`.
- **infomaniak_list_mail_hostings** — Mail hostings for one organization.
- **infomaniak_list_mailboxes** — Mailboxes on a given mail hosting.
- **infomaniak_get_mailbox_info** — Unified mailbox read: pass `fields: ["aliases" \
- **infomaniak_create_mailbox** — Two-phase create with password policy enforcement.
- **infomaniak_delete_mailbox** — Two-phase delete (also wipes stored mail).
- **infomaniak_create_mailbox_alias** — Two-phase add alias to a mailbox.
- **infomaniak_list_redirections** — Server-side mail redirection rules.
- **infomaniak_create_redirection** — Two-phase create rule (forward `name@…` to N targets).
- **infomaniak_delete_redirection** — Two-phase delete rule.
- **infomaniak_get_my_profile** — Name, email, language, country, timezone, current account, security posture (2FA, devices, last login).
- **infomaniak_get_my_security** — Focused security report — 2FA method + status, recovery email, validated phone, Yubikey, rescue codes, password age, trusted devices with IP/time.
- **infomaniak_get_account_full** — Full org detail: legal entity, billing addresses, VAT, locale, support tier, 2FA-required policy, your role, tags.
- **infomaniak_list_teams_and_tags** — Teams (owners + counts) + tags (with products carrying each tag) in a single call.
- **infomaniak_get_mail_hosting_full** — DNS health diagnostic (MX/SPF/DKIM/DMARC), quotas, admin, parent kSuite link, FQDNs, team access.
- **infomaniak_get_mailbox_full** — Auto-responder, aliases, IMAP/POP3 last login, password age, mailbox size, devices, DKIM, SMTP ban, mail filtering (commercials/social), authorized/blocked senders.
- **infomaniak_get_domain_full** — auth_code` (EPP), transfer/trade status, glue records, TLD/registry, attached service, DNS detail + health, associated products, DNS logs URL. Accepts id or FQDN.
- **infomaniak_get_drive_full** — Drive name, total size, used size, maintenance.
- **infomaniak_list_drive_users** — Users with access to a kDrive (access audits).
- **infomaniak_list_drive_trash** — Items in the trash bin with deletion timestamps.
- **infomaniak_list_vps** — List Cloud Server (Jelastic) products of an org.
- **infomaniak_get_vps_full** — Datacenter, IPs, CPU/RAM, bandwidth + traffic, disk usage, MySQL/PHP versions, firewall, premium support contacts, migration history.
- **infomaniak_list_nodejs_apps** — Discover the apps on a Node.js hosting. Returns each app's `vhost_route_id` (handle for every other Node.js tool) and its serving FQDNs.
- **infomaniak_get_nodejs_app** — Full app config: Node version, listen port, `start_command`, `build_command`, public IPs (v4 + v6), SSL state, directory, storage quota.
- **infomaniak_nodejs_app_status** — Live status — `Running` or `Stopped`. Cheap, safe to poll.
- **infomaniak_nodejs_app_aliases** — All FQDNs serving the app (primary + auto `xxx.preview.hosting-ik.com`).
- **infomaniak_nodejs_app_jobs** — Recent jobs (build / restart / …) with per-job log_stream JWT.
- **infomaniak_nodejs_app_logs** — Returns a short-lived JWT + SSE endpoint URL to consume the **live stdout/stderr stream** of the running app.
- **infomaniak_nodejs_app_thumbnail** — Screenshot of the live page as a base64 JPEG — visual smoke test without HTTP-probing.
- **infomaniak_nodejs_app_action** — Two-phase. Start / stop / restart / build. `stop` records an undo to `start`. `build` returns the spawned job's `resource_id` + live `log_stream` to tail the output.
- **infomaniak_list_drives** — All kDrives the account has access to (with quota).
- **infomaniak_list_drive_files** — Files / subfolders of a drive root or any folder, paginated.
- **infomaniak_list_short_urls** — Short URLs configured on a domain.
- **infomaniak_short_urls_quota** — Short URL quota used / available on a domain.
- **infomaniak_create_short_url** — Two-phase create.
- **infomaniak_list_swiss_backups** — Swiss Backup slots on the account.
- **infomaniak_list_ai_products** — AI subscriptions the account owns.
- **infomaniak_list_ai_models** — Public catalogue of Swiss-sovereign LLM/STT models.
- **infomaniak_provision_site_full** — Site + DB + DNS in one orchestrated, plan-then-apply flow.
- **infomaniak_audit_dns_zones** — Cross-zone audit: missing SPF/DMARC, dangling records, ….
- **infomaniak_api_call** — Reach any endpoint on `api.infomaniak.com` directly. GET runs immediately, POST/PUT/PATCH/DELETE follow the two-phase commit. Refuses paths outside the documented `/{1,2,3}/...` namespace and refuses manager-private `/proxy/...` (use a typed tool).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "infomaniak-mcp-agent": {
    "command": "npx",
    "args": ["-y","infomaniak-mcp-agent"],
    "env": {
      "INFOMANIAK_BEARER_TOKEN": "",
      "INFOMANIAK_MANAGER_COOKIE": ""
    }
  }
}
```

**Requires environment variables:** `INFOMANIAK_BEARER_TOKEN`, `INFOMANIAK_MANAGER_COOKIE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation & README

# infomaniak-mcp-agent

[![npm version](https://img.shields.io/npm/v/infomaniak-mcp-agent.svg)](https://www.npmjs.com/package/infomaniak-mcp-agent)
[![npm downloads](https://img.shields.io/npm/dm/infomaniak-mcp-agent.svg)](https://www.npmjs.com/package/infomaniak-mcp-agent)
[![CI](https://github.com/Mogacode-ma/infomaniak-mcp-agent/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Mogacode-ma/infomaniak-mcp-agent/actions/workflows/ci.yml)
[![CodeQL](https://github.com/Mogacode-ma/infomaniak-mcp-agent/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Mogacode-ma/infomaniak-mcp-agent/actions/workflows/codeql.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![Node](https://img.shields.io/badge/node-%3E%3D18-43853d.svg)](https://nodejs.org)
[![TypeScript strict](https://img.shields.io/badge/TypeScript-strict-3178c6.svg)](https://www.typescriptlang.org/)
[![MCP](https://img.shields.io/badge/Model_Context_Protocol-1.0-9333ea.svg)](https://modelcontextprotocol.io/)
[![Tools](https://img.shields.io/badge/tools-78-blueviolet.svg)](#tools)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
[![GitHub stars](https://img.shields.io/github/stars/Mogacode-ma/infomaniak-mcp-agent?style=social)](https://github.com/Mogacode-ma/infomaniak-mcp-agent/stargazers)

> **Drive your entire [Infomaniak](https://www.infomaniak.com) account from [Claude](https://www.anthropic.com/claude) — agentic, two-phase commit, open-source.**

`infomaniak-mcp-agent` is an unofficial [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes the full surface of Infomaniak — Switzerland's sovereign cloud — as **78 tools** an LLM can call directly: web hosting, mail (kSuite), kDrive, domains, DNS, DNSSEC, FTP/SSH users, AI products, account audits and more. Every destructive operation goes through a strict two-phase commit, so an agent can never silently delete or mutate something on your account.

```
You → Claude:  "audit the example.com hosting and tell me which mailboxes are over quota"
Claude → MCP:  infomaniak_audit_account → infomaniak_list_mail_hostings → infomaniak_list_mailboxes
Claude → You:  3 mailboxes >85% — paul@ (94%), notify@ (88%), team@ (87%). Want me to add an alert?
```

## Table of contents

- [Why](#why-this-exists) · [What it does](#what-you-can-do-with-it) · [How it differs](#why-agentic-and-not-wrapper)
- [Install](#install) · [Authentication](#authentication) · [Quick example](#quick-example)
- [Tools](#tools) (78 across 22 areas) · [Limitations](#limitations) · [Roadmap](#roadmap) · [FAQ](#faq)
- [Contributing](#contributing) · [License](#license)

## Why this exists

Infomaniak is one of the very few **independent, Swiss-owned, open-source-friendly cloud providers** in Europe — running its own datacentres in Switzerland, on hydro and wind power, with no parent in the US or China. Its product range is huge (web hosting, mail, kDrive, kChat, DNS, AI cloud, Swiss Backup, …) but its API is split between a documented public surface and a private manager-only one — which means automating real workflows usually requires a browser session, custom scripts, or both.

This project closes that gap by exposing **everything** through a single MCP server, so Claude or any other MCP client can run real account operations through natural language: provision a hosting, rotate a DNS record, create a mailbox, audit your domains for upcoming expirations, browse your kDrive — without ever forcing you to leave the chat or write a script.

## 🎒 Built in the open, in real time, by vibe-coding

This project was built rapidly by an LLM driving a terminal session ("vibe-coding"), with live tests against a real Infomaniak account at every step. **It works perfectly on the maintainer's local setup** and the full pipeline is green (TypeScript strict, ESLint, Prettier, 78 tests, build, CodeQL, gitleaks).

That said — given how it was built and given that several endpoints used here are reverse-engineered (see [`REVERSE-ENGINEERING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md)) — **it is entirely possible that you'll hit (potentially big) bugs** depending on your account topology, plan tier, scopes, or Infomaniak's own changes. We are here to fix them as they show up. Please:

1. Open an issue with the exact tool call, the input, the response, and your environment (Node version, OS, MCP client). Sanitize tokens / cookies / customer names before pasting.
2. Or, even better, send a PR with a failing test and we will work from there together.

We move fast and ship often. Don't be shy.

## ⚠️ Status: unofficial

This project is **not affiliated with, endorsed by, or sponsored by Infomaniak Network SA**. It is a community-driven tool that combines:

1. The **public Infomaniak API** ([api.infomaniak.com](https://developer.infomaniak.com/)), used with a Bearer token you generate yourself.
2. **Reverse-engineered manager endpoints** ([manager.infomaniak.com/proxy/...](https://manager.infomaniak.com/)), required for write operations on web hosting that the public API silently ignores.

For full transparency, read [`REVERSE-ENGINEERING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md). Infomaniak may change these endpoints without notice; we do our best to keep up but cannot guarantee long-term compatibility.

## What you can do with it

Once installed, you can ask Claude things like:

- *"List every domain on my account that expires in less than 60 days, sorted by date."*
- *"Create a new site `staging.example.com` on hosting `WP1234567`, PHP 8.3, root in `/sites/staging`."*
- *"Add a TXT record on `example.com` for the new Postmark DKIM, then verify it resolves."*
- *"How much disk does the database `myprefix_wp123456` use, and which application is wired to it?"*
- *"Create a mailbox `hello@example.com` with a 16-character random password and forward it to my Gmail."*
- *"Show me which kDrives I'm an admin on and how full they are."*
- *"Audit my whole account: any locked product, expiring SSL, broken DNSSEC, ongoing operations?"*
- *"Undo the last DNS change I made through this session."*

It will not silently mutate anything destructive: every change goes through a *plan + confirmation token* round-trip. You stay in control even if the model gets creative.

## Why "agentic" and not "wrapper"

Most MCP servers expose one tool per HTTP endpoint and call it a day. This one is built differently:

- **Guided dialogues** — creating a site walks you through "which organization? which hosting? root domain or subdomain? what type? recap?" instead of asking you to know the right tool to call upfront.
- **Two-phase commit** — every destructive operation returns a *plan* with a single-use confirmation token (60 s TTL). Nothing is mutated until you call back with the token.
- **Pre-flight checks** — the server checks for conflicts (existing FQDN, busy hosting, expired domain) *before* hitting the API.
- **Actionable errors** — every error tells you what happened, why, and the next step you can take.
- **Introspection** — `infomaniak_overview`, `infomaniak_help` and `infomaniak_explain` give the agent context-on-demand instead of forcing it to memorize a tool catalog.
- **Session memory** — `infomaniak_history` lists every destructive action of the current session, and `infomaniak_undo` reverses the ones that are reversible.

See [`ARCHITECTURE.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/ARCHITECTURE.md) for the full design rationale.

## Install

Available on npm — the recommended path is to let `npx` fetch the latest release on demand:

```bash
npx infomaniak-mcp-agent
```

(no install step needed; `npx` resolves the latest version on first invocation and caches it).

Or install globally if you prefer a stable binary in your `$PATH`:

```bash
npm install -g infomaniak-mcp-agent
```

If you'd rather pin to a specific commit (or hack on the source), install from this repo:

```bash
git clone https://github.com/Mogacode-ma/infomaniak-mcp-agent.git
cd infomaniak-mcp-agent
npm ci
npm run build
# resulting binary: ./dist/server.js
```

### Configure Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%AppData%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "infomaniak": {
      "command": "npx",
      "args": ["-y", "infomaniak-mcp-agent"],
      "env": {
        "INFOMANIAK_API_TOKEN": "paste-your-token-here",
        "INFOMANIAK_AUTH_MODE": "auto"
      }
    }
  }
}
```

Restart Claude Desktop to pick up the change.

### Configure Claude Code

```bash
claude mcp add infomaniak \
  -e INFOMANIAK_API_TOKEN=paste-your-token-here \
  -e INFOMANIAK_AUTH_MODE=auto \
  -- npx -y infomaniak-mcp-agent
```

## Authentication

Two distinct credentials are needed because Infomaniak runs two APIs side-by-side:

| API | Auth | Purpose |
|---|---|---|
| `api.infomaniak.com/{1,2}/...` | **Bearer token** | Read-mostly: profile, products, mail, drive, dns, domains, billing |
| `manager.infomaniak.com/proxy/...` | **SASESSION cookie + CSRF token** | Writes on web hosting (sites, databases, applications) |

### 1. Bearer token (required)

1. Sign in to your Infomaniak account.
2. Go to [manager.infomaniak.com/v3/ng/profile/user/token/list](https://manager.infomaniak.com/v3/ng/profile/user/token/list).
3. Click **"Create a token"**, give it a long lifetime, copy the value.
4. Set it in `INFOMANIAK_API_TOKEN`.

### 2. Manager session (auto, recommended)

The manager-private API does not accept Bearer tokens or OAuth (Infomaniak only exposes `openid profile email phone` scopes to third-party apps; `web`, `mail`, etc. are reserved). Instead, we read the `SASESSION` and `MANAGER-XSRF-TOKEN` cookies that **your local Chrome already has** when you are logged into [manager.infomaniak.com](https://manager.infomaniak.com).

With `INFOMANIAK_AUTH_MODE=auto` (the default), the MCP reads these cookies on demand using [`chrome-cookies-secure`](https://www.npmjs.com/package/chrome-cookies-secure). Nothing is ever written to disk; cookies live in memory for the duration of one operation.

When the session expires, simply reload [manager.infomaniak.com](https://manager.infomaniak.com) in Chrome — the MCP will pick up the fresh cookies on the next call.

### 3. Manager session (manual fallback)

For headless environments or troubleshooting:

```env
INFOMANIAK_AUTH_MODE=manual
INFOMANIAK_SASESSION=...
INFOMANIAK_XSRF_TOKEN=...
```

To copy them: open Chrome DevTools on [manager.infomaniak.com](https://manager.infomaniak.com), Application → Cookies, copy `SASESSION` and `MANAGER-XSRF-TOKEN` (URL-encoded — paste as-is, the MCP decodes).

## Quick example

A typical first conversation, end-to-end:

```text
You:    What's on my account?
Claude: [calls infomaniak_overview]
        You have 16 organizations, 311 products: 47 web hostings, 73 domains,
        12 mail hostings, 3 kDrives, 2 AI Tools subscriptions.

You:    Any domain expiring soon?
Claude: [calls infomaniak_audit_account on each org]
        2 domains expire in <30 days: example.com (April 22), demo.org (May 04).
        4 SSL certificates were auto-renewed in the last 7 days. No locked products.

You:    Create a TXT record on example.com saying "v=spf1 include:spf.example.net ~all".
Claude: [calls infomaniak_dns_create_record → returns plan + token]
        Plan: CREATE TXT record on example.com → "v=spf1 include:spf.example.net ~all", TTL 3600.
        Confirm with token abc-123 within 60 s.

You:    Confirm.
Claude: [calls infomaniak_dns_create_record again with the token]
        Done. Record id 84219113. Logged in session history (undoable).
```

## Tools

78 tools across 22 areas. Use `infomaniak_help` to fuzzy-search by intent, or `infomaniak_explain` to dump a tool's full JSON schema.

### Introspection (start here)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_overview` | read-only | Summary of organizations + products. Best first call. |
| `infomaniak_help` | read-only | Suggest tools matching a free-form intent ("create site", "list mailboxes"…). |
| `infomaniak_explain` | read-only | Returns the full definition (description + schemas) of a specific tool. |
| `infomaniak_audit_account` | read-only | Scan an organization for expirations / locked products / ongoing ops. |
| `infomaniak_history` | read-only | List destructive actions taken in this session. |
| `infomaniak_undo` | **destructive** | Reverse a session action when reversible (two-phase commit). |

### Organizations & products
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_organizations` | read-only | Accounts you have technical access to. |
| `infomaniak_list_hostings` | read-only | Web hostings (classic + Node.js) for one organization. |
| `infomaniak_list_domains` | read-only | Domains for one organization, with creation + expiration dates. |
| `infomaniak_get_domain` | read-only | Detail of one domain (DNS managed?, DNSSEC, errors). |

### Web hosting sites
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_find_site` | read-only | **Domain-first lookup.** Resolves a public domain (e.g. `example.com`) to `{account_id, hosting_id, hosting_label, site_id, full site object}`. Use this BEFORE any tool that needs `hosting_id + site_id`. Replaces iterating every hosting's `list_sites` (46+ API calls on a real fleet). |
| `infomaniak_list_sites` | read-only | Sites on a given web hosting (with applications). |
| `infomaniak_create_site` | **destructive** | Two-phase: returns a plan + token, second call with token actually creates. |
| `infomaniak_delete_site` | **destructive** | Two-phase delete (full preview of the site to be removed). |

### Site aliases
Additional FQDNs bound to an existing site's Apache vhost / DocumentRoot — how you serve several domains from a single install without provisioning a new site.

| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_site_aliases` | read-only | FQDNs (main + aliases) bound to a site. |
| `infomaniak_add_site_aliases` | **destructive** | Bind one or more FQDNs (wildcards like `*.example.com` accepted). Two-phase. Asynchronous: returns a `progress_id`, the alias shows up in `list_site_aliases` a few seconds later. |
| `infomaniak_delete_site_alias` | **destructive** | Unbind one alias FQDN (the main FQDN cannot be removed). Two-phase. |

### SSL certificates
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_certificate` | read-only | Current cert status (`updating`/`ok`/`error`), issuer, expiry, ACME identifier errors. |
| `infomaniak_request_certificate` | **destructive** | Two-phase. Issue or renew a cert. Three `type` values: `free` (Let's Encrypt), `paid` (Sectigo, requires `certificate_id`), `custom` (BYO PEM, requires `certificate` + `private_key`). |
| `infomaniak_delete_certificate` | **destructive** | Two-phase. Remove the cert from a site. Undo via `request_certificate` with `type: "free"`. |

### Databases
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_databases` | read-only | MariaDB databases attached to a hosting (with disk usage). |
| `infomaniak_get_database` | read-only | Detail of one database. |
| `infomaniak_create_database` | **destructive** | Two-phase create. |
| `infomaniak_delete_database` | **destructive** | Two-phase delete (plan shows disk usage + linked app). |
| `infomaniak_list_database_users` | read-only | MariaDB-level user accounts attached to a hosting (`applications`, `permissions`, phpMyAdmin link). |
| `infomaniak_get_database_user` | read-only | Detail of a single MariaDB user. |
| `infomaniak_change_database_user_password` | **destructive** | Rotate a MariaDB user's password **and** re-declare its grants atomically. Two-phase. |
| `infomaniak_change_database_user_permissions` | **destructive** | Change which databases a user can reach (read/write/admin per DB), password untouched. Two-phase. |

> ⚠️ Both tools take a `grants` array that declares **every** database the user may access — anything omitted is set to no-access. Call `infomaniak_get_database_user` first and copy the current `permissions`, or you will silently revoke access. This is deliberate: it is also the canonical way to revoke a grant.
>
> They use the manager-private endpoint rather than the public API on purpose. The public `PATCH /1/web_hostings/{id}/database_users/{user}` accepts a password, changes it, and **silently wipes `permissions` and `applications`** — see [`REVERSE-ENGINEERING.md` §Database users](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md#database-users--patch-database_usersuser-silently-wipes-permissions-).
>
> Prefer these tools over a direct MariaDB `ALTER USER` / `SET PASSWORD` over SSH. The manager is the source of truth for hosting database credentials: a password set only in MariaDB diverges from it silently, and gets reverted to the manager's value at the next Infomaniak maintenance — which can be months later, with no apparent link to the change.

### FTP / SSH users
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_hosting_users` | read-only | FTP / SSH users on a web hosting. |
| `infomaniak_create_hosting_user` | **destructive** | Two-phase create with `connection_type`: `ftp` (SFTP-only) or `ssh` (full shell + FTP). |
| `infomaniak_change_hosting_user_password` | **destructive** | Rotate an FTP/SSH user's password. Two-phase. Pass the user's current `connection_type` to leave it untouched. |
| `infomaniak_change_hosting_user_connection_type` | **destructive** | Promote / demote a user between `ftp` and `ssh`. Password untouched. Two-phase. |
| `infomaniak_delete_hosting_user` | **destructive** | Two-phase revoke (files preserved). |

### DNS & DNSSEC
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_dns_list_records` | read-only | Every DNS record on an Infomaniak-managed zone. |
| `infomaniak_dns_create_record` | **destructive** | Two-phase create record (A, AAAA, CNAME, MX, TXT, SRV, NS, CAA, PTR, SPF). |
| `infomaniak_dns_update_record` | **destructive** | Two-phase update (current vs proposed diff in the plan). |
| `infomaniak_dns_delete_record` | **destructive** | Two-phase delete record (with full preview before commit). |
| `infomaniak_manage_dnssec` | mixed | Unified DNSSEC: `action: check` (read-only, KSK/DS records), `action: enable` or `action: disable` (two-phase commit destructive). Replaces the v0.9 trio `dnssec_check` / `dnssec_enable` / `dnssec_disable`. |

### Mail
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_mail_hostings` | read-only | Mail hostings for one organization. |
| `infomaniak_list_mailboxes` | read-only | Mailboxes on a given mail hosting. |
| `infomaniak_get_mailbox_info` | read-only | Unified mailbox read: pass `fields: ["aliases" \| "signatures" \| "backups"]` (subset or all). Fetches in parallel, per-section errors returned independently. Replaces the v0.9 trio `get_mailbox_aliases` / `get_mailbox_signatures` / `get_mailbox_backups`. |
| `infomaniak_create_mailbox` | **destructive** | Two-phase create with password policy enforcement. |
| `infomaniak_delete_mailbox` | **destructive** | Two-phase delete (also wipes stored mail). |
| `infomaniak_create_mailbox_alias` | **destructive** | Two-phase add alias to a mailbox. |
| `infomaniak_list_redirections` | read-only | Server-side mail redirection rules. |
| `infomaniak_create_redirection` | **destructive** | Two-phase create rule (forward `name@…` to N targets). |
| `infomaniak_delete_redirection` | **destructive** | Two-phase delete rule. |

### Identity ("who am I?")
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_my_profile` | read-only | Name, email, language, country, timezone, current account, security posture (2FA, devices, last login). |
| `infomaniak_get_my_security` | read-only | Focused security report — 2FA method + status, recovery email, validated phone, Yubikey, rescue codes, password age, trusted devices with IP/time. |

### Account / Org (deep)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_account_full` | read-only | Full org detail: legal entity, billing addresses, VAT, locale, support tier, 2FA-required policy, your role, tags. |
| `infomaniak_list_teams_and_tags` | read-only | Teams (owners + counts) + tags (with products carrying each tag) in a single call. |

### Mail (deep)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_mail_hosting_full` | read-only | DNS health diagnostic (MX/SPF/DKIM/DMARC), quotas, admin, parent kSuite link, FQDNs, team access. |
| `infomaniak_get_mailbox_full` | read-only | Auto-responder, aliases, IMAP/POP3 last login, password age, mailbox size, devices, DKIM, SMTP ban, mail filtering (commercials/social), authorized/blocked senders. |

### Domain (deep)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_domain_full` | read-only | `auth_code` (EPP), transfer/trade status, glue records, TLD/registry, attached service, DNS detail + health, associated products, DNS logs URL. Accepts id or FQDN. |

### kDrive (deep, manager-private)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_get_drive_full` | read-only | Drive name, total size, used size, maintenance. |
| `infomaniak_list_drive_users` | read-only | Users with access to a kDrive (access audits). |
| `infomaniak_list_drive_trash` | read-only | Items in the trash bin with deletion timestamps. |

### VPS / Cloud Server
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_vps` | read-only | List Cloud Server (Jelastic) products of an org. |
| `infomaniak_get_vps_full` | read-only | Datacenter, IPs, CPU/RAM, bandwidth + traffic, disk usage, MySQL/PHP versions, firewall, premium support contacts, migration history. |

### Node.js apps (Cloud Server `hosting_3`)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_nodejs_apps` | read-only | Discover the apps on a Node.js hosting. Returns each app's `vhost_route_id` (handle for every other Node.js tool) and its serving FQDNs. |
| `infomaniak_get_nodejs_app` | read-only | Full app config: Node version, listen port, `start_command`, `build_command`, public IPs (v4 + v6), SSL state, directory, storage quota. |
| `infomaniak_nodejs_app_status` | read-only | Live status — `Running` or `Stopped`. Cheap, safe to poll. |
| `infomaniak_nodejs_app_aliases` | read-only | All FQDNs serving the app (primary + auto `xxx.preview.hosting-ik.com`). |
| `infomaniak_nodejs_app_jobs` | read-only | Recent jobs (build / restart / …) with per-job log_stream JWT. |
| `infomaniak_nodejs_app_logs` | read-only | Returns a short-lived JWT + SSE endpoint URL to consume the **live stdout/stderr stream** of the running app. |
| `infomaniak_nodejs_app_thumbnail` | read-only | Screenshot of the live page as a base64 JPEG — visual smoke test without HTTP-probing. |
| `infomaniak_nodejs_app_action` | **destructive** | Two-phase. Start / stop / restart / build. `stop` records an undo to `start`. `build` returns the spawned job's `resource_id` + live `log_stream` to tail the output. |

> All Node.js tools are **manager-private** (the public Bearer API exposes only a state-check for Node.js hostings). They require `INFOMANIAK_AUTH_MODE=auto` (Chrome cookies) or `manual` (SASESSION + MANAGER-XSRF-TOKEN env vars). See [`REVERSE-ENGINEERING.md` §Node.js DevOps](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md#nodejs-devops--the-proxy1-namespace).

### kDrive
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_drives` | read-only | All kDrives the account has access to (with quota). |
| `infomaniak_list_drive_files` | read-only | Files / subfolders of a drive root or any folder, paginated. |

### URL shortener
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_short_urls` | read-only | Short URLs configured on a domain. |
| `infomaniak_short_urls_quota` | read-only | Short URL quota used / available on a domain. |
| `infomaniak_create_short_url` | **destructive** | Two-phase create. |

### Swiss Backup
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_swiss_backups` | read-only | Swiss Backup slots on the account. |

### AI Tools
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_list_ai_products` | read-only | AI subscriptions the account owns. |
| `infomaniak_list_ai_models` | read-only | Public catalogue of Swiss-sovereign LLM/STT models. |

### Workflows (multi-step)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_provision_site_full` | **destructive** | Site + DB + DNS in one orchestrated, plan-then-apply flow. |
| `infomaniak_audit_dns_zones` | read-only | Cross-zone audit: missing SPF/DMARC, dangling records, …. |

### Escape hatch (everything else)
| Tool | Annotation | Purpose |
|---|---|---|
| `infomaniak_api_call` | **destructive** | Reach any endpoint on `api.infomaniak.com` directly. GET runs immediately, POST/PUT/PATCH/DELETE follow the two-phase commit. Refuses paths outside the documented `/{1,2,3}/...` namespace and refuses manager-private `/proxy/...` (use a typed tool). |

## Limitations

- **Hard rate limit of 60 req/min** on `api.infomaniak.com`. The MCP throttles automatically with a token-bucket. You will see brief queueing delays on heavy bursts; this is intentional and protects your token from blacklisting.
- **No `directory` outside `/sites/`** when creating a site. Required by the manager backend (silently no-ops otherwise — see [`REVERSE-ENGINEERING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md#post-sites-silent-success)).
- **Manager session cookies expire** (typically every few hours / when you sign out of Chrome). Re-open [manager.infomaniak.com](https://manager.infomaniak.com) to refresh.
- **One concurrent operation per hosting** — Infomaniak rejects concurrent POSTs on the same hosting with `400 operation_in_progress`. The MCP serializes write calls per hosting.
- **WordPress installation is intentionally out of scope.** Create the empty site with this MCP, then install WP from the manager's wizard (the `applications/add` flow uses an undocumented per-step wizard that is too brittle to automate cleanly today).

## Roadmap

**Shipped in v0.7 (current)**

- ✅ Web hosting: list + create + delete sites, databases, FTP/SSH users
- ✅ DNS: full CRUD on records, DNSSEC enable/disable/check
- ✅ Mail: mailboxes, aliases, signatures, backups, redirections — all CRUD
- ✅ kDrive: list drives + browse files
- ✅ Swiss Backup: list slots
- ✅ AI Tools: list products + public model catalogue
- ✅ URL shortener: full CRUD
- ✅ Account audit: domains expiring soon, locked products, ongoing operations
- ✅ Workflow tools: `provision_site_full`, `audit_dns_zones`
- ✅ `undo` / `history` session tools
- ✅ Generic API escape hatch for any documented endpoint

**Next (v0.8+)**

- ⬜ kDrive write: upload, download, move, share, archive
- ⬜ Newsletter: campaigns, contacts (untouched today)
- ⬜ kChat: channels, threads, posts (no public API yet — needs reverse-engineering)
- ⬜ Workflow: `provision_wordpress_site` (needs a WP install path that does not depend on the brittle manager wizard)
- ⬜ Swiss Backup write: slot creation, schedules, restores
- ⬜ Per-tool happy-path tests to push coverage from 35% to 70%
- ⬜ MCPB packaging for one-click install in Claude Desktop

## FAQ

### Is this an official Infomaniak product?

No. It is community-driven, MIT-licensed, and not affiliated with, endorsed by, or sponsored by Infomaniak Network SA. See the disclaimers in [`NOTICE`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/NOTICE) and [`REVERSE-ENGINEERING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md).

### Does it work with clients other than Claude?

Yes. It speaks the standard [Model Context Protocol](https://modelcontextprotocol.io/) over stdio, so it works with any MCP-capable client — Claude Desktop, Claude Code, Cursor, Cline, Continue, Zed AI, and the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for debugging.

### Will my Infomaniak token / session ever leave my machine?

No. The server runs locally over stdio. Your Bearer token is read from `INFOMANIAK_API_TOKEN` (env or `.env`) and used only to call `api.infomaniak.com`. The Chrome cookies (`SASESSION`, `MANAGER-XSRF-TOKEN`) live in memory for the duration of a single tool call and are never persisted. Logs redact every sensitive value (tokens, cookies, passwords).

### Does it support self-hosting / running outside macOS?

Yes — `INFOMANIAK_AUTH_MODE=manual` lets you paste cookies straight into env vars, which is the path to use on Linux servers, Docker containers, or CI. Auto-extraction from Chrome works on macOS, Windows, and Linux when Chrome is installed locally.

### Why does site creation use a manager-private endpoint and not the public API?

Because the public `POST /1/products/{id}/web_hostings/{hid}/sites` endpoint silently returns a success response without actually creating anything. After reverse-engineering the manager bundle we found that the manager-private endpoint requires `force_fqdn: true`, `directory: /sites/...`, and `environment: apache_php` — none of which are documented. Full write-up in [`REVERSE-ENGINEERING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/REVERSE-ENGINEERING.md).

### Can it install WordPress automatically?

Not today. The manager's `applications/add` flow is a multi-step wizard with per-step tokens that is brittle to script. The recommended pattern is: create the empty site with this MCP, then install WordPress (or any other CMS) from the manager wizard or by uploading via FTP/SSH.

### Is there a hosted / SaaS version?

No. By design — this server runs against your own credentials on your own machine. There is no hosted SaaS, no hosted proxy, no telemetry.

### How do I report a bug or request a tool?

Open a [GitHub issue](https://github.com/Mogacode-ma/infomaniak-mcp-agent/issues). Include the exact tool call, the input, the response (sanitized — strip tokens, cookies, customer names), and your environment (Node version, OS, MCP client, plan tier). PRs with a failing test are doubly welcome.

### What about Infomaniak's own AI Tools?

Infomaniak runs a [Swiss-sovereign AI cloud](https://www.infomaniak.com/en/ai-tools) hosting Llama, Mixtral, Whisper and other open-weights models. This MCP exposes `infomaniak_list_ai_products` and `infomaniak_list_ai_models` so an agent can discover what's available and what models are public on your account; we deliberately do not wrap their inference endpoints (use the OpenAI-compatible API directly for that).

## Contributing

Contributions are welcome. Please read [`CONTRIBUTING.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/CONTRIBUTING.md) and follow the [`CODE_OF_CONDUCT.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/CODE_OF_CONDUCT.md). Security issues should be reported privately per [`SECURITY.md`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/SECURITY.md).

## If this saved you time

The fastest way to support the project is a [⭐ star on GitHub](https://github.com/Mogacode-ma/infomaniak-mcp-agent) — it helps other Infomaniak users find this and tells me what to keep building.

You can also:

- Open an [issue](https://github.com/Mogacode-ma/infomaniak-mcp-agent/issues) for bugs, edge cases, or missing tools
- Start a [discussion](https://github.com/Mogacode-ma/infomaniak-mcp-agent/discussions) for design or API questions
- Share what you built with it — I'd love to hear

## License

[MIT](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/LICENSE) — see [`NOTICE`](https://github.com/Mogacode-ma/infomaniak-mcp-agent/blob/HEAD/NOTICE) for the trademark disclaimer.

This project is not affiliated with Infomaniak Network SA. "Infomaniak", "kDrive", "kChat", "kMeet", "kSuite", "Swiss Backup" are trademarks of Infomaniak Network SA.

