Status: Under development.
Symbol-level code editing MCP server. Browse, read, edit, add, and delete code symbols (functions, classes, variables) using tree-sitter parsing instead of text-based string matching.
Claude Code and other agentic coding tools use text-based editing where you must provide exact text to replace, including all whitespace and indentation. This is fragile, and inefficient. MCP Symbol Edit operates on parsed symbols instead, making edits more reliable and context-efficient.
Ensure you have uv installed.
uv --versionInstall uv if you haven't already.
-
Linux
curl -LsSf https://astral.sh/uv/install.sh | sh -
macOS
brew install uv
-
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Add to your mcp_config.json:
{
"mcpServers": {
"symbol-edit": {
"command": "uvx",
"args": ["mcp-symbol-edit"]
}
}
}-
browse_symbols
- List all top-level symbols in a file
- Inputs:
file_path(string): Path to source fileregex(string, optional): Filter symbols by regex patternsubstring(string, optional): Filter symbols by substring match
- Returns formatted string listing symbol signatures:
def calculate_total(items: list) -> float class UserManager(BaseManager) class Product def validate_email(email: str) -> bool API_VERSION = "2.1.0" MAX_RETRIES = 3 -
read_symbols
- Read full code for one or more symbols
- Inputs:
file_path(string): Path to source filesymbol_names(string): Comma-separated symbol names (e.g., "calculate_total,validate_email")
- Returns code for each symbol separated by blank lines:
def calculate_total(items: list) -> float: return sum(item.price for item in items) def validate_email(email: str) -> bool: return "@" in email and "." in email
-
edit_symbol
- Replace a symbol's implementation
- Inputs:
file_path(string): Path to source filesymbol_name(string): Name of symbol to editupdated_code(string): New code to replace with
- Returns:
OKorERROR: Symbol 'foo' not found
-
add_symbol
- Add a new symbol to the file
- Inputs:
file_path(string): Path to source filecode(string): Code to insertposition(string): Where to insert - "before", "after", "top", "bottom"symbol(string, optional): Required for "before" and "after" positions
- Returns:
OKorERROR: Symbol 'foo' not found
-
delete_symbol
- Remove a symbol from the file
- Inputs:
file_path(string): Path to source filesymbol_name(string): Name of symbol to delete
- Returns:
OKorERROR: Symbol 'foo' not found
Show me all functions in app.py that contain "user" in the name.
Read the calculate_total and validate_email functions from app.py.
Update the calculate_total function in app.py to use a more efficient implementation:
def calculate_total(items: list) -> float:
return sum(item.price * item.quantity for item in items)
Add this new function after calculate_total in app.py:
def calculate_discount(total: float, percent: float) -> float:
return total * (1 - percent / 100)
Delete the deprecated_method function from app.py.
Currently supports Python. Additional language support (JavaScript, TypeScript, Go, Rust, etc.) planned.
Clone the repository and install dependencies:
git clone git@github.com:username/mcp-symbol-edit.git
cd mcp-symbol-edit
uv syncThen set this in mcp_config.json:
{
"mcpServers": {
"symbol-edit": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-symbol-edit", "-m", "mcp_symbol_edit.server"]
}
}
}Contributions welcome. Open issues for bugs or feature requests. Submit pull requests for improvements.
Copyright (c) 2025 Rune Kaagaard. All rights reserved.
Permission is granted to use and fork this software. Publishing modified versions (including to PyPI or other package repositories) is prohibited without explicit permission.