Local Go Context
An MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache.
What is Local Go Context?
Local Go Context is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that helps ai assistants work with golang third-party packages using your local go module cache.
An MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server that helps AI assistants work with GoLang thir
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-local-contextConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Local Go Context
MCP Local Context is a Go-based MCP server that helps AI assistants work accurately with third-party Go packages by grounding them in your local Go module cache rather than relying on potentially outdated training data. It provides tools for language detection, context instruction retrieval, and custom prompt discovery, preventing hallucinated API signatures when working with real project dependencies.
Prerequisites
- Go 1.18+ installed with a working GOPATH and module cache
- An MCP-compatible client such as Claude Desktop, Cursor, or GitHub Copilot
- Go modules initialized in your project (go.mod present)
- GOPATH/pkg/mod directory populated with cached dependencies
Install mcp-local-context
Install the server binary directly using go install. This places the binary in your Go bin directory.
go install github.com/svetlyi/mcp-local-context@latestVerify the installation
Confirm the binary is on your PATH and runs correctly.
which mcp-local-context
mcp-local-context --helpCreate the configuration file
Create the config directory and an optional config.json to set log level and custom prompt directories.
mkdir -p ~/.mcp-local-context
cat > ~/.mcp-local-context/config.json << 'EOF'
{
"log_level": "info",
"log_file": "~/.mcp-local-context/mcp.log",
"custom_prompt_dirs": []
}
EOFAdd to your MCP client configuration
Register the server in your Claude Desktop or Claude Code MCP configuration using the installed binary path.
{
"mcpServers": {
"mcp-local-context": {
"command": "/Users/yourname/go/bin/mcp-local-context"
}
}
}Add custom prompts (optional)
Place custom Markdown prompt files in ~/.mcp-local-context/prompts/ with YAML front matter to define language-specific context instructions available to the AI.
mkdir -p ~/.mcp-local-context/prompts
cat > ~/.mcp-local-context/prompts/my-go-rules.md << 'EOF'
---
title: My Go Project Rules
lang: go
---
Always check go.mod for the exact module version before suggesting API calls.
EOFLocal Go Context Examples
Client configuration
Example claude_desktop_config.json for mcp-local-context using the Go-installed binary.
{
"mcpServers": {
"mcp-local-context": {
"command": "/Users/yourname/go/bin/mcp-local-context"
}
}
}Prompts to try
Reference the built-in golang-context-rule prompt or ask the server to detect your language and fetch appropriate context instructions.
- "I'm working with the github.com/gin-gonic/gin package, use the /local_context/golang-context-rule prompt to guide your answers"
- "What version of the 'zap' logger package is in my go.mod and what's the correct API for creating a production logger?"
- "Using local context, find and show me the actual function signatures for the pgx/v5 connection pool"
- "Detect the language of my current project and get appropriate context instructions"Troubleshooting Local Go Context
Binary not found after go install
Ensure your Go bin directory is on your PATH. Add 'export PATH=$PATH:$(go env GOPATH)/bin' to your shell profile (~/.zshrc or ~/.bashrc) and reload it with 'source ~/.zshrc'.
Server cannot find Go module cache for a package
Run 'go mod download' in your project directory to ensure all dependencies are present in the local cache at $(go env GOMODCACHE). The server reads directly from this cache directory.
Custom prompts not appearing in the MCP client
Verify your .md files in ~/.mcp-local-context/prompts/ have valid YAML front matter with at minimum a 'title' key. Check the log file at the path configured in config.json for any parsing errors.
Frequently Asked Questions about Local Go Context
What is Local Go Context?
Local Go Context is a Model Context Protocol (MCP) server that mcp server that helps ai assistants work with golang third-party packages using your local go module cache. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Local Go Context?
Follow the installation instructions on the Local Go Context GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Local Go Context?
Local Go Context works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Local Go Context free to use?
Yes, Local Go Context is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Local Go Context Alternatives — Similar Developer Tools Servers
Looking for alternatives to Local Go Context? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Local Go Context in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Local Go Context?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.