Manage Long-Running Processes for AI Agents
MCP server letting AI agents see and control long-running dev processes directly, instead of copy-pasted terminal output.
Maintainer of this project? Claim this page to edit the listing.
0.2.1Add to Favorites
Why it matters
Streamline multi-agent development by providing a unified interface for managing long-running processes like web servers. This reduces code duplication and allows agents and humans to easily view, control, and restart processes.
Outcomes
What it gets done
Start, stop, and restart managed processes.
List all managed processes and their status.
Retrieve captured output and error logs from processes.
Enable agents to manage processes without manual configuration.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-persistproc | bash Capabilities
Tools your agent gets
Unified process management: start, stop, or restart processes
List all managed processes and their status, filterable by pid, command, or working directory
Retrieve captured output from a process
Overview
persistproc MCP Server
An MCP server and CLI tool giving AI agents direct visibility and control over long-running local processes like dev servers, via three tools - ctrl, list, output - eliminating manual copy-paste of terminal errors into the agent. Use when a dev server or multiple local processes need to be readable and restartable by an AI agent; not a replacement for a full process supervisor.
What it does
persistproc is a shared process layer for multi-agent development workflows - an MCP server and CLI tool that lets agents and humans see and control long-running processes like dev servers. It reduces copy-pasting terminal output into an AI agent by letting the agent directly read process output and restart processes, and works across multiple agents, such as Claude Code, Cursor, and Gemini CLI, simultaneously without a config file, since processes are managed entirely at runtime.
When to use - and when NOT to
Use this when running a dev server or multiple local processes - an API, frontend, build watcher, and database - that an AI agent should be able to read logs from and restart directly, instead of you copy-pasting terminal errors back and forth.
Not needed as a replacement for a real process supervisor like supervisord, or when your processes are started by another system entirely - in that case, writing log files to a predictable location and pointing the agent at them is the better fit.
Capabilities
Three tools, deliberately kept few since LLMs perform worse with too many tools and some IDEs like Cursor even cap the tool count: ctrl provides unified process control to start, stop, or restart a process; list lists all managed processes and their status, optionally filtered by pid, command, or working directory, with log paths; and output retrieves captured output from a process, for example filtered by stream="stderr".
How to install
Install via pip, then run the server in a dedicated terminal:
pip install persistproc
persistproc serve
persistproc serve prints agent-specific configuration instructions on first run. Start a process by prefixing your normal command, e.g. persistproc npm run dev, run from your project directory in another terminal - output streams to that terminal, and the process keeps running even if you close it. The server exposes a standard MCP endpoint at http://127.0.0.1:8947 that any MCP-compatible client can connect to. Requires Python 3.10+. Run persistproc itself in a fully configured virtualenv via ./pp, and other commands like pytest via uv run. The project is MIT-licensed.
Who it's for
Developers running one or several local processes - dev servers, API servers, build watchers, databases - who want an AI coding agent to read their logs and restart them directly instead of manual copy-paste debugging, especially when juggling multiple agents that each need visibility into the same running processes.
Source README
persistproc
A shared process layer for multi-agent development workflows
Full docs: steveasleep.com/persistproc.
What is persistproc?
Persistproc is an MCP server and command line tool which lets agents and humans see and control long-running processes like web servers. The goal is to reduce the amount of copying and pasting you need to do while coding with AI, make it easier for you to use multiple agents, and be tool-agnostic.
There is no config file. Processes are managed entirely at runtime. This is not a replacement for supervisord.
Example use case: basic web development
Suppose you're working on a todo list app, and it has a dev server you normally start with npm run dev. This server watches your code for changes, typechecks it, lints it, and hot-reloads the page. When there's an error, it prints the error to your terminal.
If you're working with an LLM agent such as Cursor or Claude Code, if you see an error, you might copy/paste it from your terminal to the agent and ask how to fix it. Then the agent might make some changes, and maybe you hit another error, so you copy/paste again, and the agent makes another change…etc.
If the agent could see the changes directly, you wouldn't need to do anything! With persistproc, that's possible. Instead of saying npm run dev, say persistproc npm run dev, and the agent can instantly read its output or even restart it. Otherwise, you can still see its output in your original terminal, and kill it with Ctrl+C, like your normally do.
graph TB
User[User] -->|"persistproc npm run dev"| PP[persistproc server]
PP <-->|"manages / logs"| NPM["npm run dev<br/>(web server)"]
PP -.->|"streams output"| User
Agent[Cursor] -.->|"output()<br/>restart()"| PP
style PP fill:#e1f5fe,stroke:#01579b,stroke-width:2px
style NPM fill:#fff3e0,stroke:#e65100,stroke-width:2px
style User fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
style Agent fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
Example use case: complex web development
Suppose you need to run four processes to get your web app working locally. Maybe an API, frontend server, SCSS builder, and Postgres. Each service emits its own logs.
If you run into an error while testing locally, you can go read all four log files to find out what happened.
But if you started those processes with persistproc, then the agent can read everything at once and possibly give you a quicker diagnosis.
graph TB
User[User] -->|"starts processes"| PP[persistproc server]
subgraph processes["Managed Processes"]
API[API Server]
FE[Frontend Server]
SCSS[SCSS Builder]
DB[Postgres]
end
PP <-->|"manages / logs"| processes
Agent1[Claude Code] -.->|"read logs<br/>diagnose issues"| PP
Agent2[Cursor] -.->|"read logs<br/>diagnose issues"| PP
style PP fill:#e1f5fe,stroke:#01579b,stroke-width:2px
style API fill:#fff3e0,stroke:#e65100,stroke-width:2px
style FE fill:#fff3e0,stroke:#e65100,stroke-width:2px
style SCSS fill:#fff3e0,stroke:#e65100,stroke-width:2px
style DB fill:#fff3e0,stroke:#e65100,stroke-width:2px
style User fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
style Agent1 fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
style Agent2 fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
style processes fill:#f5f5f5,stroke:#999,stroke-width:1px,stroke-dasharray: 5 5
Available Tools
persistproc exposes a standard Model Context Protocol (MCP) server on http://127.0.0.1:8947. You can use any MCP-compatible client to interact with it programmatically.
The server exposes the following tools:
| Tool | Description |
|---|---|
| ctrl | Unified process control: start, stop, or restart processes. |
| list | List all managed processes and their status. Can optionally filter by pid, command, or working directory and provides log paths. |
| output | Retrieve captured output from a process. |
This list is intentionally short because LLMs perform worse with too many tools, to the point where some IDEs (such as Cursor) have a cap on how many tools you can have.
Getting started
1. Install persistproc
pip install persistproc
2. Start the server and configure your agent
Run this in a dedicated terminal and leave it running.
persistproc serve
The first thing persistproc serve outputs is configuration instructions for various agents, so follow those instructions if you haven't already.
3. Start a Process
In another terminal, cd to your project's directory and run your command via persistproc.
# Example: starting a Node.js development server
cd /path/to/your/project
persistproc npm run dev
The command is sent to the server, and its output is streamed to your terminal. You can safely close this terminal, and the process will continue to run.
With this, your agent can now use the available tools to manage your development environment.
Example Agent Interaction
Once your agent is connected, you can ask it to manage your processes. Assuming you have started a web server with persistproc npm run dev (PID 12345), you can now interact with it.
You: "List the running processes."
- Agent: Calls
list()and shows you the runningnpm run devprocess.
- Agent: Calls
You: "The web server seems stuck. Can you restart it?"
- Agent: Identifies the correct process and calls
ctrl(action="restart", pid=12345).
- Agent: Identifies the correct process and calls
You: "Show me any errors from the web server."
- Agent: Calls
output(pid=12345, stream="stderr")to retrieve the latest error logs.
- Agent: Calls
Development
Run persistproc in a fully configured virtualenv with ./pp. Run other commands such as pytest in a virtualenv with uv run.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.