Local Go Context

v1.0.0Developer Toolsstable

An MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache.

mcp-servermcp-tools
Share:
11
Stars
0
Downloads
0
Weekly
0/5

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

Access Go module dependencies from local cache.
Assist with Go package integration and import resolution.
svetlyi

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedApr 29, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-local-context

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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@latest
2

Verify the installation

Confirm the binary is on your PATH and runs correctly.

which mcp-local-context
mcp-local-context --help
3

Create 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": []
}
EOF
4

Add 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"
    }
  }
}
5

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.
EOF

Local 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-local-context": { "command": "npx", "args": ["-y", "mcp-local-context"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides