
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

A Model Context Protocol server that provides thread-safe Markdown document editing with atomic transactions and configurable validation.
SafeMarkdownEditor MCP Server is cataloged as an MCP server attributed to quantalogic. A Model Context Protocol server that provides thread-safe Markdown document editing with atomic transactions and configurable validation. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for SafeMarkdownEditor MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes, the MCP tools include an undo operation that rolls back the last operation.
Yes, validation levels can be set to STRICT, NORMAL, or PERMISSIVE.
README.md · 18268207873e · 采集于 2026-11-13 08:24:42 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that provides powerful Markdown document editing capabilities with thread-safe operations, atomic transactions, and comprehensive validation.
📦 Available on PyPI: quantalogic-markdown-mcp
🚀 Quick Start: Install with uv add quantalogic-markdown-mcp or pip install quantalogic-markdown-mcp
Current version: 0.1.2
✨ Comprehensive Markdown Editing
🔧 MCP Tools Available
File Operations:
load_document - Load a Markdown document from a file path (supports absolute, relative, and ~ expansion)save_document - Save the current document to a file pathget_file_info - Get information about the currently loaded filetest_path_resolution - Test and verify path resolution for different path formatsDocument Editing:
insert_section - Insert new sections at specified positionsdelete_section - Remove sections by ID or headingupdate_section - Modify section content while preserving structuremove_section - Reorder sections within the documentget_section - Retrieve individual section content and metadatalist_sections - Get an overview of all document sectionsget_document - Export the complete Markdown documentundo - Rollback the last operation📊 MCP Resources
document://current - Real-time access to the current documentdocument://history - Transaction history for undo/redo operationsdocument://metadata - Document metadata (title, author, timestamps)🎯 MCP Prompts
summarize_section - Generate section summariesrewrite_section - Improve section clarity and concisenessgenerate_outline - Create document outlinesThe package is available on PyPI! Install the latest version (0.1.2) directly:
# Install with uv (recommended)
uv add quantalogic-markdown-mcp@0.1.2
# Or install with pip
pip install quantalogic-markdown-mcp==0.1.2
You can run the MCP server directly without installing it locally:
# Run directly with uvx
uvx --from quantalogic-markdown-mcp python -m quantalogic_markdown_mcp.mcp_server
For development or to contribute to the project:
# Clone the repository
git clone https://github.com/raphaelmansuy/quantalogic-markdown-edit-mcp.git
cd quantalogic-markdown-edit-mcp
# Install with development dependencies
uv sync --group dev
# Install in development mode
uv pip install -e .
If you installed from PyPI:
# Run the MCP server directly (ensure version 0.1.2 is installed)
python -m quantalogic_markdown_mcp.mcp_server
# Or with uvx (no installation required)
uvx --from quantalogic-markdown-mcp python -m quantalogic_markdown_mcp.mcp_server
If you cloned the repository:
# Using uv
uv run python -m quantalogic_markdown_mcp.mcp_server
# Or with regular Python
python -m quantalogic_markdown_mcp.mcp_server
For development from source:
# Run the development server (dev mode)
python dev-scripts/run_mcp_server.py
To use this MCP server with Claude Desktop, add the following configuration to your claude_desktop_config.json:
macOS/Linux:
{
"mcpServers": {
"markdown-editor": {
"command": "python",
"args": [
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Windows:
{
"mcpServers": {
"markdown-editor": {
"command": "python.exe",
"args": [
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
macOS/Linux:
{
"mcpServers": {
"markdown-editor": {
"command": "uvx",
"args": [
"--from",
"quantalogic-markdown-mcp",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Windows:
{
"mcpServers": {
"markdown-editor": {
"command": "uvx.exe",
"args": [
"--from",
"quantalogic-markdown-mcp",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
For development from source:
macOS/Linux:
{
"mcpServers": {
"markdown-editor": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/quantalogic-markdown-edit-mcp",
"run",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Windows:
{
"mcpServers": {
"markdown-editor": {
"command": "uv.exe",
"args": [
"--directory",
"C:\\ABSOLUTE\\PATH\\TO\\quantalogic-markdown-edit-mcp",
"run",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Configuration file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAfter adding the configuration, restart Claude Desktop.
To use this MCP server with VSCode and GitHub Copilot, you have several configuration options depending on your needs.
Prerequisites:
Create a .vscode/mcp.json file in your workspace root to share the configuration with your team:
Option 1: Development Installation (Recommended)
For this project, use the development setup since you're working with the source code:
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"python",
"-c",
"import sys; sys.path.insert(0, 'src'); from quantalogic_markdown_mcp.mcp_server import mcp; mcp.run()"
],
"cwd": "${workspaceFolder}"
}
}
}
Option 2: Alternative Development Approach
Using environment variables for Python path:
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"--",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
],
"cwd": "${workspaceFolder}",
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
}
}
}
}
Option 3: Using PyPI Installation (If Installed Globally)
Only use this if you have installed the package globally:
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "python3",
"args": [
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
For Windows (adjust command names):
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "python.exe",
"args": [
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
For system-wide access across all workspaces:
Ctrl+Shift+P / Cmd+Shift+P)MCP: Open User ConfigurationOption 1: Using PyPI Installation
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "python",
"args": [
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Option 2: Using uvx
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"quantalogic-markdown-mcp",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
Option 3: Development Installation
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/quantalogic-markdown-edit-mcp",
"run",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
For containerized development environments, add to your devcontainer.json:
{
"image": "mcr.microsoft.com/devcontainers/python:latest",
"customizations": {
"vscode": {
"mcp": {
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${containerWorkspaceFolder}",
"run",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
]
}
}
}
}
}
}
Command Line Installation:
code --add-mcp '{"name":"markdown-editor","command":"uv","args":["--directory","/ABSOLUTE/PATH/TO/quantalogic-markdown-edit-mcp","run","python","-m","quantalogic_markdown_mcp.mcp_server"]}'
URL Installation: You can create installation links using the VSCode URL handler format:
vscode:mcp/install?%7B%22name%22%3A%22markdown-editor%22%2C%22command%22%3A%22uv%22%2C%22args%22%3A%5B%22--directory%22%2C%22%2FABSOLUTE%2FPATH%2FTO%2Fquantalogic-markdown-edit-mcp%22%2C%22run%22%2C%22python%22%2C%22-m%22%2C%22quantalogic_markdown_mcp.mcp_server%22%5D%7D
Once configured:
Ctrl+Cmd+I / Ctrl+Alt+I)Managing MCP Servers:
MCP: List ServersCtrl+Shift+X) → MCP SERVERS sectionDevelopment and Debugging:
For development, you can enable watch mode and debugging in your .vscode/mcp.json:
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
],
"dev": {
"watch": "src/**/*.py",
"debug": { "type": "python" }
}
}
}
}
The MCP server supports loading and saving Markdown documents from various file path formats:
/Users/username/documents/file.md./documents/file.md or documents/file.md~/Documents/file.md$HOME/documents/file.md"Load the document from ~/Documents/my-notes.md"
"Load the file at ./project-docs/README.md"
"Save this document to /Users/me/Desktop/backup.md"
"Get information about the current file"
"Test if the path ~/Documents/draft.md resolves correctly"
Once connected to Claude Desktop (or another MCP client), you can use natural language commands:
"Load the document from ~/Documents/my-project.md"
"Create a new section called 'Getting Started' with some basic instructions"
"Move the 'Installation' section to be the second section"
"Update the 'Features' section to include the new functionality"
"Delete the 'Deprecated' section"
"Save the document to ./backups/project-backup.md"
"Show me all the sections in this document"
"Get the current document as Markdown"
"Load /Users/me/Documents/important-notes.md"
"Load the file at ./project-docs/specification.md"
"Load ~/Desktop/meeting-notes.md"
"Test if the path $HOME/Documents/draft.md exists"
"Save to /tmp/quick-backup.md with backup enabled"
You can also use the server programmatically with FastMCP clients:
import asyncio
from fastmcp import Client
async def demo():
# Connect to the server (adjust command based on your installation)
# Option 1: If installed from PyPI
async with Client("python -m quantalogic_markdown_mcp.mcp_server") as client:
# ... rest of the code remains the same
# Option 2: If using development installation
# async with Client("src/quantalogic_markdown_mcp/mcp_server.py") as client:
# List available tools
tools = await client.list_tools()
print(f"Available tools: {[tool.name for tool in tools]}")
# Load a document from file
result = await client.call_tool("load_document", {
"file_path": "~/Documents/my-notes.md",
"validation_level": "NORMAL"
})
print(f"Load result: {result.content}")
# Get file information
file_info = await client.call_tool("get_file_info", {})
print(f"File info: {file_info.content}")
# Test path resolution
path_test = await client.call_tool("test_path_resolution", {
"path": "~/Documents/test.md"
})
print(f"Path resolution: {path_test.content}")
# Insert a new section
result = await client.call_tool("insert_section", {
"heading": "Introduction",
"content": "Welcome to our documentation!",
"position": 0
})
print(f"Insert result: {result.content}")
# List all sections
sections = await client.call_tool("list_sections", {})
print(f"Document sections: {sections.content}")
# Save the modified document
save_result = await client.call_tool("save_document", {
"file_path": "./modified-notes.md",
"backup": True
})
print(f"Save result: {save_result.content}")
# Run the demo
asyncio.run(demo())
load_document(file_path: str, validation_level: str = "NORMAL")Load a Markdown document from a file path with support for various path formats.
Parameters:
file_path: Path to the Markdown file (supports absolute, relative, ~, and $ENV expansion)validation_level: Validation strictness - "STRICT", "NORMAL", or "PERMISSIVE"Returns: Success status with file information and document statistics
Examples:
load_document("/Users/me/notes.md")load_document("./docs/README.md")load_document("~/Documents/project.md")save_document(file_path?: str, backup: bool = True)Save the current document to a file path.
Parameters:
file_path: Target path to save to (optional, uses current file if not provided)backup: Whether to create a .bak backup of existing filesReturns: Success status with save location information
get_file_info()Get detailed information about the currently loaded file.
Returns: File metadata including path, size, permissions, and timestamps
test_path_resolution(path: str)Test and validate path resolution for different path formats.
Parameters:
path: The path to test and resolveReturns: Detailed path resolution information including expansion details
insert_section(heading: str, content: str, position: int)Insert a new section at the specified position.
Parameters:
heading: The section heading textcontent: The section content (can include Markdown)position: Where to insert (0 = beginning, or after existing section)Returns: Success/failure status with section ID if successful
delete_section(section_id?: str, heading?: str)Delete a section by ID or heading.
Parameters:
section_id: Unique section identifier (optional)heading: Section heading text (optional)Note: Either section_id or heading must be provided.
update_section(section_id: str, content: str)Update the content of an existing section.
Parameters:
section_id: Unique section identifiercontent: New content for the sectionmove_section(section_id: str, new_position: int)Move a section to a new position in the document.
Parameters:
section_id: Unique section identifiernew_position: Target position (0-based)get_section(section_id: str)Retrieve detailed information about a specific section.
Returns: Section heading, content, position, level, and ID
list_sections()Get metadata for all sections in the document.
Returns: Array of section metadata (ID, heading, position, level, path)
get_document()Export the complete Markdown document.
Returns: Full document as Markdown text
undo()Undo the last operation performed on the document.
Returns: Success/failure status
The server supports several configuration options through environment variables:
# Validation level (STRICT, NORMAL, PERMISSIVE)
export MARKDOWN_VALIDATION_LEVEL=NORMAL
# Maximum transaction history size
export MAX_TRANSACTION_HISTORY=100
# Server name
export MCP_SERVER_NAME="SafeMarkdownEditor"
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src --cov-report=html
# Run specific test files
uv run pytest tests/test_mcp_server.py
# Format code
uv run black src tests
# Lint code
uv run ruff check src tests
# Type checking
uv run mypy src
For development, you can run the server with additional debugging:
# In dev-scripts/run_mcp_server.py
from quantalogic_markdown_mcp.mcp_server import server
if __name__ == "__main__":
# Initialize with debug document
server.initialize_document(
markdown_text="""# Sample Document
## Introduction
This is a sample document for testing.
## Features
- Feature 1
- Feature 2
## Conclusion
Thank you for reading!
""",
validation_level=ValidationLevel.NORMAL
)
print("Starting SafeMarkdownEditor MCP Server...")
print("Debug mode enabled with sample document")
server.run()
Server not appearing in Claude Desktop:
claude_desktop_config.json is absoluteuv is in your PATH (which uv on macOS/Linux, where uv on Windows)Server not appearing in VSCode:
.vscode/mcp.json file exists in workspace root (for workspace config)MCP: List Servers command to see if server is registereduv is in your PATH and accessible from VSCode's integrated terminalVSCode MCP server not starting:
Check the MCP server output: Right-click server → Show Output
For development setup: Ensure you're using the correct configuration:
{
"servers": {
"markdown-editor": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"--",
"python",
"-m",
"quantalogic_markdown_mcp.mcp_server"
],
"cwd": "${workspaceFolder}",
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
}
}
}
}
Verify the command path and arguments in your configuration
Test the command manually in a terminal from the correct working directory:
cd /path/to/quantalogic-markdown-edit-mcp
uv run python -c "import sys; sys.path.insert(0, 'src'); from quantalogic_markdown_mcp.mcp_server import mcp; print('MCP server ready')"
Ensure all required dependencies are installed: uv sync
Check file permissions on the server executable
For dev containers, verify the container has access to required tools
VSCode agent mode not showing MCP tools:
Tool execution errors:
list_sections firstPerformance issues:
Enable debug logging by setting:
export PYTHONPATH=$PWD/src
export MCP_DEBUG=1
python -m quantalogic_markdown_mcp.mcp_server
The server uses Python's logging module and writes to stderr to avoid interfering with MCP's stdio transport. To see debug logs:
# Run with debug logging
PYTHONPATH=$PWD/src python -m quantalogic_markdown_mcp.mcp_server 2>debug.log
The server is built on several key components:
Contributions are welcome! Please read our contributing guidelines:
# Clone and setup
git clone https://github.com/raphaelmansuy/quantalogic-markdown-edit-mcp.git
cd quantalogic-markdown-edit-mcp
# Install with development dependencies
uv sync --group dev
# Install pre-commit hooks
uv run pre-commit install
This project is licensed under the MIT License - see the LICENSE file for details.
Need help? Open an issue on GitHub or check the documentation.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for SafeMarkdownEditor MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/quantalogic-markdown-editor)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.