# MCP-server-client-computer-use-ai-sdk

> MCP Server

This repository offers an open-source Computer Use AI SDK for macOS, enabling AI agents to control computers without pixel-based vision. It provides tools for launching apps, reading content, clicking, entering

## Overview

- **Category:** AI
- **Language:** Rust
- **Stars:** 196
- **Forks:** 2
- **Owner:** mediar-ai
- **GitHub:** https://github.com/mediar-ai/MCP-server-client-computer-use-ai-sdk
- **Created:** 2025-03-27T01:22:18+00:00
- **Updated:** 2025-03-29T00:15:06+00:00
- **Source:** https://model-context-protocol.com/servers/macos-ai-computer-control-sdk

## Setup

## Setup

```bash
git clone https://github.com/m13v/computer-use-ai-sdk.git
cd MCP-server-client-computer-use-ai-sdk
```

```bash
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Node.js and npm (if not already installed)
# Visit https://nodejs.org/ or use nvm
```

```bash
# run backend server
cd mcp-server-os-level
cargo run --bin server
# keep it running
```

### Option 1: CLI Interface

```bash
# run CLI interface client in a new terminal  (good for debugging)
cd mcp-client-cli-interface
npm install  # install dependencies first

# Set your Anthropic API key as an environment variable
export ANTHROPIC_API_KEY=sk-ant-xxxx  # Replace with your actual Anthropic API key
# For Windows, use: set ANTHROPIC_API_KEY=sk-ant-xxxx
# For permanent setup, add to your shell profile (.bashrc, .zshrc, etc.)

npx tsx main.ts
```

### Option 2: Web app Interface

```bash
# run CLI interface client in a new terminal  (good for debugging)
cd mcp-client-nextjs
npm install  # install dependencies first

# Set API key via command line
echo "ANTHROPIC_API_KEY=sk-ant-XXXXXXXX" > .env  # replace XXXXXXXX with your actual key
# Or append if you want to keep other env variables
# echo "ANTHROPIC_API_KEY=sk-ant-XXXXXXXX" >> .env

npm run dev
# go to provided localhost web page
```

## Run an example chained tool

```bash
# Navigate to the server directory
cd mcp-server-chained-tools 

# Install dependencies
npm i 

# Set your API key (alternatively, create a .env file)
export ANTHROPIC_API_KEY=sk-ant...

# Build the server
npm run build
```

## Test tools through the MCP Inspector

```bash
# Install the MCP Inspector globally if you don't have it yet
npm install -g @modelcontextprotocol/inspector

# Make sure you're in the right directory (where .env is located)

# Make sure your .env file has the necessary credentials
# It should contain: ANTHROPIC_API_KEY=sk-ant...

# Run the server with the inspector
npx @modelcontextprotocol/inspector node build/server.js
```

## Tools

## Available Tools

1.  Launch apps (tool to launch applications on the computer)
2.  Read content (tool to read content from the screen)
3.  Click (tool to simulate mouse clicks)
4.  Enter text (tool to enter text into applications)
5.  Press keys (tool to simulate keyboard presses)

