Skip to main content
Glama

svn-agent MCP

Strict SVN Model Context Protocol server for agent-safe status, diff, EOL diagnosis, precommit checks, and guarded SVN mutations.

The implementation contract lives in docs/SPEC.md. The current source release is 1.2.2; each source clone can prepare a local runtime under releases/v1.2.2, while npm installations run directly from package-root dist/.

Requirements: Node.js 24.18.0 or newer within the Node 24 LTS line, npm 11.16.0 or newer, Git, and access to the public npm registry. Windows uses the bundled VisualSVN Apache Subversion command-line package and dos2unix payload. On macOS and Linux, svn, svnversion, svnadmin, dos2unix, and unix2dos must be available on PATH.

Quick Start

git clone https://github.com/shrishailrana-maker/svn-agent-mcp-v1.git
cd svn-agent-mcp-v1
npm install
npm run prepare:local
npm test

Related MCP server: git-mcp-server

Agent-Managed Global Install

Give this prompt to Codex, Claude, or another local coding agent:

Install or update the SVN MCP globally with: npm install -g svn-agent-mcp@latest
Verify the package with: npm list -g svn-agent-mcp --depth=0
Resolve the executable with the platform command lookup: where.exe svn-agent-mcp on Windows, or command -v svn-agent-mcp on macOS/Linux.
On macOS/Linux, verify that svn, svnversion, svnadmin, dos2unix, and unix2dos are available on PATH. If any are missing, install Subversion and dos2unix with the host package manager.
Ensure the MCP client entry is named "svn". Use command "svn-agent-mcp" when the client can launch it without a visible window; never use a source checkout, junction, or current pointer. Do not add --readonly.
On Windows, enable the client's hidden/no-window process option. If the npm command shim still opens a console, resolve the global module root with `npm root -g`, then use command "node" with args `["<global-module-root>\\svn-agent-mcp\\dist\\index.js"]`; the server cannot choose its parent process creation flags.
Preserve existing SVN_AGENT_* environment overrides without printing sensitive values, then restart the MCP client.
Query the registry version with: npm view svn-agent-mcp version
After restarting, run svn_self_check and compare its installed version with the registry version. Report the installed version, executable path, runtime layout, and MCP health instead of relying on a remembered version.

Agent Setup From GitHub

Tell an agent:

Get the SVN MCP from https://github.com/shrishailrana-maker/svn-agent-mcp-v1, clone it to a stable absolute path, run npm install, run npm run prepare:local, then configure the MCP command as node <absolute-clone-path>/current/dist/index.js. Use the host platform's native path syntax.

The setup commands are:

git clone https://github.com/shrishailrana-maker/svn-agent-mcp-v1.git
cd svn-agent-mcp-v1
npm install
npm run prepare:local

Then configure the MCP client to run:

node <absolute-clone-path>/current/dist/index.js

Claude Desktop Config Example

Add this under mcpServers:

{
  "mcpServers": {
    "svn": {
      "command": "node",
      "args": ["<absolute-clone-path>/current/dist/index.js"]
    }
  }
}

Codex Config Example

[mcp_servers.svn]
command = "node"
args = ["<absolute-clone-path>/current/dist/index.js"]
startup_timeout_sec = 120

Restart the MCP client after changing the config.

On Windows, process-window visibility is controlled by the MCP client that spawns the server. Clients should use a hidden/no-window process option such as Node's windowsHide:true. The server reserves stdout for newline-delimited MCP JSON-RPC and sends startup diagnostics only to stderr.

Start The MCP

For development from this working copy:

cd <path-to-svn-agent-mcp-v1>
npm install
npm run prepare:local
node ./current/dist/index.js

The source tree includes bin/ with the Windows VisualSVN Apache Subversion and dos2unix payload. Releases copy that folder to current/bin, so Windows clients do not need separate tool installations. On macOS and Linux, the server ignores those .exe files and resolves the native tools from PATH. See THIRD_PARTY_NOTICES.md, THIRD_PARTY_CHECKSUMS.txt, and third_party_licenses/ for bundled binary notices, hashes, and complete license texts.

Plug-And-Play Client Config

After npm install -g svn-agent-mcp@latest, register the MCP once. Do not set cwd or add environment variables unless an existing installation already needs an explicit override:

Generic client example:

{
  "mcpServers": {
    "svn": {
      "command": "svn-agent-mcp"
    }
  }
}

The MCP is not tied to one SVN checkout. If a tool call supplies absolute paths and omits cwd, the server finds the nearest SVN working copy for those paths. Relative paths require explicit per-call cwd.

Client registration is static: configure the MCP once, and working-copy discovery happens per tool call. The server does not rewrite client configuration at runtime.

Environment variables are not required when the toolchain is bundled or available on PATH. SVN_MCP_RESPONSE_MODE selects compact (default), standard, or full responses. Compact mode returns bounded structured results and short text receipts; use responseMode: "full" on a call when bounded raw SVN diagnostics are needed. Errors retain bounded stdout/stderr diagnostics in every mode. Other development/test escape hatches are SVN_AGENT_BIN_DIR, SVN_AGENT_SVN_PATH, SVN_AGENT_DOS2UNIX_DIR, SVN_AGENT_TIMEOUT_MS, and SVN_AGENT_MAX_DIFF_LINES.

High-volume reads are bounded by default. Log messages and changed paths are capped and opt-in where appropriate. Diff collection defaults to 200 lines, compact excerpts are capped at 3,000 characters, and compact diff results retain transport headroom below a 32 KiB JSON-RPC record. maxChars and maxFiles are upper requests: the response may return less with independent nextCursor and nextFileCursor values. Large file/property/status/EOL collections expose explicit continuation cursors. Buffered SVN commands fail with a scoped diagnostic above 20 MB. Streamed diff lines are capped at 1 MiB each, and per-file diff summaries are capped at 20,000 entries; either truncation is reported. Public path arrays accept at most 500 entries, and individual filesystem paths are capped at 4,096 characters. Compact mode changes response size only; path containment, mutation guards, EOL checks, mixed-revision checks, and commit verification run unchanged.

svn_commit refuses existing directory targets by default because its deliberate --depth empty behavior commits only the directory node and excludes changed descendants. Prefer explicit file paths. Set allowDirectoryTargets:true only when intentionally committing directory properties or another directory-node-only change; remaining descendants are reported as post-commit residue. svn_precommit accepts the same allowDirectoryTargets and allowRoot acknowledgements so its readiness verdict matches those target-scope guards.

Commands

Command

Description

npm run dev

Run the TypeScript entry point during development

npm run check:runtime

Verify the supported Node 24 LTS and minimum npm version

npm run typecheck

Check TypeScript without emitting build output

npm run build

Compile src/ into dist/

npm run generate:api-contract

Generate docs/MCP_API.json from the registered MCP tools

npm run check:api-contract

Fail when the generated MCP API contract is stale

npm test

Run the Jest test suite

npm run test:package

Pack, install, and self-check the real npm artifact in isolation

npm run benchmark:responses

Compare compact MCP, full MCP, and equivalent raw SVN output sizes

npm run prepare:local

Build and prepare the local current runtime

npm run release:prepare

Copy dist/ and bin/ into releases/v<version> and repoint current

npm run clean

Remove root dist/ with the Node clean script

Operator Diagnostics

Use svn_self_check to verify the MCP package, runtime layout, resolved native or bundled tools, and release scripts. Use svn_diagnose on a working-copy path when SVN itself is acting strange; it checks local status, remote status, HEAD info, latest log reachability, and returns actionable notes for authentication, network, lock, and working-copy database failures.

Use svn_snapshot for a one-call status and revision summary. svn_log and svn_diff accept exact or ranged revision selectors, while bounded svn_cat and svn_blame calls support historical file inspection without raw SVN output. Mutations include dry-run-first svn_delete and canonical svn_resolve; the older svn_resolved name remains as a deprecated compatibility alias.

For SVN property work, use svn_propget and guarded svn_propset instead of raw svn propget/svn propset. svn_propset_eol_style remains the safer shortcut for svn:eol-style normalization.

Changelog

Release history is maintained in CHANGELOG.md.

Layout

Path

Purpose

src/

MCP server implementation

src/parse/

SVN XML/text parsers

src/tools/

MCP tool families

tests/

Unit and temp-repository integration tests

.svn-mcp-policy.json

Repo-local guard exceptions for this MCP's intentional runtime payloads

bin/

Versioned Windows SVN and EOL converter runtime binaries

third_party_licenses/

License and notice texts shipped with the bundled runtime

THIRD_PARTY_NOTICES.md

Notices for bundled binary payloads

docs/

Spec, generated MCP API contract, local rules, and decisions

releases/

Generated versioned runtime release payloads, ignored by Git

Usage Model

Register one global MCP server and use explicit paths or per-call cwd values when working across SVN checkouts. The server does not assume a product name, project name, or fixed working copy.

Install Server
A
license - permissive license
B
quality
A
maintenance

Maintenance

Maintainers
Response time
1dRelease cycle
7Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shrishailrana-maker/svn-agent-mcp-v1'

If you have feedback or need assistance with the MCP directory API, please join our Discord server