A lightweight MCP server in Go that gives Claude eyes into your codebase.
Point it at any project folder. Ask Claude anything. It finds the answers itself.
gopher-context is a Model Context Protocol server written in Go.
You run it once, point it at your project folder, and Claude Desktop connects to it. From that point, Claude can navigate your entire codebase — reading files, understanding structure, answering questions — without you pasting a single line of code.
It speaks MCP over SSE (Server-Sent Events), so it works both locally and hosted on a server. If you host it, your whole team shares the same Claude-powered codebase assistant. Everyone just adds one URL to their config.
| Tool | Description |
|---|---|
list_files |
Returns the full directory tree of your project. Claude calls this first to understand what exists. |
read_file |
Reads any file by path. Claude picks the relevant ones based on your question. |
get_time |
Returns the current server time. |
add_numbers |
Adds two numbers. Useful as a hello-world sanity check. |
git clone https://github.com/yourusername/gopher-context.git
cd gopher-contextgo mod tidyThe server uses the CODEBASE_PATH environment variable. If not set, it defaults to the current directory.
To point it at a specific project, set the environment variable before running:
Linux/Mac:
export CODEBASE_PATH=/path/to/your-project
go run main.goWindows (PowerShell):
$env:CODEBASE_PATH = "C:\path\to\your-project"
go run main.goWindows (CMD):
set CODEBASE_PATH=C:\path\to\your-project
go run main.gogo run main.goYou should see:
MCP server running on http://localhost:8080
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"gopher-context": {
"url": "http://localhost:8080/sse"
}
}
}Restart Claude Desktop. Done.
If you want your whole team to share the same server, deploy it to any cloud provider (Railway, Render, a VPS — anything that can run a Go binary). The codebase folder goes with it.
Each teammate just adds your public URL to their config:
{
"mcpServers": {
"gopher-context": {
"url": "https://your-server.com/sse"
}
}
---gopher-context/
├── main.go ← entire server, one file
├── go.mod
├── go.sum
└── assets/
├── logo.png ← project logo
└── sequence-diagram.png ← architecture flow diagram
- Go — fast, simple, great for networked services
- mcp-go — community Go SDK for the Model Context Protocol
- MCP SSE transport — standard protocol for AI tool connections
MIT — do whatever you want with it.
