Skip to main content
Glama

machine-mcp

A laptop-side MCP server. An AI agent talks to it over stdio and runs tools on the human's own machine (the one already signed into Copilot CLI and the rest of the local toolchain).

This is a local command process. It does not wrap Cursor or Grok Bot pairing. It does not replace Grok Bot Computers or Local execution.

Install

Python 3.10 or newer.

cd machine-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Dev tests:

pip install -e ".[dev]"
pytest tests/

Related MCP server: local-mcp

Run

machine-mcp

stdio servers block on stdin. The client starts the process and owns the pipes.

Smoke test (prints status JSON, exits 0):

machine-mcp --check

On start, if MACHINE_MCP_TOKEN is unset, a random bearer token is generated and printed once to stderr:

machine-mcp token: ...

Keep that token for HTTP v2. stdio v1 does not check it: the client already spawned this process as you.

Cursor / Grok Bot connector

Add a local MCP server whose command is the venv entry point. No pairing protocol.

{
  "mcpServers": {
    "machine-mcp": {
      "command": "path/to/.venv/bin/machine-mcp"
    }
  }
}

See examples/mcp.json. Point command at the absolute path of .venv/bin/machine-mcp on this laptop.

Optional env:

  • MACHINE_MCP_WORKSPACE file-tool root. Default: ~/machine-mcp-workspace (created on start).

  • MACHINE_MCP_TOKEN bearer token for a future HTTP listener. Generated if unset.

Tools

Tool

What it does

status

OS, hostname, cwd, Python version, whether copilot / ffmpeg / git exist on PATH. No secrets.

run

subprocess in the workspace root. shlex.split, not shell=True. Default timeout 30s, max 120s. Nonzero exits return ok: false; stdout and stderr are capped at 1MB each. Timed-out process groups are terminated. Redacts github_pat_ and AWS access-key shapes in output.

record_terminal

Honest stub that never writes a video file. On Linux with ffmpeg, returns an x11grab command; other platforms return a clear unsupported-platform error.

write_file

Write a path relative to the workspace. Refuses .. and absolute paths.

read_file

Read a path relative to the workspace. Same sandbox. 1MB limit.

Local only

stdio is local to this process. There is no listen socket in v1. HTTP is optional later and must require MACHINE_MCP_TOKEN. Do not expose this server on a network.

License

MIT. Copyright Andrea Griffiths 2026.

Available Tools

5 tools
read_fileA

Read a UTF-8 file relative to the workspace root. Size limit 1MB.

Refuses absolute paths and parent-directory segments.

Inputs: path (required). Returns: object

record_terminalA

Record a bash script as a terminal demo.

This host does not start a recorder. If ffmpeg is missing, returns an error. If ffmpeg is present, returns the command you would run (Linux x11grab) and does not write a video file.

Inputs: script (required). Returns: object

runA

Run a command in the workspace root (not a shell).

Args: command: Program and arguments as a single string. Split with shlex on POSIX. timeout_seconds: Kill after this many seconds. Default 30, max 120.

Output is limited to 1MB each for stdout and stderr. A nonzero exit code returns ok=false.

Inputs: command (required), timeout_seconds. Returns: object

statusA

Report OS, hostname, cwd, Python version, and whether copilot, ffmpeg, and git are on PATH.

Does not return secrets, tokens, or a home-directory listing.

Inputs: no named parameters. Returns: object

write_fileA

Write a UTF-8 file relative to the workspace root.

Refuses absolute paths and parent-directory segments.

Inputs: path (required), content (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 5 tools

    Disambiguation4/5

    Each tool targets a distinctly different action: environment status, command execution, terminal recording, and file read/write. The only confusing tool is record_terminal, which despite its name does not actually record anything and instead returns a command to run.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern: record_terminal, write_file, read_file, plus the imperative run. status is a minor outlier as a noun, but the overall naming scheme is predictable and readable.

    Tool Count4/5

    Five tools is a reasonable, well-scoped size for a machine and workspace automation server. However, record_terminal feels loosely connected to the rest of the set, so the count is appropriate but not perfectly cohesive.

    Completeness4/5

    Core workflows are covered: checking environment state, running commands, and reading/writing files are sufficient for many workspace tasks. Directory listing and deletion are missing as dedicated tools, but agents can work around these gaps using run.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to securely inspect, modify, and manage local projects with trusted filesystem access, safe Git operations, controlled task execution, and developer runtime process management over stdio or HTTP.
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables remote AI agents to read, patch, and (opt-in) execute commands in a local workspace, with all actions approved locally and fully audited.
      2,672 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local, permissioned development workflows from compatible AI clients, including filesystem editing, interactive terminals, durable jobs, Git operations, and semantic browser testing.
      64 npm
      1
      Apache 2.0