MCP-SVN
概览
一个完整的MCP(模型上下文协议)服务器,用于Subversion(SVN)集成,旨在让AI代理高效管理SVN仓库。 - ✅ : 信息、状态、日志、差异、检查、更新 - ✅ : 添加、提交、删除、还原 - ✅ : 清理 - 🔄 : (开发中) - 🔄 : 合并、切换、属性(开发中) - 🔄 : 指责、冲突检测(开发中) - 🔄 : (开发中) - >= 18.0.0 - 已安装并可在PATH上使用 -(用于开发) SVN_WORKING_DIRECTORY 和 SVN_URL 是独立的——可以设置其中一个或两个。两者都配置好后,本地操作(svn_status、svn_commit、......)在工作副本中运行,支持网址的工具(svn_cat、svn_list、svn_info、svn_log、svn_diff)可以调用: - 完整URL(https://svn.example.com/repo/trunk/file.sql))- 以/(/trunk/file.sql)开头的仓库相关系路径——与SVN_URL连接——本地路径——与工作副本解析而成 检查SVN系统和工作副本的健康状态。
概述(AI 翻译)
一个完整的MCP(模型上下文协议)服务器,用于Subversion(SVN)集成,旨在让AI代理高效管理SVN仓库。
🎯 特色
- ✅ 基础仓库操作:信息、状态、日志、差异、借出、更新
- ✅ 文件管理:添加、提交、删除、还原
- ✅ 维护工具:清理
- 🔄 分支管理:(开发中)
- 🔄 高级操作:合并、切换、属性(开发中)
- 🔄 分析工具:指责、冲突检测(开发中)
- 🔄 批处理操作:(开发中)
📋 要求
- Node.js >= 18.0.0
- Subversion (SVN) 已安装并可在 PATH 上使用
- TypeScript(用于开发)
🔍 检测到SVN安装
检查是否安装了SVN
如果正确安装 SVN 的预期输出:
❌ 如果未安装SVN时常见错误:
🛠️ 高级诊断
💾 在Windows上安装SVN
选项1:包管理器
选项2:官方安装程序
-
TortoiseSVN(包含命令行客户端):
-
SlikSVN(仅命令行):
-
CollabNet颠覆:
选项3:Windows 版 Visual Studio 或 Git
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
SVN MCP Server
A complete MCP (Model Context Protocol) server for Subversion (SVN) integration, designed to let AI agents manage SVN repositories efficiently.
🎯 Features
- ✅ Basic repository operations: info, status, log, diff, checkout, update
- ✅ File management: add, commit, delete, revert
- ✅ Maintenance tools: cleanup
- 🔄 Branch management: (In development)
- 🔄 Advanced operations: merge, switch, properties (In development)
- 🔄 Analysis tools: blame, conflict detection (In development)
- 🔄 Batch operations: (In development)
📋 Requirements
- Node.js >= 18.0.0
- Subversion (SVN) installed and available on PATH
- TypeScript (for development)
🔍 Detecting the SVN installation
Check whether SVN is installed
# Basic command to check SVN
svn --version
# Check the full path of the executable
where svn # Windows
which svn # Linux/Mac
# Check the full SVN client
svn --version --verbose
Expected output if SVN is correctly installed:
svn, version 1.14.x (r1876290)
compiled Apr 13 2023, 17:22:07 on x86_64-pc-mingw32
Copyright (C) 2023 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
❌ Common errors if SVN is NOT installed:
# Windows
'svn' is not recognized as an internal or external command
# Linux/Mac
svn: command not found
bash: svn: command not found
🛠️ Advanced diagnostics
# Check the system PATH
echo $PATH # Linux/Mac
echo %PATH% # Windows CMD
$env:PATH # Windows PowerShell
# Search for SVN executables on the system
find / -name "svn" 2>/dev/null # Linux
Get-ChildItem -Path C:\ -Name "svn.exe" -Recurse -ErrorAction SilentlyContinue # Windows PowerShell
# Check the specific client version
svn --version | head -1 # Get just the first line with the version
💾 Installing SVN on Windows
Option 1: Package managers
# Using Chocolatey (Recommended)
choco install subversion
# Using winget
winget install CollabNet.Subversion
# Using Scoop
scoop install subversion
Option 2: Official installers
-
TortoiseSVN (includes the command-line client):
https://tortoisesvn.net/downloads.html ✅ Includes GUI and CLI clients ✅ Windows Explorer integration -
SlikSVN (command line only):
https://sliksvn.com/download/ ✅ Lightweight (CLI only) ✅ Ideal for automation -
CollabNet Subversion:
https://www.collab.net/downloads/subversion ✅ Enterprise version ✅ Commercial support available
Option 3: Visual Studio or Git for Windows
# If you have Git for Windows installed, it can include SVN
git svn --version
# Visual Studio can also include SVN
安装
npx @grec0/mcp-svn配置
{
"mcpServers": {
"svn": {
"command": "npx",
"args": ["@grec0/mcp-svn"],
"env": {
"SVN_PATH": "svn",
"SVN_WORKING_DIRECTORY": "C:/path/to/working/copy",
"SVN_URL": "https://svn.example.com/repo",
"SVN_USERNAME": "your_username",
"SVN_PASSWORD": "your_password"
}
}
}
}