Manage LWS domains, DNS zones, hosting, and account details through an AI client.
Also known as NKSTUD/lws-mcp, lws-mcp
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- 433
- Latest version
- 0.2.1
- Last commit
- Oct 15, 2026
- License
- MIT
What is LWS MCP?
LWS manages LWS domains, DNS zones, hosting, and account details through an AI client.
Summary generated from the project's README
About LWS MCP server
Managing LWS domains, DNS zones, and hosting services directly from an AI client is what this server enables. It provides a bridge to the LWS Client API, allowing users to interact with their web infrastructure through tools like Claude, Cursor, or VS Code. The server covers 29 different endpoints, including specific tools for DNS management, domain transfers, hosting renewals, and account balance inquiries.
To use this server, you must provide your LWS login and API key as environment variables. It is designed with safety in mind, featuring a read-only mode to prevent accidental changes and a test mode that directs all requests to a sandbox environment. While purchases and renewals are disabled by default, they can be enabled via specific configuration settings. Users can also verify DNS changes using a propagation check that compares LWS settings against public resolvers like Google and Cloudflare.
What you can do with it
- 1Update DNS recordsAdd or modify DNS records like CNAME or TXT to configure domain services.
- 2Monitor DNS propagationVerify if a DNS change has spread across different public resolvers.
- 3Check account statusRetrieve your current account balance or view your purchase history.
Written from the project's README. Every use case is checked against a quote from it.
How to install LWS MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall LWS MCP in Claude Code
$ claude mcp add --env 'LWS_API_KEY=<YOUR_LWS_API_KEY>' --env 'LWS_LOGIN=<LWS_LOGIN>' --env 'LWS_TEST_API_KEY=<YOUR_LWS_TEST_API_KEY>' lws-mcp -- uvx lws-mcpInstall LWS MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"lws-mcp": {
"command": "uvx",
"args": [
"lws-mcp"
],
"env": {
"LWS_API_KEY": "<YOUR_LWS_API_KEY>",
"LWS_LOGIN": "<LWS_LOGIN>",
"LWS_TEST_API_KEY": "<YOUR_LWS_TEST_API_KEY>"
}
}
}
}Install LWS MCP in VS Code
.vscode/mcp.json
{
"servers": {
"lws-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"lws-mcp"
],
"env": {
"LWS_API_KEY": "<YOUR_LWS_API_KEY>",
"LWS_LOGIN": "<LWS_LOGIN>",
"LWS_TEST_API_KEY": "<YOUR_LWS_TEST_API_KEY>"
}
}
}
}Install LWS MCP in VS Code CLI
$ code --add-mcp '{"name":"lws-mcp","type":"stdio","command":"uvx","args":["lws-mcp"],"env":{"LWS_API_KEY":"<YOUR_LWS_API_KEY>","LWS_LOGIN":"<LWS_LOGIN>","LWS_TEST_API_KEY":"<YOUR_LWS_TEST_API_KEY>"}}'Install LWS MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"lws-mcp": {
"command": "uvx",
"args": [
"lws-mcp"
],
"env": {
"LWS_API_KEY": "<YOUR_LWS_API_KEY>",
"LWS_LOGIN": "<LWS_LOGIN>",
"LWS_TEST_API_KEY": "<YOUR_LWS_TEST_API_KEY>"
}
}
}
}Install LWS MCP in Codex
$ codex mcp add lws-mcp --env 'LWS_API_KEY=<YOUR_LWS_API_KEY>' --env 'LWS_LOGIN=<LWS_LOGIN>' --env 'LWS_TEST_API_KEY=<YOUR_LWS_TEST_API_KEY>' -- uvx lws-mcpInstall LWS MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.lws-mcp] command = "uvx" args = ["lws-mcp"] [mcp_servers.lws-mcp.env] LWS_API_KEY = "<YOUR_LWS_API_KEY>" LWS_LOGIN = "<LWS_LOGIN>" LWS_TEST_API_KEY = "<YOUR_LWS_TEST_API_KEY>"
Install LWS MCP in Gemini CLI
$ gemini mcp add -s user -e 'LWS_API_KEY=<YOUR_LWS_API_KEY>' -e 'LWS_LOGIN=<LWS_LOGIN>' -e 'LWS_TEST_API_KEY=<YOUR_LWS_TEST_API_KEY>' lws-mcp uvx -- lws-mcpInstall LWS MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"lws-mcp": {
"command": "uvx",
"args": [
"lws-mcp"
],
"env": {
"LWS_API_KEY": "<YOUR_LWS_API_KEY>",
"LWS_LOGIN": "<LWS_LOGIN>",
"LWS_TEST_API_KEY": "<YOUR_LWS_TEST_API_KEY>"
}
}
}
}Configuration
LWS_API_KEYRequiredSecretLWS API key (LWS Panel > Api LWS)
LWS_LOGINRequiredYour LWS account ID (the digits of LWS-XXXXXX)
LWS_TEST_API_KEYSecretTest key, used instead of LWS_API_KEY in test mode
LWS_ENABLE_PURCHASEStrue to expose the paid tools (buy, renew)
LWS_READ_ONLYtrue to expose only read tools
LWS_TEST_MODEtrue to use the LWS test environment
| Name | Description | |
|---|---|---|
| LWS_API_KEY | LWS API key (LWS Panel > Api LWS) | RequiredSecret |
| LWS_LOGIN | Your LWS account ID (the digits of LWS-XXXXXX) | Required |
| LWS_TEST_API_KEY | Test key, used instead of LWS_API_KEY in test mode | Secret |
| LWS_ENABLE_PURCHASES | true to expose the paid tools (buy, renew) | |
| LWS_READ_ONLY | true to expose only read tools | |
| LWS_TEST_MODE | true to use the LWS test environment |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablenkstud/lws-mcp is public and reachablegithub.com/nkstud/lws-mcp ↗Pass
- Package names this repository as its sourcelws-mcp names nkstud/lws-mcp as sourcepypi.org/project/lws-mcp/ ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for lws-mcppypi.org/project/lws-mcp/ ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-15github.com/nkstud/lws-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from lws-mcpPass
- No critical advisory in the package or its dependencies36 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHublws-mcp
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
| Area | Tools |
|---|---|
| DNS | get_dns_zone · add_dns_record · update_dns_record · delete_dns_record · check_dns_propagation |
| Domains | get_domain · check_domain_availability · list_tlds · update_nameservers · set_transfer_protection · request_transfer_authcode · create_domain_redirect · delete_domain_redirect |
| Hosting | list_hostings · get_hosting · list_hosting_prices · get_renewal_prices · set_auto_renew · buy_hosting¹ · renew_hosting¹ |
| Account | get_account_balance · get_purchase_history · list_contacts · get_contact · create_contact · update_contact · add_test_credit_to_contact² · add_test_credit_to_account² |
| Requests | list_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_hostingandrenew_hostingonly exist whenLWS_ENABLE_PURCHASES=true. - Read-only mode.
LWS_READ_ONLY=trueremoves 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=truesends 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).
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:
| Client | File |
|---|---|
| Claude Desktop | Settings → 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
| Variable | Default | Description |
|---|---|---|
LWS_LOGIN |
required | Your LWS account ID (the digits of LWS-XXXXXX). |
LWS_API_KEY |
required | Production API key. |
LWS_TEST_API_KEY |
Test key, used instead of LWS_API_KEY in test mode. |
|
LWS_TEST_MODE |
false |
Send requests to the LWS test environment. |
LWS_READ_ONLY |
false |
Only expose tools that read. |
LWS_ENABLE_PURCHASES |
false |
Expose buy_hosting and renew_hosting. |
LWS_TIMEOUT |
30 |
Request timeout, in seconds. |
LWS_BASE_URL |
https://api.lws.net/v1 |
API 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_propagationcompares 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_recordandupdate_dns_recordreturn 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
LWS MCP questions
How do I add LWS MCP to Claude Code?
Run claude mcp add --env 'LWS_API_KEY=<YOUR_LWS_API_KEY>' --env 'LWS_LOGIN=<LWS_LOGIN>' --env 'LWS_TEST_API_KEY=<YOUR_LWS_TEST_API_KEY>' lws-mcp -- uvx lws-mcp in your terminal. Add --scope user to make it available in every project.
How do I add LWS MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Can I enable purchasing and renewals through the AI?
By default, purchases are disabled. You must set the LWS_ENABLE_PURCHASES environment variable to true to expose the buy_hosting and renew_hosting tools.
How can I prevent the AI from making any changes to my account?
You can enable a read-only mode by setting the LWS_READ_ONLY environment variable to true, which removes all tools that modify data.
Is there a way to test the server without affecting my real account?
Yes, you can use the LWS sandbox by setting LWS_TEST_MODE to true and providing a test API key.