terminal-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@terminal-mcpRemember that I like concise responses"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
terminal-mcp
An agent-capable MCP server with terminal access, filesystem control, and persistent memory. Built-in sandboxing, access control, activity logging, and a file-backed memory store — so Claude can run commands, manage files, and remember context across conversations.
What it does
terminal-mcp provides 10 tools across two categories:
Terminal Tools
Tool | Access Scope | Description |
| Full ROOT_DIR | Execute shell commands with dangerous-command blocking |
| Allowed dirs only | Read files from whitelisted paths |
| Allowed dirs only | Write/overwrite files in whitelisted paths |
| Full ROOT_DIR | Browse directory contents (recursive supported) |
| Full ROOT_DIR | Named workflows: |
Memory Tools
Tool | Description |
| Save a memory with name, type, tags, and content |
| Retrieve a specific memory by name |
| Search all memories by keyword and/or type |
| Remove a memory |
| List all stored memories (returns the MEMORY.md index) |
Related MCP server: mcp-virtual-fs
Memory System
The memory system gives Claude persistent context that survives across conversations. Memories are stored as individual markdown files with YAML frontmatter inside claude_playground/memory/, with an auto-maintained MEMORY.md index.
Memory Types
Type | Purpose | Example |
| Who the user is, their preferences, expertise | "Senior backend engineer, prefers Go" |
| How to approach work (corrections + confirmations) | "Don't mock the database in integration tests" |
| Ongoing work context, goals, deadlines | "Auth rewrite driven by compliance, due March 15" |
| Pointers to external resources | "Pipeline bugs tracked in Linear project INGEST" |
| General-purpose memory | Anything that doesn't fit above |
How it works
claude_playground/
└── memory/
├── MEMORY.md # Auto-generated index (grouped by type)
├── user_role.md # Individual memory files
├── feedback_testing.md
├── project_auth_rewrite.md
└── ...Each memory file looks like:
---
name: testing preferences
type: feedback
tags: [testing, database]
created: 2025-01-15T14:30:00
updated: 2025-01-20T09:15:00
---
Integration tests must hit a real database, not mocks.
**Why:** Prior incident where mock/prod divergence masked a broken migration.
**How to apply:** Any test touching the data layer should use the test database.The MEMORY.md index is automatically rebuilt whenever a memory is stored or deleted:
# Memory Index
## User
- [user role](user_role.md) — Senior backend engineer, prefers Go
## Feedback
- [testing preferences](feedback_testing.md) — Integration tests must hit a real databaseUsage
Claude can use memory tools naturally in conversation:
"Remember that I prefer concise responses with no trailing summaries"
"What do you know about the auth rewrite?"
"Search your memory for anything about testing"
"Forget the note about the old API endpoint"
"What's in your memory?"
Safety Features
Path sandboxing —
read_fileandwrite_filerestricted to allowed directoriesDangerous command blocking —
rm -rf /,mkfs, disk overwrites, fork bombs blockedDynamic access control — edit
path.txtto grant access without restartingActivity logging — every action (including memory operations) logged with timestamps
Configurable root — restrict the entire server to a specific directory tree
Installation
pip install terminal-mcpOr from source:
git clone https://github.com/koushikmaji/terminal-mcp.git
cd terminal-mcp
pip install -e .Setup
Configure Claude Desktop
{
"mcpServers": {
"terminal": {
"command": "terminal-mcp"
}
}
}To restrict the root directory:
{
"mcpServers": {
"terminal": {
"command": "terminal-mcp",
"env": {
"TERMINAL_MCP_ROOT": "/Users/you/projects"
}
}
}
}Granting File Access
By default, read_file and write_file only work inside $ROOT/claude_playground/. To grant access to additional paths, add them to claude_playground/path.txt:
# One absolute path per line
/Users/you/projects/my-app
/Users/you/Documents/notesChanges take effect immediately — no restart needed.
Environment Variables
Variable | Default | Description |
|
| Base directory for all operations |
|
| Playground subdirectory name |
|
| Shell for command execution |
|
| Default command timeout (seconds) |
Architecture
run_command / list_files / run_workflow
┌─────────────────────────────────────────┐
│ Full ROOT_DIR │
│ │
│ read_file / write_file │
│ ┌──────────────────────────┐ │
│ │ claude_playground/ │ │
│ │ + paths in path.txt │ │
│ │ │ │
│ │ memory_* │ │
│ │ ┌────────────────┐ │ │
│ │ │ memory/ │ │ │
│ │ │ MEMORY.md │ │ │
│ │ │ *.md files │ │ │
│ │ └────────────────┘ │ │
│ └──────────────────────────┘ │
└─────────────────────────────────────────┘Logging
All actions are logged to claude_playground/terminal.log:
[2025-01-15 14:32:01] [RUN] CMD: ls -la | CWD: /Users/you
[2025-01-15 14:32:05] [READ] FILE: /Users/you/projects/app/config.json
[2025-01-15 14:33:00] [MEMORY] STORE: user role (user)
[2025-01-15 14:33:10] [MEMORY] SEARCH: q=testing type=None hits=2Requirements
Python 3.10+
MCP-compatible client (Claude Desktop, Claude Code, etc.)
License
MIT
This server cannot be installed
Maintenance
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
- -license-quality-maintenanceA sophisticated MCP server providing advanced memory capabilities with RAG, hallucination detection, and enterprise-grade AI infrastructure for intelligent agent ecosystems.Last updated
- AlicenseAqualityDmaintenanceAn MCP server that provides AI agents with a persistent, PostgreSQL-backed virtual filesystem, supporting session-isolated file operations, cross-session shared stores, and glob/grep search.Last updated11553MIT
- Flicense-qualityBmaintenanceA sandboxed MCP server for agents that provides file read/edit, code intelligence, search, allowlisted command execution, package lookups, persistent memory, and VPS channel clients, all confined to C:\Work.Last updated
- Alicense-qualityBmaintenanceAn MCP server offering hybrid memory recall and continuity tools for AI agents. It also provides a governance gateway that pre-approves risky shell/file/git actions before execution.Last updatedApache 2.0
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Hosted AgentLux MCP server for marketplace, identity, creator, services, and social flows.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/koushikmaji31/terminal-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server