Bring your own LLM (Infomaniak, local, sovereign)

The AI Assistants (MCP) guide shows how to connect a ready-made assistant. This guide is for developers who want to go one level deeper and choose the model themselves — for example to keep everything on EU or Swiss infrastructure, run fully offline, or simply use a model your organization has standardized on.

The key idea: with MCP, the model and the connection are separate concerns. The Peerdom MCP server doesn’t know or care which LLM you use. You bring the model; Peerdom just answers its questions.

How the pieces fit together

A model never “speaks MCP.” It only emits tool-call intents — “I want to call list_vacant_roles.” The surrounding runtime (the MCP client) runs the MCP handshake, calls the Peerdom server, and feeds the result back to the model. So two things have to be true:

  • (A) Your runtime is an MCP client — it can connect to an MCP server with a custom header.
  • (B) Your model is good at function/tool calling — so it picks the right tool and arguments.
┌─────────────────────────────┐
│  Your MCP client / runtime  │   (LibreChat, Goose, Cline, Open WebUI, LM Studio …)
│                             │
│   ├── model API ────────────┼──▶  Your LLM  (Infomaniak, local, or any provider)
│   │                         │
│   └── MCP + X-Api-Key ───────┼──▶  https://mcp.peerdom.org/mcp
└─────────────────────────────┘

The runtime is the only component that talks to both. Swap the model freely without changing the Peerdom side, and vice versa.

Why Infomaniak as the example

Infomaniak is a Swiss provider with an OpenAI-compatible LLM API. It’s a good worked example of a vendor-independent, sovereign model option: data is hosted in Switzerland under GDPR and the Swiss DPA, and it exposes standard tools / tool_choice function calling — exactly what MCP needs. The same steps apply to any OpenAI-compatible endpoint (a local server, another EU host, or your own deployment).

Step 1: Get an Infomaniak model endpoint

In the Infomaniak AI Tools product, create a model deployment and note three things:

  • Base URLhttps://api.infomaniak.com/2/ai/{PRODUCT_ID}/openai/v1
  • API token — your Infomaniak API token
  • A model that supports function calling — pick one flagged “Function call: Yes” in the catalog (recent Qwen, Mistral Small, or Gemma instruct models are good choices).
Choose a model that does tool calling. Some sovereign models — Apertus, for instance — don't support function calling and won't drive MCP. Model IDs and their function-calling flags change, so check Infomaniak's live catalog and confirm the "Function call" flag before committing to one.

Step 2: Get your Peerdom API key

Create a key in Settings > My Data > API Keys (Organization Settings, Owner access required) — the same key described in the AI Assistants (MCP) guide. This is what authenticates the MCP connection.

Step 3: Wire both into your MCP client

Configure two things in your runtime: the model provider (Infomaniak) and the MCP server (Peerdom). Here’s a worked example with LibreChat, which supports custom OpenAI-compatible endpoints and MCP servers in one config file:

# librechat.yaml
endpoints:
  custom:
    - name: "Infomaniak"
      apiKey: "${INFOMANIAK_API_TOKEN}"
      baseURL: "https://api.infomaniak.com/2/ai/${INFOMANIAK_PRODUCT_ID}/openai/v1"
      models:
        default: ["mistral-small"]   # any model flagged "Function call: Yes"
        fetch: false

mcpServers:
  peerdom:
    type: streamable-http
    url: "https://mcp.peerdom.org/mcp"
    headers:
      X-Api-Key: "${PEERDOM_API_KEY}"

Start a chat against the Infomaniak endpoint and the Peerdom tools are available to the model. Ask “Which roles are vacant?” and the Swiss-hosted model reasons over the answer the Peerdom server returns.

Config schemas differ by client and version — check your runtime's docs for the exact keys. What stays constant is the data: the Infomaniak base URL and token, and the Peerdom endpoint (https://mcp.peerdom.org/mcp) with your X-Api-Key.

Other runtimes follow the same two-part pattern — point the model setting at the Infomaniak base URL, and add the Peerdom MCP server block from the main guide:

  • Goose, Cline, Continue — set the model provider to a custom OpenAI-compatible endpoint, then add the Peerdom MCP server.
  • Open WebUI — add Infomaniak as an OpenAI-compatible connection; reach MCP over HTTP (or via the MCPO proxy).
  • LM Studio — for a fully offline stack, run a local function-calling model instead of Infomaniak, and keep the same Peerdom MCP block.

Building your own agent

If you’re writing the agent yourself, the model call is plain OpenAI-compatible — point the SDK at Infomaniak’s base URL and pass the Peerdom tools (discovered from the MCP server) as tools:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.infomaniak.com/2/ai/{PRODUCT_ID}/openai/v1",
    api_key="INFOMANIAK_API_TOKEN",
)

# `tools` are the Peerdom MCP tools, fetched via an MCP client library and
# converted to OpenAI function definitions; tool calls are dispatched back
# to https://mcp.peerdom.org/mcp with your X-Api-Key.
response = client.chat.completions.create(
    model="mistral-small",
    messages=[{"role": "user", "content": "Which roles are vacant in Marketing?"}],
    tools=tools,
    tool_choice="auto",
)

An MCP client library handles the handshake and tool dispatch; your loop just relays tool calls between the model and the Peerdom server.

Good to know

  • Tool-calling quality matters. Weaker models may loop, hallucinate tool names, or skip a needed call. If results are unreliable, move to a stronger function-calling model before debugging anything else.
  • Data residency is in your hands. With Infomaniak or a local model, your organizational data is reasoned over on EU/Swiss or on-premises infrastructure — only your API key reaches Peerdom, and the MCP server stores nothing.
  • Reads and writes. With your API key, an assistant connected through this stack can ask about your organization and, on the same key, make changes to it. Same tool surface as the main MCP integration. Choose your model and your runtime accordingly.