Terminal sessions for agents
Real pseudo-terminal sessions for agents: run commands, read output, type input
Terminal sessions for agents is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- macOS, Linux, CLI
- Runs
- Locally
- What it can do
- Can change data (3 tools)
- Version
- 0.1.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add terminal-mcp -- npx -y @ryamgoh/terminal-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"terminal-mcp": {
"command": "npx",
"args": [
"-y",
"@ryamgoh/terminal-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"terminal-mcp": {
"command": "npx",
"args": [
"-y",
"@ryamgoh/terminal-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"terminal-mcp": {
"command": "npx",
"args": [
"-y",
"@ryamgoh/terminal-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"terminal-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ryamgoh/terminal-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add terminal-mcp -- npx -y @ryamgoh/terminal-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.terminal-mcp]
command = "npx"
args = ["-y", "@ryamgoh/terminal-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"terminal-mcp": {
"command": "npx",
"args": [
"-y",
"@ryamgoh/terminal-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Or run: gemini mcp add -s user terminal-mcp npx -- -y @ryamgoh/terminal-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "terminal-mcp": { "command": "npx", "args": [ "-y", "@ryamgoh/terminal-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Terminal sessions for agents
This server starts real shells or programs in a pseudo-terminal, so an agent can work with things a plain command runner cannot: REPLs, prompts, vim, ssh and long-running dev servers. Each response reports session state, exit code, whether the shell is idle or busy, the current directory and whether the program is waiting for input, flagging password prompts when terminal echo is off.
Long output is read by cursor, so an agent can pick up where it left off. Commands that overrun their timeout keep running and return a cursor. Killing a session ends its whole process tree. Local clients use stdio via npx; hosted clients such as Manus connect over Streamable HTTP with a bearer token, usually through a tunnel.
The README says version 0.1.0 meets 8 of 8 original requirements and 24 of 45 planned features, and that safety features are mostly still planned. It needs Node.js 22.12 or newer on macOS or Linux, with bash or zsh.
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 of 6 tools change data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- terminal_startName suggests: changes
- Starts a shell or program session in a PTY.
- terminal_execName suggests: changes
- Runs one command line and returns its output, exit code and cwd.
- terminal_writeName suggests: changes
- Types text or named keys into a session.
- terminal_readName suggests: reads
- Reads session output without sending input, by cursor.
- terminal_listName suggests: reads
- Lists sessions with state, command and cwd.
- terminal_kill
- Terminates a session and its process tree.
What it does
- Interactive programs
- Type text and named keys into REPLs and editors.
- Command results
- terminal_exec returns output, exit code and new cwd.
- Cursor-based reading
- Read only newer output of long-running processes.
- Session state
- Reports idle, busy, awaiting input or exited.
- Process-tree kill
- Ends a session and every child process.
- Stdio and HTTP
- Local stdio, or Streamable HTTP with a bearer token.
Good for
- Let an agent run a test suite and see the exit code
- Start a dev server and wait for a ready message
- Drive a Python REPL or ssh session
- Give a hosted agent such as Manus terminals on your machine
Pricing
Open source
Published on npm and GitHub
Terminal sessions for agents FAQ
How do I install Terminal sessions for agents?
Run claude mcp add terminal -- npx -y @ryamgoh/terminal-mcp, or use the JSON config with npx.
What platforms are supported?
macOS and Linux with bash or zsh and Node.js 22.12 or newer.
Can remote agents use Terminal sessions for agents?
Yes, in HTTP mode with a bearer token, typically behind a tunnel such as ngrok.
Is Terminal sessions for agents production ready?
The README labels it version 0.1.0, with many safety features still planned.
Is Terminal sessions for agents free?
Yes. Terminal sessions for agents is open source, so you can use and self-host it for free.
How do I add Terminal sessions for agents to Claude Code?
Run this command in your terminal: claude mcp add terminal-mcp -- npx -y @ryamgoh/terminal-mcp
What are the best alternatives to Terminal sessions for agents?
The closest alternatives to Terminal sessions for agents are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


