Ployter

AI assistants (MCP)

How to connect Claude (as a connector), Claude Code, Cursor and VS Code to Ployter through MCP, what an AI assistant or agent can create, monitor and manage, and how to limit its access.

Ployter has an MCP (Model Context Protocol) server. With it, an AI assistant (Claude Code, Cursor, VS Code, Claude Desktop and others) or an agent you built yourself creates, inspects and operates your infrastructure: it sets up projects with services, databases and domains, reads logs and metrics, finds out why a deploy failed, deploys, rolls back and runs commands on the server.

The assistant signs in with your account (in the Claude connector) or with an API token, and gets exactly the permissions you gave it. Everything it does goes to the team audit log, just like actions in the panel.

Claude: a connector, no token

In Claude (app, browser and desktop), Ployter is added as a custom connector. No token to create, no file to edit:

  1. In Claude, open Customize › Connectors, click + Add and Add custom connector.
  2. Give it a name (e.g. Ployter) and paste the URL https://api.ployter.com/mcp.
  3. Click Connect. Claude opens the Ployter panel; sign in if you are not signed in yet.
  4. Pick the access, The same permissions as me or Read only, and click Authorize.

Connect Claude screen with the access options
Connect Claude screen with the access options

The connector is tied to the team open in the panel when you authorize. To connect another team, switch teams first. It shows up in API tokens as Claude · MCP; revoke it there to disconnect.

On Claude Team and Enterprise plans, an organization admin adds the connector in Organization settings › Connectors, and each person connects with their own Ployter sign-in.

Create a token for the assistant

In Claude Code, Cursor and VS Code, the assistant signs in with an API token.

Click your avatar at the bottom of the sidebar, open API tokens and click New token. A token just for the assistant is the safest choice:

  • Under Permissions, pick Choose and tick only what it may do. To read only, View services and View logs are enough. To deploy, add Deploy too.
  • Under Projects, limit it to the projects it may touch.
  • Give it an expiry.

See Security: 2FA, access logs and API tokens for details on permissions and expiry.

Token for an agent that creates projects

For an agent that sets up your clients' projects (an AI agency, an onboarding bot, your own dashboard), create a token that only sees what it creates itself:

  1. In Owner, choose Team: the token stays valid if its creator leaves the team.
  2. In Permissions, check View projects, Create projects, View services, Create services, Edit service settings, Edit variables, Deploy, Start, stop and restart services, View logs, Manage domains and View servers. Only check the delete permissions if the agent will really delete things.
  3. In Projects, choose Only those it creates (agency).

The token starts with no project and gains each project it creates. The team's other projects don't show up for it, not even in lists. It picks which team server each service runs on, but it doesn't manage servers and doesn't use the team's Git, cloud and DNS accounts.

Note

If the agent needs a private repository (the team's Git account) or a managed cloud database, use a token with Projects set to All and only the permissions it needs.

Connect with the token

The same screen shows the ready-made config for each client, under AI assistants (MCP). Replace ply_YOUR_TOKEN with the token you created.

AI assistants (MCP) block with the connector URL and a tab for each client
AI assistants (MCP) block with the connector URL and a tab for each client

Claude Code

claude mcp add --transport http ployter https://api.ployter.com/mcp --header "Authorization: Bearer ply_YOUR_TOKEN"

Cursor

In ~/.cursor/mcp.json (or .cursor/mcp.json in the project):

{
  "mcpServers": {
    "ployter": {
      "url": "https://api.ployter.com/mcp",
      "headers": { "Authorization": "Bearer ply_YOUR_TOKEN" }
    }
  }
}

VS Code

In .vscode/mcp.json in the project:

{
  "servers": {
    "ployter": {
      "type": "http",
      "url": "https://api.ployter.com/mcp",
      "headers": { "Authorization": "Bearer ply_YOUR_TOKEN" }
    }
  }
}

Claude Desktop through the CLI

If you'd rather not use the connector, Claude Desktop can also open Ployter as a local MCP server, using the CLI as a bridge (requires Node.js). In Settings › Developer › Edit config:

{
  "mcpServers": {
    "ployter": {
      "command": "npx",
      "args": ["-y", "@ployter/cli@latest", "mcp"],
      "env": { "PLOYTER_TOKEN": "ply_YOUR_TOKEN" }
    }
  }
}

If you already ran ployter login on that computer, you can drop env: ployter mcp uses the CLI login.

If ployter does not show up or disconnects:

  • Quit Claude Desktop for real (tray or menu bar icon, Quit) before editing the file. If the app is open, it saves its settings over the file on exit and the mcpServers block is lost.
  • The log is at %APPDATA%\Claude\logs\mcp-server-ployter.log (Windows) or ~/Library/Logs/Claude/mcp-server-ployter.log (macOS).
  • UNABLE_TO_VERIFY_LEAF_SIGNATURE or another certificate error: an antivirus or proxy is inspecting HTTPS. Turn off its HTTPS scanning or add "NODE_OPTIONS": "--use-system-ca" to env (Node.js 22.15 or newer).

What the assistant can do

To read:

  • Who the token is: its permissions and the projects it reaches (the assistant starts here).
  • Projects, services, servers, Git accounts, cloud providers, templates and managed databases. Lists come in pages and accept a name search.
  • Container logs (including extra processes, such as a queue worker).
  • Recent deploys and a deploy's log, to understand a failure.
  • Metrics (CPU, memory, requests, errors and latency), HTTP requests and the service timeline (crashes, restarts, out of memory).
  • DNS and HTTPS certificate status of each domain.
  • Environment variables. Values are hidden if the token can't see secrets.

To create and configure:

  • Create, rename and delete projects.
  • Create a service from GitHub, GitLab, Bitbucket or a Docker image, with variables, volumes, domains and the first deploy, in a single call. Edit its settings, duplicate it (to set up a staging copy, for example), stop it and delete it.
  • Create a container database (MySQL, PostgreSQL, MongoDB or Redis) with a volume and a generated password, and connect apps to it by reference, such as ${{mysql.MYSQL_URL}}.
  • Create, link and delete managed cloud databases (the assistant warns that they cost money on the provider).
  • Add and remove domains, generate an automatic domain and point DNS on Cloudflare.
  • Add and remove volumes.
  • Apply a team template or a ready-made catalog app (WordPress, n8n, Ghost, Metabase...), with a key so a repeated request doesn't duplicate the project. First, the assistant sees what the template asks: its inputs (name, description, whether required and the default), and the variables and domains of each service. A name the template doesn't have is refused before anything is created.

To operate:

  • Deploy, schedule a deploy, restart, roll back to an earlier deploy and cancel a deploy in progress.
  • Save and remove variables. They apply from the next deploy or restart.
  • Run a command in the container (a migration, for example) and read the output.

The assistant only sees the tools the token can use. Clients ask for confirmation before actions; the ones that change what's live (rollback, commands, stop, delete) are marked as destructive.

Example requests:

  • "Why did the last deploy of the api fail?"
  • "Has the payments service been slow since yesterday? Check the metrics and logs."
  • "Run the Laravel migrations on the store's api service."
  • "Create the Client X project with a MySQL and the API from the client-x/api repository on the main branch, on the FB-01 server, with the domain api.clientx.com."
Warning

With a token that can deploy or run commands, the assistant can change production. Read what it is about to do before confirming, and prefer a token limited to the right projects.

MCP security

MCP has no access rules of its own: each tool calls the same API as the panel, with the same token. The token's permissions, team isolation and project limit all apply.

  • Delete with confirmation: to delete a project, a service, a managed database or a domain, the assistant must repeat the exact name of what it is deleting. If the name doesn't match the id, nothing is deleted and it is told the real name. This avoids deleting the right item in the wrong project.
  • Audit: everything the assistant changes goes to the audit log with the token name and the via MCP mark, along with the tool used.
  • Untrusted content: the server tells the assistant not to follow instructions found in logs, command output or repository code.
  • Rate limit: up to 300 calls per minute. Very large responses arrive truncated, with a notice.
  • Leaked token: revoke it in API tokens. It stops right away, and no token can touch members, permissions, tokens or billing.

REST API (OpenAPI)

Everything MCP does is also in the REST API, with the same token in the Authorization: Bearer ply_... header. The OpenAPI 3 specification is at ployter.com/openapi.json. Use the file to generate an SDK (openapi-generator, orval), import it into Postman or Insomnia, or give it to your agent as context.

Responses follow the { status, msg, data } format. Member, token, billing and team routes are marked as panel only: with a token, they answer 403.

Server address

The MCP server is at https://api.ployter.com/mcp (HTTP transport, stateless). It takes the token in the Authorization: Bearer header or an OAuth 2.1 sign-in (PKCE, dynamic client registration and client ID metadata documents), discovered at https://api.ployter.com/.well-known/oauth-protected-resource.