LetsCloud MCP Server

Manage LetsCloud infrastructure through natural language conversations. Supports both English and Portuguese.

LetsCloud MCP Server

๐Ÿ‡ง๐Ÿ‡ท Versรฃo em portuguรชs

Remote MCP server + REST API to manage LetsCloud infrastructure with AI assistants.

This project exposes LetsCloud's cloud platform through the Model Context Protocol (MCP) so AI assistants like Claude, Cursor, Windsurf, VS Code Copilot, and any MCP-compatible client can create and manage servers, snapshots and SSH keys on behalf of the user.

Unlike "local" MCP servers, this is a hosted service: any LetsCloud customer can connect by providing their API key โ€” no installation required on the client side.

The same backend also exposes a clean REST API under /api/v1 for plain HTTP integrations (curl, scripts, automations).


โœจ Features

  • ๐Ÿ”Œ Native MCP transport (Streamable HTTP) at /mcp
  • ๐ŸŒ REST API at /api/v1 mirroring every MCP tool
  • ๐Ÿ”‘ Per-request authentication via Authorization: Bearer <api-key>
  • ๐Ÿ“ฆ Full coverage of the LetsCloud API โ€” instances, SSH keys, snapshots, plans, images, locations, account
  • โšก Async, fast and lightweight (FastAPI + httpx + official MCP SDK)
  • ๐Ÿณ Docker-ready
  • ๐Ÿ“ Auto-generated OpenAPI docs at /docs

๐Ÿง  How it works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      Authorization: Bearer <api-key>     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ AI client (MCP)  โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ mcp.letscloud.io/mcp โ”‚
โ”‚ Claude, Cursorโ€ฆ  โ”‚                                          โ”‚  (this server)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                                         โ”‚  api-token: <key>
                                                                         โ–ผ
                                                            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                                            โ”‚ core.letscloud.io/api    โ”‚
                                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The user's API key never leaves the request: the server just relays it to the LetsCloud upstream and returns the response. The server itself stores no credentials.


๐Ÿš€ Quick start (using the hosted server)

Get your API key

Generate an API key in the LetsCloud dashboard.

Configure your MCP client

Claude Desktop / Cursor / Windsurf (remote MCP)

{
  "mcpServers": {
    "letscloud": {
      "url": "https://mcp.letscloud.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LETSCLOUD_API_KEY"
      }
    }
  }
}

Note: the exact field names may differ slightly between clients (some use transport: "streamable-http", others auto-detect). Check your client's docs for "remote MCP server".

Test from curl (REST API)

curl -H "Authorization: Bearer YOUR_LETSCLOUD_API_KEY" \
     https://mcp.letscloud.io/api/v1/account
curl -H "Authorization: Bearer YOUR_LETSCLOUD_API_KEY" \
     https://mcp.letscloud.io/api/v1/instances

๐Ÿ› ๏ธ Available tools

MCP toolREST endpointDescription
get_account_infoGET /api/v1/accountAccount profile (name, balance, emailโ€ฆ)
list_locationsGET /api/v1/locationsAll datacenter locations
list_plansGET /api/v1/locations/{slug}/plansPlans available at a location
list_imagesGET /api/v1/locations/{slug}/imagesOS images at a location
list_ssh_keysGET /api/v1/ssh-keysList SSH keys
get_ssh_keyGET /api/v1/ssh-keys/{title}Get one SSH key
create_ssh_keyPOST /api/v1/ssh-keysCreate SSH key
delete_ssh_keyDELETE /api/v1/ssh-keys/{slug}Delete SSH key
list_serversGET /api/v1/instancesList instances
get_serverGET /api/v1/instances/{id}Instance details
create_serverPOST /api/v1/instancesCreate instance
delete_serverDELETE /api/v1/instances/{id}Delete instance
start_serverPUT /api/v1/instances/{id}/power-onPower on
shutdown_serverPUT /api/v1/instances/{id}/power-offPower off
reboot_serverPUT /api/v1/instances/{id}/rebootReboot
reset_server_passwordPUT /api/v1/instances/{id}/reset-passwordReset root password
list_snapshotsGET /api/v1/snapshotsList snapshots
get_snapshotGET /api/v1/snapshots/{slug}Snapshot details
create_snapshotPOST /api/v1/instances/{id}/snapshotsCreate snapshot
update_snapshotPUT /api/v1/snapshots/{slug}Rename snapshot
delete_snapshotDELETE /api/v1/snapshots/{slug}Delete snapshot

Full interactive docs (with request/response schemas) are available at /docs.


๐Ÿ“ก Hosted vs self-hosted

This project ships as a hosted service at https://mcp.letscloud.io, operated by the LetsCloud team. As an end user you only need your LetsCloud API key โ€” there is nothing to install locally.

If you want to run your own private instance (corporate VPC, offline tests, contributions), see DEPLOY.md for a one-command Docker or Python setup.


๐Ÿ” Authentication

Every request to /mcp and /api/v1/* must carry the user's LetsCloud API key in one of:

  • Authorization: Bearer <api-key> (recommended, MCP-friendly)
  • X-LetsCloud-Token: <api-key> (fallback)

The server forwards the key to LetsCloud's API as api-token: <key> (matching the official Go SDK behavior). The server stores nothing.


๐Ÿ—๏ธ Architecture

src/letscloud_mcp/
โ”œโ”€โ”€ main.py             # FastAPI app, mounts /mcp and /api/v1
โ”œโ”€โ”€ __main__.py         # uvicorn entrypoint  (python -m letscloud_mcp)
โ”œโ”€โ”€ config.py           # Settings via pydantic-settings
โ”œโ”€โ”€ auth.py             # Per-request token extraction (ContextVar)
โ”œโ”€โ”€ logging_setup.py    # structlog
โ”œโ”€โ”€ letscloud/
โ”‚   โ”œโ”€โ”€ client.py       # Async httpx client for core.letscloud.io
โ”‚   โ”œโ”€โ”€ models.py       # Pydantic models (Profile, Instance, Snapshotโ€ฆ)
โ”‚   โ””โ”€โ”€ exceptions.py
โ”œโ”€โ”€ mcp_app/
โ”‚   โ”œโ”€โ”€ server.py       # FastMCP server (Streamable HTTP)
โ”‚   โ””โ”€โ”€ tools.py        # @mcp.tool functions
โ””โ”€โ”€ rest/
    โ””โ”€โ”€ routes.py       # FastAPI router for /api/v1

๐Ÿ“„ License

MIT โ€” see LICENSE.

๐Ÿ”— Links

Related Servers

NotebookLM Web Importer

Import web pages and YouTube videos to NotebookLM with one click. Trusted by 200,000+ users.

Install Chrome Extension