npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codai/glass-mcp-cli

v5.0.0

Published

Command-line interface for GlassMCP - Machine Control Protocol CLI tool

Readme

@codai/glass-cli

Command-line interface for GlassMCP - Machine Control Protocol server for Windows automation.

Installation

# Install globally (recommended)
npm install -g @codai/glass-cli

# Or use directly with npx
npx @codai/glass-cli --help

Available Commands

Server Management

# Start the GlassMCP server
glassmcp start [options]

# Start with custom port
glassmcp start --port 8080

# Start with authentication token
glassmcp start --token your-secure-token

# Stop the server
glassmcp stop

# Check server status
glassmcp status

# View server logs
glassmcp logs

Interactive Playground

# Start interactive testing mode
glassmcp playground

# Test specific functionality
glassmcp playground --focus window
glassmcp playground --focus keyboard
glassmcp playground --focus mouse

Configuration

# View current configuration
glassmcp config list

# Set configuration values
glassmcp config set server.port 8080
glassmcp config set auth.token your-token

# Reset configuration to defaults
glassmcp config reset

System Information

# Display system information
glassmcp info

# Check health status
glassmcp health

# View performance metrics
glassmcp metrics

Connection Testing

# Test connection to running server
glassmcp connect

# Test with custom URL
glassmcp connect --url http://localhost:8080

# Test with authentication
glassmcp connect --token your-token

Command Options

Global Options

  • --help, -h - Show help information
  • --version, -v - Display version number
  • --verbose - Enable verbose logging
  • --quiet - Suppress non-essential output
  • --config <path> - Use custom config file

Start Command Options

  • --port <number> - Server port (default: 7700)
  • --host <string> - Server host (default: localhost)
  • --token <string> - Authentication token
  • --cors - Enable CORS
  • --rate-limit <number> - Rate limit requests per minute
  • --log-level <level> - Logging level (debug, info, warn, error)

Playground Options

  • --focus <module> - Focus on specific module (window, keyboard, mouse, etc.)
  • --auto-start - Automatically start server if not running
  • --mock - Use mock responses for testing

Configuration File

The CLI uses a configuration file located at:

  • Windows: %APPDATA%/glassmcp/config.json
  • macOS/Linux: ~/.config/glassmcp/config.json

Example configuration:

{
  "server": {
    "port": 7700,
    "host": "localhost",
    "logLevel": "info"
  },
  "auth": {
    "token": "your-secure-token",
    "tokenFile": "~/.mcp-token"
  },
  "security": {
    "cors": true,
    "rateLimit": 100
  }
}

Environment Variables

  • GLASSMCP_PORT - Override server port
  • GLASSMCP_HOST - Override server host
  • GLASSMCP_TOKEN - Override authentication token
  • GLASSMCP_LOG_LEVEL - Override log level
  • NODE_ENV - Environment mode (development, production)

Examples

Basic Server Setup

# Install globally
npm install -g @codai/glass-cli

# Set up authentication token
glassmcp config set auth.token $(openssl rand -hex 32)

# Start server
glassmcp start

# Test in another terminal
glassmcp playground

Production Deployment

# Set production configuration
export NODE_ENV=production
export GLASSMCP_TOKEN=your-secure-production-token
export GLASSMCP_PORT=7700

# Start server with production settings
glassmcp start --log-level warn

Development Testing

# Start server in verbose mode
glassmcp start --verbose --cors

# Test specific functionality
glassmcp playground --focus window

# View real-time logs
glassmcp logs --follow

Troubleshooting

Common Issues

  1. Port already in use:

    glassmcp start --port 8080
  2. Permission denied:

    • Run as administrator (Windows)
    • Check file permissions
  3. Authentication errors:

    glassmcp config reset
    glassmcp config set auth.token new-token
  4. Server not responding:

    glassmcp status
    glassmcp stop
    glassmcp start

Debug Mode

# Enable detailed logging
glassmcp start --verbose --log-level debug

# Check health status
glassmcp health --verbose

Integration Examples

With npm scripts

{
  "scripts": {
    "automation:start": "glassmcp start",
    "automation:test": "glassmcp playground",
    "automation:stop": "glassmcp stop"
  }
}

With Docker

# Install in container
RUN npm install -g @codai/glass-cli

# Start server in container
CMD ["glassmcp", "start", "--host", "0.0.0.0"]

License

MIT - see LICENSE file for details.