# MCP Server Usage
## Installation
```bash
git clone https://github.com/macbeth76/rpa-mcp-server.git
cd rpa-mcp-server
```
## Configuration
Add to your MCP client config (e.g., Claude Desktop, Cline):
```json
{
"mcpServers": {
"rpa": {
"command": "node",
"args": ["/path/to/rpa-mcp-server/mcp-server.js"]
}
}
}
```
## Available Tools
### 1. rpa_click
Click at screen coordinates
```json
{"x": 100, "y": 200}
```
### 2. rpa_type
Type text
```json
{"text": "Hello World"}
```
### 3. rpa_screenshot
Take screenshot (returns PNG data)
```json
{}
```
### 4. rpa_execute
Execute workflow steps
```json
{
"steps": [
{"action": "open", "app": "calculator"},
{"action": "wait", "seconds": 2},
{"action": "click", "x": 100, "y": 200}
]
}
```
### 5. rpa_advanced
Execute advanced workflow with variables, loops, conditionals
```json
{
"steps": [
{"action": "set-var", "name": "user", "value": "admin"},
{"action": "loop", "times": 3, "steps": [
{"action": "clipboard-copy", "text": "test"}
]},
{"action": "verify-text", "text": "Success"}
]
}
```
### 6. rpa_natural
Natural language automation
```json
{"instruction": "open calculator and type 5 plus 3"}
```
## Testing
```bash
# Test MCP protocol
./test-mcp.sh
# Test advanced features
./test-mcp-advanced.sh
```
## Protocol
- Spec: MCP 2025-11-25
- Transport: stdio (JSON-RPC 2.0)
- Capabilities: tools
## Architecture
```
MCP Client → mcp-server.js → REST API (port 9100) → Physical Screen
```