Back to Browse

Lws MCP Server

by NKSTUD
Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Manage LWS (lws.fr) domains, DNS zones, hosting and account from any MCP client.

About

Manage LWS (lws.fr) domains, DNS zones, hosting and account from any MCP client.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 5 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

12 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Your LWS account ID (the digits of LWS-XXXXXX)Optional

Environment variable: LWS_LOGIN

LWS API key (LWS Panel > Api LWS)Required

Environment variable: LWS_API_KEY

true to expose only read toolsOptional

Environment variable: LWS_READ_ONLY

true to expose the paid tools (buy, renew)Optional

Environment variable: LWS_ENABLE_PURCHASES

true to use the LWS test environmentOptional

Environment variable: LWS_TEST_MODE

Test key, used instead of LWS_API_KEY in test modeRequired

Environment variable: LWS_TEST_API_KEY

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-nkstud-lws-mcp": {
      "env": {
        "LWS_LOGIN": "your-lws-login-here",
        "LWS_API_KEY": "your-lws-api-key-here",
        "LWS_READ_ONLY": "your-lws-read-only-here",
        "LWS_TEST_MODE": "your-lws-test-mode-here",
        "LWS_TEST_API_KEY": "your-lws-test-api-key-here",
        "LWS_ENABLE_PURCHASES": "your-lws-enable-purchases-here"
      },
      "args": [
        "lws-mcp"
      ],
      "command": "uvx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

lws-mcp

CI License: MIT PyPI Python 3.10+

English · Français

An MCP server for the LWS Client API. Manage your domains, DNS zones, hosting and account from Claude, Cursor or any MCP client:

"Add the CNAME records Stripe gave me to example.fr, then tell me when they are live."

It covers the whole LWS Client API (29 endpoints), plus a propagation check that compares your LWS zone, its nameservers and three public resolvers.

Community project, not affiliated with or endorsed by LWS.

Tools

AreaTools
DNSget_dns_zone · add_dns_record · update_dns_record · delete_dns_record · check_dns_propagation
Domainsget_domain · check_domain_availability · list_tlds · update_nameservers · set_transfer_protection · request_transfer_authcode · create_domain_redirect · delete_domain_redirect
Hostinglist_hostings · get_hosting · list_hosting_prices · get_renewal_prices · set_auto_renew · buy_hosting¹ · renew_hosting¹
Accountget_account_balance · get_purchase_history · list_contacts · get_contact · create_contact · update_contact · add_test_credit_to_contact² · add_test_credit_to_account²
Requestslist_requests · list_pending_requests

¹ Paid: off unless LWS_ENABLE_PURCHASES=true. ² Only in test mode.

DNS record names can be written in full (_dmarc.example.fr): they are shortened to what the LWS zone expects (_dmarc, @).

Safety

An assistant with access to your DNS can take a site or a mailbox down, and one with access to purchases can spend money. So:

  • Purchases are off by default. buy_hosting and renew_hosting only exist when LWS_ENABLE_PURCHASES=true.
  • Read-only mode. LWS_READ_ONLY=true removes every tool that changes something.
  • Hints for your client. Every tool declares whether it reads, writes or destroys (tool annotations), so clients can ask before running it.
  • Test environment. LWS_TEST_MODE=true sends every request to the LWS sandbox.
  • Your key stays local. It goes only to api.lws.net, and is never logged or returned to the model.

Requirements

  • An LWS account and its API key: LWS Panel → your account number (LWS-XXXXXX, top right) → Api LWS → Clé API en mode PRODUCTION → voir. LWS guide.
  • The public IP address of the machine running the server, allowed on the same Api LWS page. Otherwise every call fails with bad source <your IP>.
  • uv (it fetches Python and the server for you).

Installation

Every client runs the same command, uvx lws-mcp, with LWS_LOGIN and LWS_API_KEY in its environment (see Configuration for the optional settings).

Install in Cursor Install in VS Code

The buttons leave LWS_LOGIN and LWS_API_KEY empty: fill them in after installing.

claude mcp add lws \
  -e LWS_LOGIN=123456 \
  -e LWS_API_KEY=your-api-key \
  -- uvx lws-mcp
codex mcp add lws \
  --env LWS_LOGIN=123456 \
  --env LWS_API_KEY=your-api-key \
  -- uvx lws-mcp

Or in ~/.codex/config.toml:

[mcp_servers.lws]
command = "uvx"
args = ["lws-mcp"]
env = { LWS_LOGIN = "123456", LWS_API_KEY = "your-api-key" }

Use the button above, or add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "lws": {
      "command": "uvx",
      "args": [
        "lws-mcp"
      ],
      "env": {
        "LWS_LOGIN": "123456",
        "LWS_API_KEY": "your-api-key"
      }
    }
  }
}
code --add-mcp '{"name":"lws","command":"uvx","args":["lws-mcp"],"env":{"LWS_LOGIN":"123456","LWS_API_KEY":"your-api-key"}}'

Or in .vscode/mcp.json:

{
  "servers": {
    "lws": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "lws-mcp"
      ],
      "env": {
        "LWS_LOGIN": "123456",
        "LWS_API_KEY": "your-api-key"
      }
    }
  }
}

Add this block to the client's MCP file:

ClientFile
Claude DesktopSettings → Developer → Edit Config (claude_desktop_config.json)
Windsurf~/.codeium/windsurf/mcp_config.json
Gemini CLI~/.gemini/settings.json
Cline, Roo Code, Zed…their MCP settings, same format
{
  "mcpServers": {
    "lws": {
      "command": "uvx",
      "args": [
        "lws-mcp"
      ],
      "env": {
        "LWS_LOGIN": "123456",
        "LWS_API_KEY": "your-api-key"
      }
    }
  }
}

Configuration

VariableDefaultDescription
LWS_LOGINrequiredYour LWS account ID (the digits of LWS-XXXXXX).
LWS_API_KEYrequiredProduction API key.
LWS_TEST_API_KEYTest key, used instead of LWS_API_KEY in test mode.
LWS_TEST_MODEfalseSend requests to the LWS test environment.
LWS_READ_ONLYfalseOnly expose tools that read.
LWS_ENABLE_PURCHASESfalseExpose buy_hosting and renew_hosting.
LWS_TIMEOUT30Request timeout, in seconds.
LWS_BASE_URLhttps://api.lws.net/v1API base URL.

Good to know

  • Deferred actions. Nameserver changes, transfer protection, auth codes, purchases and renewals are processed in the background. Follow them with list_pending_requests.
  • Propagation. A DNS change can take from minutes to a few hours to be seen everywhere: each resolver keeps the old answer until its TTL runs out. check_dns_propagation compares what is saved in the LWS zone, what the domain's nameservers answer (no cache) and what Cloudflare, Google and Quad9 answer, then says how long a stale answer can last. Some networks block direct DNS queries to nameservers; the resolvers are asked over HTTPS, so that part always works.
  • Record ids change. LWS replaces a record under a new id when it is updated. add_dns_record and update_dns_record return the current id.
  • Rate limit. LWS refuses bursts of requests (about fifteen in a row) with Invalid input (rate limit): wait a minute and retry.
  • Allowed TTLs. 900, 1800, 3600, 7200, 21600, 43200 or 86400 seconds.

Development

git clone https://github.com/NKSTUD/lws-mcp && cd lws-mcp
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .

Try it against your account with the MCP Inspector, credentials in a local .env (see .env.example):

npx @modelcontextprotocol/inspector uv run --env-file .env lws-mcp

See CONTRIBUTING.md to add a tool or fix a bug.

License

MIT

Reviews

No reviews yet

Be the first to review this server!