gigahost-mcp

gigahost-mcp

Exposes the Gigahost REST API (DNS, domains, servers, web hosting, etc.) to MCP clients via a single passthrough tool, enabling natural language management of Gigahost resources.

Category
Visit Server

README

gigahost-mcp

A tiny MCP server exposing the Gigahost API (https://api.gigahost.no/api/v0) to any MCP-compatible client (Claude Code/Desktop, Cursor, Windsurf, Cline, or your own).

The Gigahost API is uniform REST, so the whole surface (~150 endpoints: DNS zones/records, .no domains, servers, web hosting, BGP, DynDNS) is wrapped by a single passthrough tool rather than one tool per endpoint. The model drives paths directly.

Tool

gigahost_request(method, path, body=None, query=None, files=None)

  • methodGET / POST / PUT / DELETE
  • path — e.g. /dns/zones, /servers/123/reboot
  • body — JSON body for POST/PUT
  • query — querystring params
  • files{form_field: local_file_path} for multipart uploads (e.g. POST /webhosting/{id}/files/upload). When set, body is sent as multipart form fields instead of JSON.

Returns {"status": <http_status>, "data": <json|text>}, or {"error": ...} on a network/file failure.

This covers the full Gigahost REST surface: all JSON endpoints plus multipart file uploads. The only bound on what works is the API key's permission scope.

Endpoint reference: https://gigahost.no/en/api-dokumentasjon

Examples

Calls below are shown as the tool arguments the model produces.

List DNS zones:

{ "method": "GET", "path": "/dns/zones" }

Add an A record to zone 4040:

{
  "method": "POST",
  "path": "/dns/zones/4040/records",
  "body": { "record_name": "@", "record_type": "A", "record_value": "203.0.113.10", "record_ttl": 3600 }
}

Reboot a server:

{ "method": "GET", "path": "/servers/123/reboot" }

Upload a file to a web-hosting account (multipart):

{
  "method": "POST",
  "path": "/webhosting/55/files/upload",
  "files": { "file": "/local/path/index.html" }
}

Prerequisites

  • Python 3.11+
  • A Gigahost API key (flux_live_<hex>), created in the Flux dashboard under Konto → API keys. Scope it to only the permissions you need (e.g. DNS / domain). It is revocable and shown only once at creation.
  • The key is read from the GIGAHOST_API_KEY environment variable.

Install

Pick whichever you already use.

Option A — uv (zero install)

Dependencies are declared inline (PEP 723), so nothing to install:

GIGAHOST_API_KEY=flux_live_xxxxxxxx uv run /path/to/server.py

Option B — pip / venv

python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
GIGAHOST_API_KEY=flux_live_xxxxxxxx python server.py

Self-check (offline, no key, no network)

uv run server.py --selfcheck      # or: python server.py --selfcheck
# prints: ok

Configure your MCP client

Most clients read a JSON config with an mcpServers map. Add one of the following, using an absolute path to server.py and your key in env.

With uv:

{
  "mcpServers": {
    "gigahost": {
      "command": "uv",
      "args": ["run", "/absolute/path/to/server.py"],
      "env": { "GIGAHOST_API_KEY": "flux_live_xxxxxxxx" }
    }
  }
}

With a venv / system Python:

{
  "mcpServers": {
    "gigahost": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"],
      "env": { "GIGAHOST_API_KEY": "flux_live_xxxxxxxx" }
    }
  }
}

Config file locations vary by client, e.g.:

  • Claude Desktopclaude_desktop_config.json (Settings → Developer → Edit Config)
  • Cursor~/.cursor/mcp.json
  • Windsurf / Cline / others — their MCP settings JSON

Claude Code (CLI shortcut)

claude mcp add -s user gigahost -e GIGAHOST_API_KEY=flux_live_xxxxxxxx \
  -- uv run /absolute/path/to/server.py

After configuring, the client should list a gigahost server with the gigahost_request tool. Smoke-test by asking it to GET /dns/zones.

Key permissions (scope)

When you create the Flux API key you set an access level per area. This bounds what gigahost_request can do, independent of the code:

  • Ingen — no access, calls return 403.
  • Les — read only, GET works, writes (POST/PUT/DELETE) return 403.
  • Les/skriv — full read + write.

Areas map to API path prefixes:

Flux area Path prefix
DNS og domener /dns/...
Servere /servers/...
Webhotell /webhosting/...
Deploy /deploy/..., /reinstall/...
Rack /bgp/...
Fakturering /my/invoices
Min konto /account/..., /my/account

A 403 "You do not have permission for this operation" means the key lacks the right level for that area (e.g. Les when the call needs Les/skriv). Grant the minimum each area needs, not blanket Les/skriv.

Security

  • The API key is read from GIGAHOST_API_KEY only. It is never written to this repo.
  • Putting the key in a client config file (or ~/.claude.json via claude mcp add -e) stores it in plaintext. Acceptable for a personal scoped key on your own machine. Revoke and rotate in Flux if it leaks.
  • Prefer a narrowly-scoped key over your account password.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured