Local Terminal MCP Server
Connect your local terminal to AI agents via MCP (Model Context Protocol). Provides secure shell execution, file read/write, and directory listing — all over an authenticated WebSocket connection.
Installation
pip install local-terminal-mcp
Requires Python 3.10+.
Quick Start
# Connect to Agent Builder (opens browser for authentication)
local-terminal-mcp connect --team <your_team_id>
On first run, a browser window opens for OAuth authentication. Subsequent runs use a cached token — no repeated logins.
Keep the terminal window open while the connection is active. Press Ctrl+C to disconnect.
Available Tools
Once connected, AI agents can use these tools on your machine:
| Tool | Description |
|---|---|
execute_command |
Run shell commands |
read_file |
Read file contents |
write_file |
Write to files |
list_directory |
List directory contents |
Security
All commands are validated before execution. By default, dangerous commands (rm -rf /, shutdown, mkfs, etc.) are blocked, and sensitive system paths (/etc, /sys, /proc, /root) are protected.
For maximum security, enable whitelist mode — only explicitly allowed commands will run:
LT_MCP_WHITELIST_ONLY=true local-terminal-mcp connect --team <team_id>
Security summary
- Commands validated before execution (dangerous commands blocked)
- Sensitive system paths are protected
- All connections require JWT authentication (OAuth PKCE)
- Configurable whitelist mode
Configuration
Configuration is done via environment variables (prefix LT_MCP_):
| Variable | Default | Description |
|---|---|---|
LT_MCP_WHITELIST_ONLY |
false |
Only allow whitelisted commands |
LT_MCP_BLOCKED_PATHS |
["/etc","/sys","/proc","/root","/boot"] |
Protected paths |
LT_MCP_MAX_COMMAND_TIMEOUT |
300 |
Max command timeout (seconds) |
LT_MCP_LOG_LEVEL |
INFO |
Logging level |
You can also place these in a .env file in the working directory.
CLI Commands
local-terminal-mcp connect # Connect to Agent Builder
local-terminal-mcp status # Show auth & config status
local-terminal-mcp logout # Clear cached tokens
local-terminal-mcp test # Test tools locally (no server needed)
local-terminal-mcp version # Show version
Advanced Usage
CI / Headless Environments
Pass a JWT token directly (skips browser auth):
local-terminal-mcp connect --token "YOUR_JWT_TOKEN" --team <team_id>
Custom Server URL
local-terminal-mcp connect --url wss://your-server.example.com --team <team_id>
License
MIT
Metadata
Release files for local-terminal-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| local_terminal_mcp-0.1.1.tar.gz | 22.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| local_terminal_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.6 kB
Release files / local_terminal_mcp-0.1.1.tar.gz
| Download URL | local_terminal_mcp-0.1.1.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f19f4faaed3f4400a1e0323fd0261d4b04ecaa1000dfe5b268207e8931d687a
|
|
BLAKE2b-256 checksum How to use checksums |
186d002454749ad6398278d7679aefce4b10a20bf76a27c68aea5babda325580
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / local_terminal_mcp-0.1.1-py3-none-any.whl
| Download URL | local_terminal_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b7fa4f7845ef593d98f0e2665fe57c9e8041b554d43cb10e87d4943f3944491
|
|
BLAKE2b-256 checksum How to use checksums |
235a51d44f43ccb957c20f504323f8edb141117f4665469df599c5004a8f7d2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for local-terminal-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.