coding-agent-mcp
Containerized MCP server for coding agents with tools for file editing, shell commands, process management, Git, browser automation, and project snapshots.
README
Agent MCP
Agent MCP is a containerized Model Context Protocol (MCP) server for coding agents. It exposes a project-oriented toolset for file editing, shell commands, long-running process management, Git helpers, HTTP fetches, browser inspection with Playwright, package installation, and project snapshots.
The server is implemented with FastMCP and runs over streamable HTTP at /mcp.
Features
- Open and switch between host project directories.
- Read, write, append, patch, move, copy, delete, and search files.
- Run one-off shell commands with timeouts.
- Start, inspect, wait on, stop, and forget long-running background processes.
- Inspect Git status, diffs, logs, branches, checkout, and commit local changes.
- Fetch URLs from inside the container.
- Run browser automation with Playwright Chromium.
- Capture DOM, accessibility, form, network, storage, console, and error snapshots.
- Keep persistent browser sessions across multiple MCP calls.
- Create, restore, and list local project snapshots.
- Install Debian, Python, and Node packages in the running container.
- Report environment and project metadata.
Repository Layout
.
├── app/
│ ├── __init__.py
│ └── server.py
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── README.md
Requirements
For Docker usage:
- Docker
- Docker Compose
For local Python usage:
- Python 3.12 or newer
pip- Playwright browser dependencies
Docker is the recommended way to run this project because the image installs the tools the MCP server exposes to agents, including Git, Docker CLI, Node, npm, pnpm, Yarn, Go, Rust, Java, ripgrep, SQLite, PostgreSQL client tools, and Chromium for Playwright.
Quick Start
Build and run the MCP server:
docker compose up --build
The compose file maps the MCP server to:
http://localhost:8081/mcp
The container listens on port 8080; the host mapping is 8081:8080.
MCP Client Configuration
Use a streamable HTTP MCP connection pointed at:
http://localhost:8081/mcp
The server name is:
coding-agent-mcp
Exact MCP client configuration differs by client. Use streamable HTTP as the transport and the URL above as the endpoint.
Docker Compose Details
The included docker-compose.yml starts one service named mcp-server.
Important mounts:
/home/anshagrawal:/hostexposes the host workspace tree inside the container../app:/app/appenables live editing of the server source while developing../snapshots:/snapshotsstores project snapshots outside the container./var/run/docker.sock:/var/run/docker.socklets tools inside the container talk to the host Docker daemon./home/anshagrawal/.ssh:/root/.ssh:roexposes SSH credentials read-only for Git operations.
Important environment values:
HOME=/hostmakes agent shell commands use the mounted host tree as home.PLAYWRIGHT_BROWSERS_PATH=/ms-playwrightuses the Chromium install baked into the image.GIT_SSH_COMMANDselects the mounted SSH key and accepts new host keys.NO_PROXY/no_proxykeep localhost and host gateway traffic local.
If you use this project on another machine, update the host-specific paths in docker-compose.yml before running it.
Local Development
Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
python -m playwright install --with-deps chromium
Run the server locally:
python -m app.server
By default, the server binds to 0.0.0.0:8080 and serves MCP traffic at /mcp.
Tool Groups
Project Tools
open_projectswitch_projectlist_projectsclose_projectpwdget_project_infoenvironment_info
File and Search Tools
write_fileappend_fileread_fileread_filesreplace_in_filereplace_linesinsert_at_linecopy_pathmove_pathdelete_pathcreate_directorylist_filestreefind_filesearch_filesregex_searchfind_symbolstat_pathapply_patch
Shell and Process Tools
run_commandcommand_historystart_processlist_processesget_process_outputwait_for_process_outputstop_processforget_process
Git Tools
git_statusgit_diffgit_loggit_branchgit_checkoutgit_commit
Browser Tools
browser_inspectbrowser_check_errorsbrowser_interactbrowser_evaluatebrowser_dom_snapshotbrowser_accessibility_snapshotbrowser_form_snapshotbrowser_assertbrowser_network_tracebrowser_storage_statebrowser_session_openbrowser_session_listbrowser_session_closebrowser_session_inspectbrowser_session_interactbrowser_session_evaluatebrowser_session_dom_snapshotbrowser_session_accessibility_snapshotbrowser_session_logs
Snapshot Tools
create_snapshotrestore_snapshotlist_snapshots
Dependency Tools
install_apt_packagesinstall_python_packagesinstall_node_packagesinstall_project_dependencies
Browser Action Format
Browser interaction tools accept action dictionaries. Locator fields can use one of:
selectorrolewith optionalnametextlabelplaceholdertest_idalt_texttitle
Supported actions include:
clickdblclickfilltypepresshovercheckuncheckselectfocusblurwait_for_selectorwait_for_textwait_for_urlwaitgotoreloadassert_textassert_selectorassert_countassert_urlassert_titleevaluate
Example action payload:
[
{
"action": "fill",
"label": "Search",
"value": "agent mcp"
},
{
"action": "press",
"label": "Search",
"value": "Enter"
},
{
"action": "assert_text",
"text": "Results"
}
]
Snapshots
Snapshots are stored under /snapshots in the container and mapped to ./snapshots by Docker Compose. A snapshot copies the active project while ignoring common generated directories such as .git, node_modules, __pycache__, .venv, dist, and build.
Security Notes
This server is intentionally powerful. It can read and write mounted files, run shell commands, install packages, access the Docker socket, use mounted SSH credentials, and automate browsers. Run it only in trusted environments and expose the MCP endpoint only to trusted clients.
Review the host paths in docker-compose.yml before sharing or deploying this project. The defaults are tailored to the original development machine and may expose more of the host filesystem than you want.
Configuration
Most behavior is currently configured in app/server.py:
HOST_ROOT=/hostSNAPSHOT_ROOT=/snapshotsPROCESS_LOG_LIMIT=5000BROWSER_LOG_LIMIT=500MAX_READ_BYTES=500000MAX_OUTPUT=80000DEFAULT_TIMEOUT_SECONDS=30
The Docker image sets:
PYTHONDONTWRITEBYTECODE=1PYTHONUNBUFFERED=1PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
Development Workflow
Useful checks:
python -m compileall app
Run the container:
docker compose up --build
Check the exposed endpoint from the host:
curl http://localhost:8081/mcp
The MCP endpoint may return a protocol-specific response depending on the request; this command is primarily a connectivity check.
License
No license file is included yet. Add one before publishing this project for reuse by other people or organizations.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.