
在背景中执行长期运行的命令,同时继续与克洛德合作
概览
一个MCP(模式上下文协议)服务器,使编码代理能够执行长期运行的 shell 命令与全过程管理能力同步. MCP背景任务服务器为背景中运行 shell 命令提供了强有力的解决方案,允许代理启动进程,监测其状态,与它们互动,并管理其生命周期. 这对于涉及构建流程、测试套件、服务器或任何长期运行的开发工作流程特别有用。 - : 执行 shell 命令作为具有独特任务ID的背景任务 - : 启动、监视、互动和终止背景进程 - : 获取和检索 Stdout/stder 具有缓冲和跟踪能力 - : 通过 stdin 向运行进程发送输入 - : 可配置的任务限制和自动清理已完成进程 - : 与模式上下文协议完全融合,用于代理互动 将服务器添加到您的 Claude 代码配置 : 1. 联合国.
概述(AI 翻译)
一个MCP(模式上下文协议)服务器,使编码代理能够执行长期运行的 shell 命令与全过程管理能力同步.
□ 概览
MCP背景任务服务器为背景中运行 shell 命令提供了强有力的解决方案,允许代理启动进程,监测其状态,与它们互动,并管理其生命周期. 这对于涉及构建流程、测试套件、服务器或任何长期运行的开发工作流程特别有用。
□ 特性
- 同步进程执行: 执行 shell 命令作为具有独特任务ID的背景任务
- ** 流程周期管理**: 启动、监视、与背景进程互动和终止
- ** 实时产出监测**: 具有缓冲和跟踪能力的捕获和取回Stdout/stder
- ** 互动进程支助**: 通过 stdin 向运行的进程发送输入
- ** 资源管理**: 明确职务限制和自动清理已完成的流程
- ** MCP协议整合**: 与代理人互动的示范背景协议充分结合
□ 安装
QQ 快速安装( 建议)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Background Job Server
An MCP (Model Context Protocol) server that enables coding agents to execute long-running shell commands asynchronously with full process management capabilities.
Overview
The MCP Background Job Server provides a robust solution for running shell commands in the background, allowing agents to start processes, monitor their status, interact with them, and manage their lifecycle. This is particularly useful for development workflows involving build processes, test suites, servers, or any long-running operations.
Features
- Asynchronous Process Execution: Execute shell commands as background jobs with unique job IDs
- Process Lifecycle Management: Start, monitor, interact with, and terminate background processes
- Real-time Output Monitoring: Capture and retrieve stdout/stderr with buffering and tailing capabilities
- Interactive Process Support: Send input to running processes via stdin
- Resource Management: Configurable job limits and automatic cleanup of completed processes
- MCP Protocol Integration: Full integration with Model Context Protocol for agent interactions
Installation
Quick Install (Recommended)
Install directly from PyPI using uvx:
# Install and run the MCP server
uvx mcp-background-job
Claude Code Integration
Add the server to your Claude Code configuration:
-
Option A: Using Claude Code Desktop
- Open Claude Code settings/preferences
- Navigate to MCP Servers section
- Add a new server:
- Name:
background-job - Command:
uvx - Args:
["mcp-background-job"]
- Name:
-
Option B: Configuration File Add to your Claude Code configuration file:
{ "mcpServers": { "background-job": { "command": "uvx", "args": ["mcp-background-job"] } } } -
Restart Claude Code to load the new MCP server.
Development Setup
For local development or contributing:
Prerequisites
- Python 3.12 or higher
- uv package manager
Setup Steps
-
Clone and navigate to the project directory:
git clone https://github.com/dylan-gluck/mcp-background-job.git cd mcp-background-job -
Install dependencies:
uv sync -
Install in development mode:
uv add -e .
Quick Start
Using with Claude Code
Once configured, ask Claude to help you with background tasks:
You: "Start my development server in the background and monitor it"
安装
uvx mcp-background-job配置
{
"mcpServers": {
"background-job": {
"command": "uvx",
"args": ["mcp-background-job"]
}
}
}