This directory contains the Model Context Protocol (MCP) agent that allows AI assistants (like Cursor) to interact with your desktop using the Terminator UI automation library.

MCP is useful to test out the terminator
lib and see what you can do. You can use any model.
- Node.js: You need Node.js installed. Download it from nodejs.org.
- Git: You need Git installed. Download it from git-scm.com.
- Running Terminator Server: The main Terminator server must be running. Follow the steps in the main project Quick Start guide (steps 1-3) to clone the repo, download the server, and run it. Leave the server running in its terminal.
Open a new terminal (like PowerShell or Command Prompt) separate from the one running the Terminator server:
-
Navigate to the MCP directory: If you haven't already, clone the repository and change to the
mcp
directory:git clone https://github.com/mediar-ai/terminator cd terminator/mcp
If you already cloned it, just navigate to the
mcp
sub-directory within yourterminator
folder. -
Install dependencies and build the agent:
npm install && npm run build
(This assumes a
build
script exists inpackage.json
. If it fails, checkpackage.json
for the correct build command, e.g.,tsc
). -
Configure Cursor: You need to tell Cursor how to run this agent. Create a file named
mcp.json
in your Cursor configuration directory (~/.cursor
on macOS/Linux,%USERPROFILE%\.cursor
on Windows).macOS / Linux:
# Run this command inside the terminator/mcp directory MCP_PATH="$(pwd)/dist/index.js" JSON_CONTENT=$(cat <<EOF
{ "mcpServers": { "terminator-mcp-agent": { "command": "node", "args": [ "$MCP_PATH" ] } } } EOF ) echo "--- Copy the JSON below and save it as mcp.json in your ~/.cursor directory ---" echo "$JSON_CONTENT" echo "------------------------------------------------------------------------------------------" mkdir -p "$HOME/.cursor" ```
**Windows (PowerShell):**
You can use this PowerShell command **while inside the `mcp` directory** to generate the correct JSON content:
```powershell
# Run this command inside the terminator/mcp directory
$mcpPath = ($pwd).Path.Replace('\', '\\') + '\\dist\\index.js'
$jsonContent = @"
{ "mcpServers": { "terminator-mcp-agent": { "command": "node", "args": [ "$mcpPath" ] } } } "@ Write-Host "--- Copy the JSON below and save it as mcp.json in your %USERPROFILE%.cursor directory ---" Write-Host $jsonContent Write-Host "------------------------------------------------------------------------------------------" # Optional: Try to automatically open the directory Start-Process "$env:USERPROFILE.cursor" -ErrorAction SilentlyContinue ```
* Run the appropriate command for your OS (PowerShell for Windows, Bash for macOS/Linux).
* Copy the JSON output (starting with `{` and ending with `}`).
* Create the `%USERPROFILE%\.cursor` (Windows) or `~/.cursor` (macOS/Linux) directory if it doesn't exist.
* Create a new file named `mcp.json` inside that directory.
* Paste the copied JSON content into `mcp.json` and save it.
- Ensure the main Terminator server (e.g.,
server.exe
) is still running (from the Prerequisites step). - Restart Cursor if it was already running.
- Cursor should now automatically detect and use the
terminator-mcp-agent
when you invoke its capabilities. You don't need to manually run thenode dist/index.js
command; Cursor handles it based on themcp.json
configuration.
scrapping your whole desktop including background windows:

vibe working
