Skip to main content
Glama
dha-aa

Terminal MCP Server

by dha-aa

Terminal MCP Server

Gives Claude Desktop (or any MCP client) the ability to run shell commands, read/write files, and list directories on your machine -- plus 85 extended tools covering git, archives, search, process/system inspection, SQLite, text processing, and more (see Available Tools below).

Installation

Quick Install

curl -fsSL https://raw.githubusercontent.com/dha-aa/terminal-mcp/main/install.sh | bash

Custom Install Directory

curl -fsSL https://raw.githubusercontent.com/dha-aa/terminal-mcp/main/install.sh | bash -s -- --dir ~/my-terminal-mcp

Manual Install

git clone https://github.com/dha-aa/terminal-mcp.git
cd terminal-mcp
./install.sh

Related MCP server: Local Dev Bridge MCP

Uninstall

# If using default install location
~/.terminal-mcp/scripts/uninstall.sh

# Or your custom install directory
/path/to/terminal-mcp/scripts/uninstall.sh

⚠️ Security Note

This connects Claude to a real terminal on your computer. Claude will be able to run whatever commands it decides to run, within the base directory you specify. Only install this if you're comfortable with that level of access.

Available Tools

Core Tools:

  • run_command - Execute shell commands (own process group, output truncation, retries, env vars)

  • list_directory - List directory contents

  • read_file - Read entire file contents

  • read_file_lines - Read specific line ranges (token-efficient)

  • write_file - Write/overwrite files

  • replace_in_file - Replace text without full read (token-efficient)

  • search_in_file - Search for patterns in files, literal or regex (token-efficient)

  • get_cwd - Get current working directory

File/Directory Management:

  • make_directory - Create a directory (mkdir -p style)

  • delete_path - Delete a file or directory (always confirm-gated, previews first)

  • move_path - Move/rename a file or directory

  • copy_path - Copy a file or directory (recursive for directories)

  • file_info - Stat a path: size, kind, modified time, permissions

Batch/Async Tools:

  • run_task - Run multiple commands in sequence

  • run_command_async - Run commands in background

  • get_job_status - Check background job status

  • list_jobs - List all background jobs

  • cancel_job - Cancel running jobs (actually terminates the process tree, SIGTERM then SIGKILL)

Permission Tools:

  • grant_directory_permission - Grant directory access

  • revoke_directory_permission - Revoke directory access

  • list_directory_permissions - List granted permissions

Extended Tools (85 additional tools):

Directories:

  • remove_empty_directory - Remove a directory, but only if empty

  • list_directory_recursive - List a directory tree recursively (like tree)

  • directory_size - Total size of a directory tree (like du -sh)

  • directory_diff - Compare two directory trees by relative path

  • directory_snapshot - Manifest of a directory tree (poll-based watch substitute)

Files:

  • create_file_new - Create a new text file (fails if it already exists)

  • append_file - Append text to the end of a file

  • truncate_file - Truncate a file to a max size, or empty it (confirm-gated)

  • tail_file / head_file - Read the last/first N lines of a file

  • stream_file - Read a byte-offset chunk of a large file

  • read_binary_file / write_binary_file - Read/write binary files as base64

  • checksum_file - Compute a file's md5/sha1/sha256 hash

  • compare_files - Unified diff between two text files

  • file_stats - Line/word/char counts (like wc)

  • file_type_detect - Guess file type from magic bytes and extension

  • touch_file - Create an empty file or update its mtime

  • chmod_file - Change file/directory permission bits (confirm-gated)

  • create_symlink - Create a symlink

Search:

  • glob_search - Find files by name pattern

  • grep_recursive - Search for a pattern across a directory tree

  • find_files - Find files filtered by name, size, and/or modified-time

  • search_and_replace_recursive - Find/replace across many files (dry-run by default)

Archives:

  • zip_create / zip_extract - Create/extract .zip archives (extract refuses archives with path-traversal entries, i.e. "zip-slip" protection)

  • tar_create / tar_extract - Create/extract .tar/.tar.gz archives (same path-traversal protection)

  • gzip_compress / gzip_decompress - Gzip a single file

  • list_archive_contents - List archive contents without extracting

Patch / diff:

  • generate_diff - Generate a unified diff between two files

  • apply_patch - Apply a unified diff to a file (confirm-gated, previews the result; minimal applier, context-line matching, not a full patch(1) replacement)

  • line_insert - Insert a line

  • line_delete / line_replace - Precise single-line edits (confirm-gated, preview first)

Git:

  • git_status, git_diff, git_log, git_add, git_commit, git_pull, git_branch_list, git_branch_create, git_checkout, git_stash, git_blame, git_clone, git_remote_list, git_tag

  • git_push, git_merge, git_rebase, git_stash_pop - same as above, but confirm-gated (publish to a remote, rewrite history, or discard a stash)

Process / system:

  • list_processes - List running processes

  • kill_process - Terminate a process by PID (confirm-gated)

  • process_info - CPU/mem usage for a specific PID

  • system_info - OS/CPU/memory/disk summary

  • env_get / env_list - Read environment variables

  • which_binary - Resolve an executable's path on PATH

  • check_port_in_use - Check if a TCP port is in use

  • network_ping - Ping a host

  • network_curl_check - HEAD-style URL status/header check

Scheduling:

  • cron_list / cron_add / cron_remove - Manage the user's crontab (confirm-gated)

  • schedule_delayed_command - Run a command after a delay, in the background

Package management:

  • pip_install / npm_install - Install a package

  • list_installed_packages - List installed pip/npm packages

  • check_package_version - Check an installed package's version

Database (SQLite only):

  • sqlite_query - Run a SQL query against a SQLite file (SELECT/read runs immediately; anything that writes or alters the database is confirm-gated)

  • db_dump / db_restore - Dump/restore a SQLite database to/from a .sql file (db_restore is confirm-gated)

Text processing:

  • json_query - Read JSON and drill into it with a dotted key path

  • csv_read / csv_write - Read/write CSV as JSON rows

  • regex_extract - Extract regex matches from a file

  • sort_file / unique_lines - Sort a file's lines / dedupe lines (confirm-gated when writing in place; no confirmation needed if in_place=False)

Security:

  • encrypt_file / decrypt_file - AES-256-CBC file encryption via openssl (requires the openssl CLI on the host; the password is piped to openssl via stdin rather than passed on the command line, so it isn't visible in ps output)

  • generate_hash - Hash a string

  • verify_checksum - Compare a file's hash against an expected value

Note: no live filesystem watch exists in this environment -- directory_snapshot is a poll-based substitute (call it twice, diff the JSON yourself). apply_patch is a minimal unified-diff applier, not a full patch(1) replacement.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dha-aa/terminal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server