Menager MCP Server
Menager MCP Server

menager is a TypeScript-based Model Context Protocol (MCP) server designed for inter-session terminal orchestration. It enbles an AI agent session (or human operator) to act as a master control plane capable of spawning, monitoring, driving, and hooking into child terminal harnesses (CLI tools, secondary AI agents, interactive shells, or polyglot runtimes) via standard POSIX pseudo-terminals (pty).
Table of Contents
Related MCP server: pty-mcp
Features
Polyglot Harness Multiplexing: Drive interactive processes written in any language via standard POSIX pseudo-terminals.
Simulated Human Typing: Inject text, control sequences (
SIGINT, EOF, Ctrl+C), and raw keystrokes seamlessly into childstdin.Predictable Event Interception: Provide non-blocking regex hooks with timeout guarantees and optional immediate auto-responses.
Memory-Bounded Observability: Maintain dedicated circular buffers per session (default 5,000 lines) with real-time ANSI-stripping for token-efficient LLM context consumption.
Strict Asynchrony & Resource Discipline: Event handling remains purely event-driven using Node.js event emitters and promises; buffer bounds are strictly enforced to prevent memory leaks.
Installation
Manual Installation
# Clone the repository
git clone <your-repo-url>
cd menager
# Install dependencies (requires build-essential/g++ for node-pty native bindings)
npm install
# Build the project
npm run buildUsage
Starting the Server
The server runs via Stdio transport, intended to be executed directly by MCP clients.
# Start the server (standard mode)
npm start
# Or run the built file directly
node build/index.jsAvailable Tools
session_spawn
Spawns a new child PTY session.
command(string): Target binary or executable (e.g.,bash,python3). Required.args(string[]): Command line arguments.cwd(string): Working directory path.env(object): Additional environment variables.maxBufferLines(number): Rolling line limit for memory buffers (default 5000).terminalType(string): Terminal emulation type ("dumb"or"xterm-256color", default"xterm-256color").name(string): Optional logical name/label for the session.cols(number): Terminal columns (default 80).rows(number): Terminal rows (default 24).
session_wait
Blocks and waits for a session to exit gracefully, returning its final exit code.
sessionId(string): Target session ID. Required.timeoutMs(number): Optional timeout in milliseconds.
session_write
Injects keystrokes, commands, or escape sequences into the session's standard input.
sessionId(string): Target session ID. Required.payload(string): String or control character sequence. Required.pressEnter(boolean): Append\nto the payload (default false - Breaking Change in v4).pressKey(string): Special key injection (Ctrl+C,Ctrl+D,Enter,Tab,Escape,ArrowUp,ArrowDown).
session_read
Reads buffered output from the target session.
sessionId(string): Target session ID. Required.tailLines(number): Number of trailing lines to retrieve (default 100).stripAnsi(boolean): Return sanitized text without ANSI codes (default true).clearBuffer(boolean): Flush internal buffers after read (default false).offsetLines(number): Read lines starting from this absolute index offset (replaces tailLines).grepPattern(string): Pre-filter buffer lines via Regex string matching.
session_hook
Awaits a specific regex pattern on the session stream with optional automated reply.
sessionId(string): Target session ID. Required.pattern(string): Regular expression string to observe. Required.timeoutMs(number): Milliseconds before timing out (default 30000).autoResponse(string): Optional string to immediately write on match.triggerPayload(string): Write payload after hook registers (prevents concurrency deadlock).
session_resize
Resizes the target PTY terminal dimensions.
sessionId(string): Target session ID. Required.cols(number): Terminal columns. Required.rows(number): Terminal rows. Required.
session_signal
Sends a POSIX signal to the target session (with recursive process-tree termination).
sessionId(string): Target session ID. Required.signal(string): Signal to deliver (SIGINT,SIGTERM,SIGKILL). Required.
session_close
Force kills the session's process tree and deletes memory buffers immediately.
sessionId(string): Target session ID. Required.
session_prune
Force deletes sessions to free memory.
status(string): Only delete sessions with this status ("running"or"exited"). Defaults to"exited".
session_info
Returns a single session's live metadata and metrics.
sessionId(string): Target session ID. Required.
session_list
Lists all active and completed sessions managed by the server. No parameters required.
Configuring with AI Assistants
Configuring with Roo Code or Cline
Open the MCP settings file (usually
cline_mcp_settings.jsonorconfig.json).Add the following configuration for standard stdio mode:
{
"mcpServers": {
"menager-mcp": {
"command": "node",
"args": ["/path/to/menager/build/index.js"],
"env": {}
}
}
}Configuring with Claude Desktop
Open
claude_desktop_config.json.Add the following configuration:
{
"mcpServers": {
"menager-mcp": {
"command": "node",
"args": ["/path/to/menager/build/index.js"],
"env": {}
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with terminal environments through multiple concurrent PTY sessions. Supports cross-platform terminal operations including command execution, session management, and real-time communication.273MIT
- AlicenseNot gradedqualityDmaintenanceProvides a pseudo-terminal (PTY) interface that allows AI agents to interact with command-line tools requiring interactive prompts. It enables agents to autonomously spawn processes, read output, and send inputs for workflows like database migrations and project scaffolding.221MIT
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with fully interactive terminal sessions, including TUI support, keyboard control, and screen capture across Windows, Linux, and Mac.MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Runtime permission, approval, and audit layer for AI agent tool execution.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1999AZZAR/menager-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server