Skip to main content
Glama

terminal

An MCP server that exposes a single execute tool for running any CLI command over stdio. Uses execFile (no shell) to prevent injection.

Quick Start

npx @renfeng/terminal

Related MCP server: win-shell-mcp

MCP Configuration

{
  "mcpServers": {
    "terminal": {
      "command": "npx",
      "args": ["-y", "@renfeng/terminal@0.4"],
      "autoApprove": ["execute"]
    }
  }
}

Remove execute from autoApprove to require user confirmation for every call.

Tool: execute

Parameter

Type

Required

Description

command

string

Yes

The CLI to run (e.g. mvn, git, gradle)

args

string[]

Yes

Arguments to pass

cwd

string

No

Working directory

timeout

number

No

Timeout in ms (default: 30000)

Examples

{ "command": "mvn", "args": ["clean", "install", "-DskipTests"] }
{ "command": "git", "args": ["log", "--oneline", "-10"] }
{ "command": "gradle", "args": ["build", "--info"] }
{ "command": "docker", "args": ["ps"] }
{ "command": "kubectl", "args": ["get", "pods"] }

Response Format

<stdout>
[stderr]
<stderr output>
[exit code: N]

Non-zero exit codes set isError: true in the MCP response.

Environment Variables

Variable

Default

Description

CLI_TIMEOUT

30000

Default execution timeout in milliseconds

Security

  • execFile runs commands directly — no shell interpretation, no injection via args

  • Trust is managed by Kiro's autoApprove in mcp.json

  • The server has no allowlist — Kiro is the gatekeeper

Development

npm install
npm run build
npm test

License

MIT

Available Tools

1 tool
executeA

Execute a CLI command. The command is run directly via execFile (not through a shell) to prevent injection. Respects Kiro's trustedCommands and commandDenylist settings.

Inputs: args (required), command (required), cwd, timeout.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of misselection or overlap with a sibling tool. Its purpose (run a CLI command) is unambiguous.

    Naming Consistency4/5

    The single name 'execute' is a clear, lowercase verb with no casing or style conflicts. There is no multi-tool pattern to evaluate against, so consistency is trivially satisfied rather than demonstrated.

    Tool Count4/5

    A terminal server's core job is running commands, and one tool covers that cleanly without bloat. It is slightly thin in that everything (command, args, working directory, environment) must be funneled through a single entry point.

    Completeness3/5

    Single-shot command execution via execFile is covered, but there is no support for persistent/interactive sessions, stdin streaming, background processes, or explicit cwd/env handling. Agents needing multi-step stateful terminal work will hit dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a deterministic set of 40 cross-platform command tools as an MCP server, replacing unsafe raw shell calls with structured JSON inputs and outputs for file system, process, network, and git operations.
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI clients to call small utility tools like echo and Markdown-to-PDF conversion, running locally over stdio.
      2
      MIT