MCPtoAI for Linux: chat with AI on your server from the web, your phone or the terminal
pip install mcptoai==0.1.18 Copy PIP instructions
MCPtoAI connects a Linux machine to AI so you can work with it from the MCPtoAI web app, your phone, or directly from a terminal over SSH.
Your AI provider credentials stay on the machine. Filesystem access is workspace-scoped, terminal execution is disabled by default, and actions that require approval remain under your control.
Docker does not require a host Python installation.
pipx install mcptoai pipx keeps the CLI isolated from system Python packages while still making the mcptoai command available globally for your user.
python3 -m pip install mcptoai Check the installation mcptoai --version mcptoai --help 60-second quick start Pair the machine:
mcptoai login Save a provider API key. The key is requested through a hidden prompt and is not passed as a command-line argument:
mcptoai keys set anthropic Optional: keep conversation history only on this Linux device:
mcptoai history local Use mcptoai history status to check the current setting, or mcptoai history cloud to use MCPtoAI Cloud for cross-device history.
mcptoai models anthropic mcptoai use anthropic Keep the device connected in the background:
mcptoai doctor mcptoai status Then open https://app.mcptoai.com and select this Linux device.
The CLI has built-in documentation. Start with:
mcptoai --help Every major command also has its own help page:
mcptoai login --help mcptoai keys --help mcptoai models --help mcptoai use --help mcptoai workspace --help mcptoai mcp --help mcptoai shell --help mcptoai jobs --help mcptoai chat --help mcptoai service --help mcptoai update --help mcptoai reset --help Account and diagnostics mcptoai login # pair this machine mcptoai logout # disconnect it without deleting local keys/settings mcptoai status # current pairing/provider/vault/service/job state mcptoai doctor # installation and configuration checks mcptoai doctor returns a non-zero exit status when an important check fails, so it can also be used in scripts and deployment checks.
mcptoai keys list mcptoai keys set openai mcptoai keys set anthropic mcptoai keys remove openai Provider keys are deliberately not accepted as command-line arguments. This reduces accidental exposure through shell history and process listings.
mcptoai models mcptoai models openai mcptoai use openai mcptoai models without a provider uses the currently selected provider.
mcptoai workspace show Restrict MCPtoAI file tools to one directory:
mcptoai workspace set ~/projects/my-app Return to the default Desktop/Documents/Downloads scope:
mcptoai workspace reset Changing the workspace restarts the background service if it is running.
mcptoai mcp list Remote HTTPS MCP Add a Streamable HTTP MCP endpoint:
mcptoai mcp add-http Cloudflare https://mcp.cloudflare.com/mcp Remote MCP URLs must use HTTPS. If the service uses OAuth, MCPtoAI starts the authorization flow during tool discovery.
mcptoai mcp add-stdio my-tools /path/to/server --arg value A local stdio MCP server executes code on this machine with your Linux user permissions. For that reason it must be added locally and requires confirmation.
Remove a configured server using the id shown by mcptoai mcp list:
mcptoai mcp remove mcp-0123456789ab Terminal command permission Terminal execution and long-running jobs are controlled by a local permission:
mcptoai shell status mcptoai shell on mcptoai shell off Important security properties:
mcptoai jobs list mcptoai jobs show job-1234abcd mcptoai jobs logs job-1234abcd mcptoai jobs logs job-1234abcd --follow mcptoai jobs stop job-1234abcd Jobs are kept independently of one model response, so a later chat/model session can still inspect their state.
Start a chat directly over SSH or a local terminal:
mcptoai chat Override the configured model for that terminal session:
mcptoai chat --provider openai --model Inside terminal chat:
/help /model /provider /new /jobs /exit When a tool needs approval, the terminal asks interactively. Non-interactive stdin does not silently approve tool calls.
Install the systemd user service after pairing:
mcptoai service status mcptoai service restart mcptoai service stop mcptoai service start mcptoai service logs mcptoai service logs --follow mcptoai service uninstall For servers that must remain reachable after you log out, mcptoai doctor also checks whether systemd user lingering is enabled and shows the relevant loginctl command when needed.
mcptoai connect Updating MCPtoAI Check whether a newer CLI release is available on PyPI without changing anything:
mcptoai update --check Install the latest release:
mcptoai update MCPtoAI detects how the CLI was installed:
You can always confirm the installed version with:
mcptoai --version Docker Pair using a persistent configuration volume:
docker run -it --rm \ -v mcptoai:/home/mcptoai/.config \ ghcr.io/mcptoai/mcptoai login Then run continuously:
docker run -d \ --name mcptoai \ --restart unless-stopped \ -v mcptoai:/home/mcptoai/.config \ ghcr.io/mcptoai/mcptoai Inside Docker, the container restart policy replaces the systemd user service.
Docker containers are immutable, so mcptoai update does not modify a running container. Pull the new image and recreate the container while keeping the same persistent config volume:
docker pull ghcr.io/mcptoai/mcptoai:latest docker stop mcptoai docker rm mcptoai docker run -d \ --name mcptoai \ --restart unless-stopped \ -v mcptoai:/home/mcptoai/.config \ ghcr.io/mcptoai/mcptoai:latest The mcptoai named volume keeps pairing, provider credentials and local configuration across container replacement. Release images are also tagged with their CLI version, for example ghcr.io/mcptoai/mcptoai:0.1.16.
mcptoai status mcptoai doctor Check the background service:
mcptoai service logs --follow For a Python traceback while debugging a CLI failure:
MCPTOAI_DEBUG=1 mcptoai If an AI provider is not ready:
mcptoai keys list mcptoai models mcptoai use If a remote MCP integration is not available, inspect configured servers with:
mcptoai mcp list Security model MCPtoAI is designed so that connecting the machine does not automatically grant unrestricted execution access.
See the security documentation for the current threat model and implementation details: https://mcptoai.com/security/.
Disconnect the device but keep local configuration:
mcptoai logout Remove only the background service:
mcptoai service uninstall Completely remove the local MCPtoAI configuration, provider credentials, MCP configuration, pairing and service:
mcptoai reset mcptoai reset is destructive for local MCPtoAI data on this machine. It does not delete your MCPtoAI account or cloud-side account data.
pipx uninstall mcptoai or, if installed with pip:
python3 -m pip uninstall mcptoai License The MCPtoAI Linux CLI/agent is available under the MIT License. The hosted MCPtoAI service, backend, relay, web application and trademarks are separate from the MIT-licensed client code.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




