Screen Capture MCP server

Provides screen capture capabilities using PyAutoGUI to take, compress, and serve screenshots for analysis of the user's current screen content.
Back to servers
Provider
Syed Azhar
Release date
Dec 17, 2024
Language
Python
Stats
25 stars

This MCP server collection enhances Claude's desktop application capabilities by providing various servers that allow Claude to interact with your computer in different ways, including screen capture, computer control, data processing, HTTP requests, and large-scale data analysis.

Prerequisites

  • Python 3.8 or higher
  • Node.js and npm (for filesystem server)
  • Claude Desktop Application
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/syedazharmbnr1/ClaudeMCPServer.git
    cd ClaudeMCPServer
    
  2. Create and activate a virtual environment:

    python3 -m venv .env
    source .env/bin/activate  # On Windows: .env\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Server Components

DuckDB Server

This server enables Claude to analyze large CSV files efficiently.

Setup and Usage:

cd fastapi/duckdb
python main.py

Features:

  • Process multiple CSV files simultaneously
  • Handle files larger than 1GB
  • Fast SQL querying with DuckDB
  • Memory-efficient processing
  • Connection pooling

Screen Capture Server

Enables Claude to capture and process screenshots of your screen.

Setup and Usage:

python mcp_screen_server.py

Features:

  • Real-time screen capture
  • Dynamic image compression
  • WebP format support for optimal file size
  • Customizable save locations

Computer Control Server

Allows Claude to control mouse and keyboard actions.

Setup and Usage:

python ComputerUse/mcp_computer_server.py

Features:

  • Mouse movement and clicks
  • Keyboard shortcuts and text input
  • Screen position tracking
  • Clipboard operations

FastAPI Integration Server

Provides a robust API interface for data processing and integration.

Setup and Configuration:

  1. Navigate to the FastAPI directory:

    cd fastapi
    
  2. Configure environment variables:

    export PYTHONPATH=/path/to/mcp-server-py
    export PORT=8000
    
  3. Start the server:

    python main.py
    

Curl Server

Provides HTTP request capabilities to Claude.

Setup:

cd Curl_Server
./start_server.sh  # For the basic server
./start_mcp_server.sh  # For the MCP integration

Claude Desktop Integration

Configuration

  1. Copy the claude_desktop_config.json to your Claude Desktop app configuration directory

  2. Update the paths in the configuration to match your system:

    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-filesystem",
            "<your-paths-here>"
          ]
        },
        "duckdb": {
          "command": "/path/to/python",
          "args": [
            "/path/to/fastapi/duckdb/main.py"
          ],
          "cwd": "/path/to/fastapi/duckdb",
          "env": {
            "PYTHONPATH": "/path/to/mcp-server-py",
            "PORT": "8010"
          }
        }
      }
    }
    

Troubleshooting

Common Issues

  1. Python Path Issues:

    • Ensure PYTHONPATH is set correctly
    • Verify virtual environment is activated
  2. Permission Errors:

    • Make sure script files are executable:
      chmod +x *.py
      chmod +x Curl_Server/*.sh
      
  3. Port Conflicts:

    • Screen Server: Default port 8767
    • FastAPI Server: Default port 8000
    • DuckDB Server: Default port 8010
    • Integration Server: Default port 8768

Logging

  • Check debug.log for detailed error messages
  • Each server component writes to its own log file

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later