AI

AI Console Automation MCP Server with Session Management

Automate AI-driven console workflows with a production-ready MCP server offering 40 tools for session management, SSH, testing, monitoring and background jobs.

Quick Install
npx -y @ooples/mcp-console-automation

Overview

The AI Console Automation MCP Server is a production-ready implementation of the Model Context Protocol (MCP) designed to automate console-style workflows using AI agents. It exposes a rich set of tools and resources that models can call from within conversation contexts, enabling persistent sessions, SSH access, background jobs, test execution, monitoring, and data analytics. This makes it easier to build safe, auditable automation where a model drives multi-step tasks that interact with systems and the network.

By centralizing tools and session management, the server keeps context (files, secrets, credentials, command history) tied to specific sessions, so model-driven actions remain reproducible and traceable. The project ships with ~40 tools covering common operational needs (SSH, terminal execution, scraping, analytics), and provides stable endpoints for orchestration, monitoring, and worker processes.

Features

  • Session management with context persistence and configurable TTL
  • 40+ built-in tools for SSH, terminal/command execution, file operations, web scraping, and analytics
  • Background job scheduler and worker API for long-running tasks
  • Test-runner and harness tools to let models scaffold and execute tests
  • Monitoring and health endpoints (metrics, logs, job status)
  • Role and authorization hooks to control tool access per session
  • Docker-friendly for production deployment and CI integration
  • Audit logging for actions performed by tools and sessions

Installation / Configuration

Clone the repository and choose either local or Docker deployment. Example commands:

# Clone the repo
git clone https://github.com/ooples/mcp-console-automation.git
cd mcp-console-automation

Run locally (Node.js example — adapt if the repo uses another runtime):

# Install dependencies (if Node/TypeScript)
npm install
# Start the server
npm run start

Run with Docker (recommended for production):

# Build and run with Docker
docker build -t mcp-console-automation .
docker run -d --name mcp \
  -p 3000:3000 \
  -e MCP_AUTH_TOKEN="your-secret-token" \
  -e DB_URL="postgres://user:pass@db:5432/mcp" \
  mcp-console-automation

Docker Compose example:

version: "3.8"
services:
  mcp:
    image: ooples/mcp-console-automation:latest
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      - MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN}
      - DB_URL=${DB_URL}
    depends_on:
      - db
  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=mcp
    volumes:
      - db-data:/var/lib/postgresql/data
volumes:
  db-data:

Recommended environment variables (example .env):

PORT=3000
MCP_AUTH_TOKEN=changeme
DB_URL=postgres://user:pass@db:5432/mcp
SESSION_TTL=3600          # seconds
ENABLE_SSH=true
WORKER_CONCURRENCY=4

Security notes:

  • Use a strong MCP_AUTH_TOKEN or integrate with your auth provider.
  • Run behind a reverse proxy (TLS) in production.
  • Configure least-privilege SSH keys and secrets handling.

Available Tools / Resources

The server provides a catalog of resources grouped by capability. Representative tools (subset):

Tool nameCategoryPurpose
session.create / session.getSession managementCreate and manage model sessions and context
ssh.exec, ssh.agentSSHRun commands over SSH, maintain agent/session keys
shell.runTerminalExecute shell commands in a controlled sandbox
file.read, file.writeFilesystemRead and write files inside session workspace
http.fetchWeb scrapingFetch and parse HTTP pages for scraping jobs
analytics.queryData analyticsRun SQL-like queries against ingested datasets
test.run, test.reportTestingExecute and report automated test suites
job.schedule, job.statusBackground jobsSchedule and monitor long-running tasks
monitor.metricsMonitoringExpose metrics and health checks
recorder.auditAuditingLog model-invoked actions for auditability

The full project includes roughly 40 tools; the above table highlights common categories. Tools are callable via the MCP protocol endpoints and are scoped to session context.

Quick API Example

Create a session, run a shell command, and check job status (example using curl):

# Create a new session
curl -X POST https://mcp.example.com/sessions \
  -H "Authorization: Bearer $MCP_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"deploy-run","ttl":3600}'

# Execute a command in that session
curl -X POST https://mcp.example.com/sessions/<SESSION_ID>/tools/shell.run \
  -H "Authorization: Bearer $MCP_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"command":"ls -la /workspace","timeout":30}'

# Poll a background job
curl -H "Authorization: Bearer $MCP_AUTH_TOKEN" \
  https://mcp.example.com/jobs/<JOB_ID>/status

Use Cases

  • Continuous deployment assistants: Use session-scoped SSH tools to let a model validate and run deployment steps on target hosts while keeping credentials and logs isolated per session.
  • Data extraction and enrichment: Schedule background scraping jobs to fetch web pages, parse content via http.fetch, store results, and run analytics.query to summarize data for model-driven reports.
  • Automated testing pipelines: Generate tests with a model, run them via test.run, and let the model iterate on failures within the same session context to reproduce and fix issues.
  • Monitoring and remediation: Attach monitoring tools and alerts to session workflows so a model can triage incidents, run diagnostic commands, and create follow-up tickets or runbooks.
  • Reproducible debugging: Persist command history, files, and audit logs inside sessions to reproduce model-driven changes and meet compliance requirements.

For full