Purpose
persistproc is an MCP server and command-line tool whose goal is to become a "shared process layer in multi-agent development workflows." It lets both agents and humans view and control long-running processes, such as web servers. Its main purpose is to reduce the copy-paste operations required when coding with AI, make it easier to use multiple agents at the same time, and remain tool-agnostic.
Main capabilities
- Let agents view the output of long-running processes.
- Let agents control processes, such as starting, stopping, restarting, and reading logs.
- Expose a standard Model Context Protocol (MCP) server at http://127.0.0.1:8947,任何兼容 MCP clients can interact with it programmatically.
- The list of tools exposed by the server is intentionally kept short, because LLMs perform worse when there are too many tools, and some IDEs (such as Cursor) have a limit on the number of tools.
- There is no configuration file; processes are managed entirely at runtime. The project explicitly states that it is not a replacement for supervisord.
Usage
- Install persistproc.
- Start the server and configure your agent: run the command in a dedicated terminal and keep it running.
persistproc serveIt first outputs configuration instructions for different agents; just follow those instructions. - Start a process: in another terminal, cd to the project directory and run the command through persistproc. The command will be sent to the server, and its output will be streamed to the current terminal. You can safely close this terminal, and the process will continue running. You can also directly tell the agent to "run your development server with persistproc," and it will probably find the correct command by looking at package.json and run it with persistproc.
The material also mentions: you can use ./pp in a fully configured virtualenv to run persistproc, and use uv run to run other commands such as pytest in the virtualenv.
Example interaction
Suppose you have started a web server with persistproc npm run dev (PID 12345):
- You tell the agent "list the running processes," and the agent calls
list()and displays the runningnpm run devprocess. - You say "the web server seems stuck, can you restart it?", and the agent identifies the corresponding process and calls
ctrl(action="restart", pid=12345). - You say "show me the errors on the web server," and the agent calls
output(pid=12345, stream="stderr")to get the latest error logs.
Applicable scenarios
- Basic web development: the development server is usually started with
npm run dev, which watches for code changes, type checks, lints, and hot-reloads the page. When an error occurs, the error is printed to the terminal. When using persistproc, changenpm run devtopersistproc npm run dev, the agent can instantly read its output or even restart it; at the same time, you can still view the output in the original terminal and terminate it as usual with Ctrl+C. - Complex web development: running a web application locally may require four processes, such as an API, a frontend server, an SCSS builder, and Postgres, with each service outputting its own logs. If these processes are started with persistproc, the agent can read all the logs at once, potentially providing faster diagnosis.
- Multi-person/multi-agent collaboration: the goal is to facilitate the use of multiple agents and remain tool-agnostic. The material points out that only Cursor's agent can see processes in the Cursor terminal, while Claude Code, Gemini CLI, and others cannot.
Limitations
- If a process is started by another system, the material suggests it is best to write the logs to a predictable location and tell the agent where the logs are, rather than trying to use persistproc; or follow the relevant issue on GitHub.
- Currently, the most useful scenario for persistproc is: you want the agent to be able to manage the process, not just view its output.
- There is no configuration file; processes are managed entirely at runtime.
License
This project is licensed under the MIT License.