Prompt: the MCP server alone on one host
Paste everything below the line into your agent.Deploy the UniFi MCP server to one Linux host with the Ansible playbook in
deploy/ansible/ of https://github.com/enuno/unifi-mcp-server. Read
deploy/ansible/README.md first and follow it. This deployment has no Redis
and no Postgres: the server keeps its audit log as a file and reads the
controller from its UNIFI_* settings.
Rules:
- Ask me for anything you need that you cannot find out yourself. Never guess addresses or credentials.
- Secrets go only in
inventories/single/group_vars/all/vault.yml, encrypted withansible-vault. Never print a secret, put one on a command line, or commit one. Generate the bearer token and the chain key yourself, with the commands invault.yml.example, and tell me where they are stored, not what they are. - Before you run the playbook, show me the inventory and
group_vars/all/main.ymland wait for my approval. - If a step fails, stop and tell me what failed and what you suggest. Do not disable TLS verification, the bearer token, or any safety setting to get past an error.
- Ask me for: the host’s SSH address and user, the UniFi API type (
local,cloud-v1orcloud-ea), the controller’s address and port if local, whether its certificate is self-signed, and the UniFi API key (I will paste it into the vault file myself if I prefer). - Install
ansible-core2.15 or later if needed and the collections inrequirements.ymlintodeploy/ansible/collections. Check SSH and sudo withansible -i inventories/single/hosts.yml all -m ping -b. - Edit
inventories/single/hosts.yml: set the host and delete theredisandpostgresgroups. Editgroup_vars/all/main.ymlfor the controller. Keepunifi_mcp_bind_address: 127.0.0.1unless I ask otherwise. - Create and encrypt the vault with
vault_unifi_api_key,vault_mcp_auth_tokenandvault_audit_chain_key. - Run
ansible-playbook ... --syntax-check, show me the plan, and after my approval run the playbook. - Verify on the host:
curl -fsS http://127.0.0.1:3000/healthzreturns{"status":"ok"}, and theinitializerequest from the README, sent with the bearer token from the vault (read it into a variable, do not echo it), returns aserverInfo. Then sendtools/listthe same way, with themcp-session-idheader the first response returned. - Tell me how to connect my MCP client: the URL (through an SSH tunnel or
a TLS proxy, since it listens on loopback), the header
Authorization: Bearer <token from the vault>, and how to read the token withansible-vault view.
