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.
npx -y @ooples/mcp-console-automationOverview
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
Run locally (Node.js example — adapt if the repo uses another runtime):
# Install dependencies (if Node/TypeScript)
# Start the server
Run with Docker (recommended for production):
# Build and run with Docker
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 name | Category | Purpose |
|---|---|---|
| session.create / session.get | Session management | Create and manage model sessions and context |
| ssh.exec, ssh.agent | SSH | Run commands over SSH, maintain agent/session keys |
| shell.run | Terminal | Execute shell commands in a controlled sandbox |
| file.read, file.write | Filesystem | Read and write files inside session workspace |
| http.fetch | Web scraping | Fetch and parse HTTP pages for scraping jobs |
| analytics.query | Data analytics | Run SQL-like queries against ingested datasets |
| test.run, test.report | Testing | Execute and report automated test suites |
| job.schedule, job.status | Background jobs | Schedule and monitor long-running tasks |
| monitor.metrics | Monitoring | Expose metrics and health checks |
| recorder.audit | Auditing | Log 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
# Execute a command in that session
# Poll a background job
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