About Local Context
Local Context is an MCP server published by svetlyi in the Developer Tools category: an MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache. It has been installed 0 times through Conduid.
The repository has 10 stars and 1 forks, with the last commit 7 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx mcp-local-contextThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Local Context
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
mcp-local-context
What is it and why use this?
An MCP server that helps AI assistants work with GoLang third-party packages using your local Go module cache. Think of it as a free, local alternative to Context7.
- Free and unlimited - uses your existing GoLang cache, no API limits or costs
- Works with any module - supports public and private modules already in your cache
- Universal compatibility - works with all AI tools (Cursor, Claude, GitHub Copilot, etc.)
- Customizable - add your own prompts and instructions for AI agents
Quick Start
# Install
go install github.com/svetlyi/mcp-local-context@latest
# Find binary path
echo $(go env GOPATH)/bin/mcp-local-context
Add to your IDE (e.g., Cursor): Settings → MCP Servers → Add:
{
"mcpServers": {
"local-context": {
"command": "/path-to-the-binary/bin/mcp-local-context"
}
}
}
The server communicates via stdio (standard input/output).
Features
- Built-in & Custom Prompts: Built-in Go context prompt with automatic discovery of custom prompt files from
~/.mcp-local-context/prompts/*.md - Configurable & Extensible: JSON configuration file and easily add new prompt providers (e.g., JavaScript, Python)
Configuration (optional)
Create ~/.mcp-local-context/config.json (optional):
{
"log_level": "info",
"log_file": "~/mcp-local-context.log",
"custom_prompt_dirs": ["~/custom-prompts", "/path/to/other/prompts"]
}
Options:
log_level:debug,info,warn,error(default:info)log_file: Path to log file (supports~/expansion). Default: OS temp filecustom_prompt_dirs: Additional directories for custom prompts. The~/.mcp-local-context/prompts/directory is always included
Custom Prompts
Place Markdown files in ~/.mcp-local-context/prompts/. Each .md file is automatically discovered and loaded.
Prompt Configuration
You can configure prompts using key-value pairs at the start of the file. The configuration section ends with a blank line.
Supported configuration keys:
title: Custom title/description for the promptlang: Language identifier (e.g.,go,javascript,python)
Example with configuration: ~/.mcp-local-context/prompts/my-custom-prompt.md
title: My Custom Prompt Title
lang: go
# My Custom Prompt
This is my custom prompt that will be provided to AI assistants.
Example without configuration: ~/.mcp-local-context/prompts/simple-prompt.md
A description of my custom prompt.
# My Custom Prompt
This is my custom prompt that will be provided to AI assistants.
Note: If
titleis not specified, the first line is used as the prompt description. If the first line is a markdown heading (#), the heading markers are automatically removed.
The prompt will be available as a prompt named my-custom-prompt (derived from the filename) with the configured title or extracted description.
Usage
How to use
You can use the MCP in two ways:
Method 1: Directly reference a specific prompt
Manually invoke a specific prompt by name. This gives you precise control over which instructions are used.
For example, in Cursor, you can write:
Create something in Go, use the /local_context/golang-context-rule prompt
Method 2: Ask the AI to use the MCP tools
Ask the AI to use the MCP's automatic language detection tools. The AI will call list_supported_languages and then get_context_instructions with the appropriate language, which automatically provides the right context instructions.
For example:
Create something in Go, use the local-context MCP to get context instructions for Go
or more generally:
When working with third-party packages, use the local-context MCP to get the appropriate context instructions
Available Prompts
golang-context-rule
Systematic approach for working with third-party Go packages using the Go module cache. Guides AI assistants to:
- Identify the exact module version from
go.mod - Locate the Go module cache
- Explore the package structure
- Use
go docfor documentation - Read source code directly
Future work
- Module indexing: Index existing modules to find appropriate functionality more efficiently based on the task
- More languages: Add support for other languages, such as JavaScript, etc.
License
MIT License - see LICENSE file for details.
Contributing
🤝 Contributions are welcome! Please feel free to submit a Pull Request.
Related
README mirrored from the source repository 22 hours ago. The original is authoritative.