This MCP server enables conversation-driven code exploration by intelligently breaking files into logical chunks and providing search tools for LLMs to find specific code without using embeddings. It's designed to help you understand codebases through natural language interaction.
To get started with MCPunk, follow these steps:
Install uv first by following the official installation guide
Configure Claude Desktop:
claude_desktop_config.json
file with the following configuration:{
"mcpServers": {
"MCPunk": {
"command": "uvx",
"args": ["mcpunk"]
}
}
}
Note: If
"command": "uvx"
doesn't work, you may need to specify the full path, e.g.,"command": "/Users/yourusername/.local/bin/uvx"
Start a conversation by asking Claude to set up a project:
Claude will then:
configure_project
to index your codebase[User] Hey pal can you please set up the ~/git/mcpunk repo, then help me understand how a user of mcpunk would get the git diff of the currently checked out branch
[Claude] Call configure_project
[Claude] Call list_all_files_in_project
[Claude] Call find_files_by_chunk_content
...
[Claude] Now I understand how the git diff functionality works in mcpunk.
To get a git diff of the currently checked out branch:
1. First, configure mcpunk to work with your project
2. Use tools to see what branches were recently checked out
3. Then get the diff between the current branch (HEAD) and a reference branch
[User] Hey pal can you please set up the ~/git/mcpunk repo and have a look at the current branch versus `scratch/1.5`
[Claude] Sets up ~/git/mcpunk and calls `diff_with_ref` for ref `scratch/1.5`
[Claude] I see you've made several changes, primarily adding a new test file `tests/test_git_analysis.py`...
You can ask Claude to set up multiple projects, allowing it to query across different repositories. This is especially useful when working with codebases that depend on each other.
MCPunk can be configured via environment variables prefixed with MCPUNK_
. For example:
{
"mcpServers": {
"MCPunk": {
"command": "uvx",
"args": ["mcpunk"],
"env": {
"MCPUNK_INCLUDE_CHARS_IN_RESPONSE": "false"
}
}
}
}
For all available options, check the settings.py
file in the MCPunk repository.
MCPunk processes your codebase by:
Configuring a project: Points to a directory of files to analyze
Chunking files: Breaks files into logical segments based on their type:
Providing search tools: Allows Claude to:
This approach lets the LLM intelligently navigate through your codebase, discovering exactly what it needs to answer your questions.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "MCPunk" '{"command":"uvx","args":["mcpunk"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"MCPunk": {
"command": "uvx",
"args": [
"mcpunk"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"MCPunk": {
"command": "uvx",
"args": [
"mcpunk"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect