main

Project instructions for terminal-mcp, a command-line tool that lets coding agents use tools from MCP servers through terminal commands. MCP servers provide connections to outside tools and services.

In plain words
What is it for?
Use it when working on terminal-mcp, including its standalone executable, supported configuration files, authentication, direct tool calls, and preconfigured-tool access.
Why use it?
It gives the agent the project's purpose, supported systems, configuration approach, authentication options, and security boundaries in one place.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/amxv/terminal-mcp/main
Clone the repo
git clone --depth 1 https://github.com/amxv/terminal-mcp

Made for: Cursor.

Per session 1,186 This file is loaded in full into every session.
When invoked 1,186 The same file — it is already loaded in full.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01186 $0.01186
Opus 5 $0.00593 $0.00593
Sonnet 5 $0.00237 $0.00237
Haiku 4.5 $0.00119 $0.00119

Measured 2d ago against content hash 93229d1def0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

main scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

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

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://raw.githubusercontent.com/zueai/terminal-mcp/main/install.sh | bash
.cursor/rules/main.mdc · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Terminal MCP Project Instructions

What This Project Does

terminal-mcp is a standalone CLI tool (tmcp) that bridges AI coding agents with MCP (Model Context Protocol) servers via simple terminal commands.

Core Purpose: Enable AI agents (like OpenAI Codex) to access external tools and APIs through MCP servers without requiring native MCP support.

Key Features

  • 🚀 Zero Dependencies: Standalone executable that doesn't require Node.js, Python, or any other runtime to be installed
  • 🌐 Cross-Platform: Works on Linux (x64 & ARM64) and macOS (Intel & Apple Silicon)
  • Fast Startup: Launches in under 100ms
  • 🔧 Supports mcp.json config: Support for common configuration files from popular MCP clients (Cursor, Claude Code, etc.)
  • 🔐 Authentication: Support for custom headers and environment variables
  • 🎯 Direct Tool Calls: Connect to any MCP server without configuration
  • 📦 Agent-Safe Binary: Zero risk of config changes or bypassing security controls because your agent literally gets a different binary that only allows listing and calling pre-configured tools.

How It Works

  1. MCP Servers host tools (APIs, documentation search, code analysis, etc.)
  2. terminal-mcp connects to these servers and exposes their tools via CLI
  3. AI Agents call tools using simple terminal commands: tmcp call tool-name '{"param": "value"}'

Key Components

  • tmcp init: Discovers tools from configured MCP servers and generates tools.json with all available tools
  • tmcp list: Shows all enabled tools with their schemas and example usage
  • tmcp call: Executes tools using server__tool-name aliases (only enabled tools)
  • tmcp direct: Bypasses configuration for one-off server communication
  • tmcp upgrade: Updates to latest version (developer version only)

Quick Setup Flow

# 1. Install (Developer Version)
curl -fsSL https://raw.githubusercontent.com/zueai/terminal-mcp/main/install.sh | bash

# 2. Configure (create servers.json with server URLs)
# Example: ./terminal-mcp/servers.json
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    },
    "ref": {
      "url": "http://api.ref.tools/mcp",
      "headers": {
        "x-ref-api-key": "your-api-key"
      }
    }
  }
}

# 3. Initialize and discover tools
tmcp init

# 4. Edit ./terminal-mcp/tools.json to disable unwanted tools (set enabled: false)

# 5. For agents, install agent-safe binary:
curl -fsSL https://raw.githubusercontent.com/zueai/terminal-mcp/main/install-agent.sh | bash

# 6. Use tools
tmcp call context7__resolve-library-id '{"libraryName": "react"}'

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 141 lines · 1,186 tokens per session scan C 93229d1def0c

Subscribe to this mod's changes

main is a cursor rule published in the GitHub repository amxv/terminal-mcp (9 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,186 tokens to every session, about $0.0059 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.