SVN MCP Server

by gcorroto

Not rated
GitHub

About

An MCP server for integrating with and managing Subversion (SVN) repositories, enabling AI agents to perform version control tasks.

Details

Author
gcorroto
Categories
Developer Tools, Other

Setup

Install SVN MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/gcorroto/mcp-svn

Follow the installation instructions in the repository README, then restart your MCP client.

An MCP server for integrating with and managing Subversion (SVN) repositories, enabling AI agents to perform version control tasks.

A complete MCP (Model Context Protocol) server for Subversion (SVN) integration, designed to let AI agents manage SVN repositories efficiently.

- ✅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)

- Node.js>= 18.0.0
- Subversion (SVN)installed and available on PATH
- TypeScript(for development)

# 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
# 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
# Using Chocolatey (Recommended) choco install subversion # Using winget winget install CollabNet.Subversion # Using Scoop scoop install subversion

-

TortoiseSVN(includes the command-line client):

https://tortoisesvn.net/downloads.html ✅ Includes GUI and CLI clients ✅ Windows Explorer integration
https://sliksvn.com/download/ ✅ Lightweight (CLI only) ✅ Ideal for automation
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 # Go to: Visual Studio Installer > Modify > Individual Components > Subversion
# Ubuntu/Debian sudo apt-get update sudo apt-get install subversion # CentOS/RHEL/Fedora sudo yum install subversion # CentOS 7 sudo dnf install subversion # CentOS 8/Fedora # Arch Linux sudo pacman -S subversion # Alpine Linux sudo apk add subversion
# Homebrew (Recommended) brew install subversion # MacPorts sudo port install subversion # From Xcode Command Line Tools (may already be included) xcode-select --install
# Show current configuration svn config --list # Configure the global user svn config --global auth:username your_username # Configure the default editor svn config --global editor "code --wait" # VS Code svn config --global editor "notepad" # Windows Notepad svn config --global editor "nano" # Linux/Mac nano
# Test connection to a repository (without checking out) svn list https://svn.example.com/repo/trunk # Test with specific credentials svn list https://svn.example.com/repo/trunk --username user --password password
git clone https://github.com/gcorroto/mcp-svn.git cd mcp-svn npm install npm run build

SVN_WORKING_DIRECTORYandSVN_URLare independent — set either or both. With both configured, local operations (svn_status,svn_commit, ...) run in the working copy, and URL-capable tools (svn_cat,svn_list,svn_info,svn_log,svn_diff) can be called with:

- a full URL (https://svn.example.com/repo/trunk/file.sql)
- a repo-relative path starting with/(/trunk/file.sql) — joined withSVN_URL
- a local path — resolved against the working copy

{ "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" } } } }

Check the health status of the SVN system and working copy.

Get detailed information about the working copy or a specific file.

Show the status of files in the working copy.

svn_status(path?: string, showAll?: boolean)

Show the commit history of the repository.

svn_log(path?: string, limit?: number, revision?: string)

Show differences between file revisions.

svn_diff(path?: string, oldRevision?: string, newRevision?: string)
svn_checkout( url: string, path?: string, revision?: number | "HEAD", depth?: "empty" | "files" | "immediates" | "infinity", force?: boolean, ignoreExternals?: boolean )

Update the working copy from the repository.

svn_update( path?: string, revision?: number | "HEAD" | "BASE" | "COMMITTED" | "PREV", force?: boolean, ignoreExternals?: boolean, acceptConflicts?: "postpone" | "base" | "mine-conflict" | "theirs-conflict" | "mine-full" | "theirs-full" )
svn_add( paths: string | string[], force?: boolean, noIgnore?: boolean, parents?: boolean, autoProps?: boolean, noAutoProps?: boolean )
svn_commit( message: string, paths?: string[], file?: string, force?: boolean, keepLocks?: boolean, noUnlock?: boolean )
svn_delete( paths: string | string[], message?: string, force?: boolean, keepLocal?: boolean )

Clean up the working copy from interrupted operations.

// Check that SVN is available and the working copy is valid const healthCheck = await svn_health_check();
// General working copy information const info = await svn_info(); // Information about a specific file const fileInfo = await svn_info("src/main.js");
// Status of all files const status = await svn_status(); // Status including remote information const fullStatus = await svn_status(null, true);
const checkout = await svn_checkout( "https://svn.example.com/repo/trunk", "local-copy", "HEAD", "infinity", false, false );
// Add files await svn_add(["src/new-file.js", "docs/readme.md"], { parents: true }); // Commit await svn_commit( "Add new feature and documentation", ["src/new-file.js", "docs/readme.md"] );
# Run tests npm test # Tests with coverage npm run test -- --coverage # Tests in watch mode npm run test -- --watch
# Build TypeScript npm run build # Development mode npm run dev # Watch mode npm run watch # MCP Inspector npm run inspector # Tests npm test # Publish a new version npm run release:patch npm run release:minor npm run release:major
svn-mcp/ ├── package.json ├── tsconfig.json ├── jest.config.js ├── index.ts ├── common/ │ ├── types.ts # TypeScript types │ ├── utils.ts # SVN utilities │ └── version.ts # Package version ├── tools/ │ └── svn-service.ts # Main SVN service ├── tests/ │ └── integration.test.ts # Integration tests └── README.md

See theSVN_MCP_IMPLEMENTATION.mdfile for the full implementation checklist.

Current progress:Stage 1 complete (Basic Operations) ✅

- Branch management (branching)
- Advanced operations (merge, switch)
- Analysis tools
- Batch operations

Error: SVN is not available in the system PATH

Solution:Install SVN and make sure it is on the system PATH.

Error: Failed to get SVN info: svn: warning: W155007: '.' is not a working copy

Solution:Navigate to a directory that is an SVN working copy or run checkout first.

Error: svn: E170001: Authentication failed

Solution:Set theSVN_USERNAMEandSVN_PASSWORDenvironment variables.

Solution:Increase the value ofSVN_TIMEOUT.

MIT License - seeLICENSEfor more details.
- Fork the project
- Create a feature branch (git checkout -b feature/new-feature)
- Commit your changes (git commit -am 'Add new feature')
- Push to the branch (git push origin feature/new-feature)
- Open a Pull Request

- Issues:GitHub Issues
- Documentation:
Project Wiki
- Email:
soporte@grec0.dev

Creates commit messages from staged files in a local git repository.

An MCP server for interacting with the AtomGit API for version control and code hosting.

A portable MCP server for performing various GitHub operations on any repository.

Manage Forgejo repositories and execute commands through an MCP-compatible chat interface.

Integrates with the Gerrit code review system to review code changes and details.

Make git commits on behalf of AI to track AI contributions in your codebase.

Performs deep, file-level forensics on Git repositories to analyze file histories, changes, and patterns.

Interact with the GitHub API for file operations, repository management, and search.

Manage GitHub repositories using a personal access token via CLI or environment variables.

Allows AI assistants to interact with the GitHub API for repository management, code collaboration, and other development tasks.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.