Server Mercurial
БесплатноНе проверенEnables AI assistants to interact with Mercurial repositories, supporting status checks, commits, topic-based workflows, and advanced operations like rebase and
Описание
Enables AI assistants to interact with Mercurial repositories, supporting status checks, commits, topic-based workflows, and advanced operations like rebase and evolve.
README
A Model Context Protocol server for Mercurial repository interaction and automation. This server provides tools to read, search, and manipulate Mercurial repositories via Large Language Models, with a focus on topic-based development workflows.
Features
Core Operations
hg_status- Shows working directory statushg_diff- Shows uncommitted changeshg_diff_staged- Shows all uncommitted changes (Mercurial has no staging area)hg_diff_rev- Shows changes introduced by a specific changesethg_commit- Records changes to the repositoryhg_add- Adds new files to version controlhg_remove- Removes files from version controlhg_move- Moves or renames fileshg_revert- Reverts uncommitted changeshg_log- Shows commit history
Topic-Based Development (Recommended)
hg_topic- Creates a new topichg_topics- Lists all topicshg_topic_current- Shows the current topichg_update- Updates to a different topic, branch, or revisionhg_stack- Shows the current topic stack
Advanced Operations
hg_rebase- Rebases changes onto a destination (preferred over merge)hg_evolve- Evolves the repository to resolve instabilities
Installation
From source
git clone <repository>
cd mcp-mercurial-server
npm install
npm run build
npm link
Configuration
Claude Desktop
If you installed from source:
{
"mcpServers": {
"mercurial": {
"command": "mcp-server-mercurial"
}
}
}
Usage Examples
Basic Workflow
1. Check status: hg_status
2. View changes: hg_diff
3. Add new files: hg_add (files: ["file1.cpp"])
4. Remove files: hg_remove (files: ["file3.cpp"])
5. Move/rename files: hg_move (source: "file2.cpp", destination: "file4.cpp")
6. Commit with detailed message and explicit files:
hg_commit (
message: "Your commit message\n\n- Added a #1 file\n- Got rid of a file named 3 because it was useless\n- Fixed naming of file 4",
files: ["file1.cpp", "file3.cpp", "file4.cpp"]
)
Checking Current State
# Get the current topic
hg_topic_current
# See the last 5 commits (default)
hg_log
# Get topic name using template
hg_log (max_count: 1, template: "{topic}")
Topic-Based Development
1. Create topic: hg_topic (topic_name: "feature-xyz")
2. Work on changes...
3. Commit to topic: hg_commit (message: "Implement feature XYZ", files: ["feature.cpp"])
4. Rebase topic: hg_rebase (destination: "default")
Requirements
- Node.js 18 or higher
- Mercurial installed and available in PATH
- Mercurial extensions (recommended):
topicsextension for topic-based workflowsevolveextension for history management
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Run tests
npm test
# Lint
npm run lint
# Format
npm run format
Debugging
Use the MCP inspector to debug the server:
npx @modelcontextprotocol/inspector npx mcp-server-mercurial
Key Differences from Git
- No Staging Area: All changes are committed directly
- Topics: Lightweight branches for feature development
- Rebase Preferred: Use rebase instead of merge for cleaner history
- Evolve: Safe history editing with the evolve extension
Best Practices
Always list files explicitly in commits - Don't rely on implicit file selection
Use multi-line commit messages with bullet points for clarity:
Main description - First change detail - Second change detail - Third change detailPrefer topics over branches for feature development
Check current topic before starting work:
hg_topic_currentReview recent commits with
hg_log(defaults to last 5)
License
MIT
Установка Server Mercurial
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Metal-Shark-Sharktech/mcp-server-mercurialFAQ
Server Mercurial MCP бесплатный?
Да, Server Mercurial MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Server Mercurial?
Нет, Server Mercurial работает без API-ключей и переменных окружения.
Server Mercurial — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Server Mercurial в Claude Desktop, Claude Code или Cursor?
Открой Server Mercurial на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Server Mercurial with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
