Agent-VC MCP Server
Provides AI agents with persistent state, version control, and task management capabilities powered by Fossil SCM. It enables agents to manage files in a sandboxed environment with full commit history and built-in ticket tracking.
README
Agent-VC MCP Server
A specialized MCP server for AI agents to have persistent state, version control, and task management using Fossil SCM.
Why Agent-VC?
- Persistent State: Agents can store files in a structured, versioned workspace.
- Reproducibility: Full history of every commit, allowing rollbacks to any state.
- Task Management: Built-in tickets/tasks (via Fossil's ticket system) to track progress without external dependencies.
- Sandboxed: Operations are strictly limited to
~/.agent-vc/workspace/.
Structure & File Management
Core Directories
~/.agent-vc/: The root directory for all Agent-VC data and configuration.~/.agent-vc/version_control.fossil: The Fossil repository file. This is a single SQLite database that stores your entire project history, version control objects, and task/ticket data.~/.agent-vc/workspace/: The active checkout directory. All operations performed by the agent occur within this directory. This is the only place files are read from or written to.
File and Folder Mapping
Agent-VC uses a "Project" based organization within the shared workspace. This allows the agent to manage multiple logical projects or modules within a single version-controlled repository.
| Concept | Description | Path Example |
|---|---|---|
| Workspace Root | The base directory for all operations. | ~/.agent-vc/workspace/ |
| Project Folder | A subdirectory representing a specific project. | ~/.agent-vc/workspace/chatbot-v1/ |
| Project Subpath | A file or nested folder within a project. | ~/.agent-vc/workspace/chatbot-v1/src/utils.js |
Working with the MCP Tools
When using the agent-vc tools, you interact with files using the project and subPath parameters. This abstraction maps directly to the filesystem:
- Initializing a Project: Running
vc_init_project(name: "my-app")creates the directory~/.agent-vc/workspace/my-app/. - Writing Files: Running
write_file(project: "my-app", subPath: "main.py", content: "...")writes to~/.agent-vc/workspace/my-app/main.py. - Nested Folders: You can use forward slashes in the
subPathto create nested structures:write_file(project: "my-app", subPath: "docs/specs/readme.md", ...)will automatically create thedocs/specs/directories if they don't exist.
[!NOTE] All files created using the
write_filetool are automatically added to Fossil's tracking (fossil add). To record these changes permanently in history, you must callvc_commit.
Installation
-
Install Fossil: Follow the official installation instructions on the Fossil website.
-
Run via npx: You can run the server directly using
npx:npx agent-vc-mcp -
Add to your MCP Config (e.g.,
claude_desktop_config.jsonor equivalent agent config):
{
"mcpServers": {
"agent-vc": {
"command": "npx",
"args": ["agent-vc-mcp"],
"env": {
"AGENT_VC_WORKSPACE": "/path/to/my/project",
"AGENT_VC_FOSSIL_DB": "/path/to/backup.fossil"
}
}
}
}
Environment Variables
You can tune Agent-VC behavior by setting these environment variables:
| Variable | Description | Default |
|---|---|---|
AGENT_VC_ROOT_OVERRIDE |
The root folder for agent data. | ~/.agent-vc/ |
AGENT_VC_WORKSPACE |
Path to the workspace checkout. | ~/.agent-vc/workspace/ (if cwd is / or .) |
AGENT_VC_FOSSIL_DB |
Path to the Fossil repository file. | ~/.agent-vc/version_control.fossil |
[!TIP] Setting
AGENT_VC_WORKSPACEis useful if you want the agent to operate directly on an existing local directory that you've already initialized with Fossil SCM.
Tools
Version Control
vc_init_project(name): Create a project subfolder.vc_commit(message): Commit all changes in the workspace.vc_status(): Get current status of tracking and changes.vc_diff(): View changes in the workspace.
File Operations (Project Scoped)
write_file(project, subPath, content): Writes a file and automatically adds it to Fossil tracking.read_file(project, subPath): Reads a file.list_files(project): Lists all files in a project.
Task Management
task_create(title, description): Create a project task.task_list(status?): List existing tasks.task_update(id, status, comment?): Update task status.
Usage Examples
🏢 Initializing a Project
Create a new project folder structure in the workspace.
{
"name": "vc_init_project",
"arguments": { "name": "chatbot-v1" }
}
💾 Writing and Committing Files
Write code and commit it to history.
// 1. Write the file
{
"name": "write_file",
"arguments": {
"project": "chatbot-v1",
"subPath": "index.js",
"content": "console.log('Hello Agent!');"
}
}
// 2. Commit the changes
{
"name": "vc_commit",
"arguments": { "message": "initial commit for chatbot" }
}
📋 Managing Tasks (Fossil Tickets)
Track work using the built-in ticket system.
// 1. Create a task
{
"name": "task_create",
"arguments": {
"title": "Add streaming support",
"description": "Implement chunked response parsing."
}
}
// 2. List open tasks (to get the Ticket ID)
{
"name": "task_list",
"arguments": { "status": "Open" }
}
// 3. Update a task (using the first 7-10 characters of the Ticket ID)
{
"name": "task_update",
"arguments": {
"id": "8d0aa38",
"status": "Closed",
"comment": "Work completed and tested."
}
}
🔍 Inspecting Progress & History
// Check modified files
{ "name": "vc_status", "arguments": {} }
// View code diff
{ "name": "vc_diff", "arguments": {} }
// List all files in a project
{
"name": "list_files",
"arguments": { "project": "chatbot-v1" }
}
// Read a specific file
{
"name": "read_file",
"arguments": {
"project": "chatbot-v1",
"subPath": "index.js"
}
}
Further Documentation
For more advanced Fossil commands and features (like branching, merging, and syncing), refer to the official Fossil SCM Documentation.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。