mcp-server-grf
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-grfadd the lodash repository to my project references"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-grf
MCP server for managing Git reference repositories - add, load, and sync reference code from any Git repository.
Overview
mcp-server-grf (Git Reference) is a Model Context Protocol (MCP) server that enables AI assistants to manage Git reference repositories. It allows you to:
Add any Git repository as a reference code source
Load reference code into your current project
Sync loaded reference code to the latest version
Manage globally cached repositories
Primary Use Case
When an AI assistant needs to reference code implementations from open-source projects, this tool enables quick loading of reference code into the current working directory for the AI to read and learn from.
Related MCP server: GitPilot MCP
Features
Smart URL Parsing - Supports both HTTPS and SSH Git URL formats
Flexible Repository Matching - Match by full name,
owner/repo, or just repo nameShallow Clone Optimization - Uses shallow clones by default to save disk space and download time
Automatic .gitignore Management - Automatically adds loaded reference code to
.gitignoreSubdirectory Loading - Load only specific subdirectories from a repository
Multi-Workspace Support - Independently manage loading state across different projects
Sync Status Tracking - Track commit ID changes and support incremental sync
Installation
Using npx (Recommended)
No installation required - run directly with npx:
npx mcp-server-grfGlobal Installation
npm install -g mcp-server-grfThen run:
mcp-server-grfConfiguration
Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"grf": {
"command": "npx",
"args": ["-y", "mcp-server-grf"]
}
}
}Other MCP Clients
For other MCP-compatible clients, configure the server command as:
npx -y mcp-server-grfTools Reference
Repository Management
grf_add
Add a reference repository to the global cache.
Parameter | Type | Required | Default | Description |
| string | Yes | - | Git repository URL (HTTPS or SSH format) |
| string | No | - | Custom repository name |
| string | No | - | Specify branch |
| boolean | No |
| Use shallow clone |
| number | No |
| Shallow clone depth |
grf_list
List all cached repositories.
No parameters required.
grf_get
Get detailed information about a repository.
Parameter | Type | Required | Description |
| string | Yes | Repository name (supports full name or short name) |
grf_update
Update cached repositories.
Parameter | Type | Required | Default | Description |
| string | No | - | Repository name (updates all if not specified) |
| boolean | No |
| Only check for updates, don't pull |
grf_clean
Clean cached repositories.
Parameter | Type | Required | Default | Description |
| string | No | - | Repository name to delete |
| boolean | No |
| Delete all cached repositories |
grf_switch_branch
Switch repository branch.
Parameter | Type | Required | Description |
| string | Yes | Repository name |
| string | Yes | Target branch |
Loading/Unloading
grf_load
Copy reference repository to the current directory.
Parameter | Type | Required | Default | Description |
| string | Yes | - | Repository name, short name, or Git URL |
| string | No |
| Target path |
| string | No | - | Only copy specified subdirectory |
| boolean | No |
| Update .gitignore |
| string | No | - | Specify branch (only for Git URL) |
| string | No | Current directory | Working directory |
grf_unload
Remove reference code from the project.
Parameter | Type | Required | Default | Description |
| string | No | - | Repository name |
| boolean | No |
| Remove all reference code |
| string | No | Current directory | Working directory |
grf_loaded
List loaded reference code.
Parameter | Type | Required | Default | Description |
| string | No | Current directory | Working directory (returns all if not specified) |
| boolean | No |
| Return loading entries for all working directories |
Synchronization
grf_sync
Sync loaded reference code to the latest version.
Parameter | Type | Required | Default | Description |
| string | No | - | Entry ID (specify entry to sync) |
| boolean | No |
| Sync all entries |
| boolean | No |
| Force sync (ignore version check) |
| string | No | Current directory | Working directory |
grf_sync_status
Get sync status of loaded reference code.
Parameter | Type | Required | Default | Description |
| string | No | Current directory | Working directory |
Configuration
grf_config
Manage global configuration.
Parameter | Type | Required | Description |
| string | Yes | Operation type: |
| string | No | Configuration key (required for get/set) |
| string/number/boolean | No | Configuration value (required for set) |
Usage Examples
Basic Workflow
Add a reference repository:
grf_add url="https://github.com/expressjs/express"Load reference code into your project:
grf_load name="express"Check loaded references:
grf_loadedSync to latest version:
grf_sync all=trueRemove reference code when done:
grf_unload name="express"
Load Specific Subdirectory
Load only the lib directory from a repository:
grf_load name="express" subdir="lib"Quick Load from URL
Load directly from a Git URL without pre-adding:
grf_load name="https://github.com/lodash/lodash" subdir="src"Check for Updates
Check if updates are available without pulling:
grf_update checkOnly=trueConfiguration Options
Key | Type | Default | Description |
| string |
| Default branch name |
| boolean |
| Use shallow clone |
| number |
| Shallow clone depth |
View/Modify Configuration
# List all configuration
grf_config action="list"
# Get specific configuration
grf_config action="get" key="shallowClone"
# Set configuration
grf_config action="set" key="shallowDepth" value=5Data Storage
Global Storage
~/.gitreference/
├── config.json # Global configuration
├── repos-index.json # Repository index
├── loading-state.json # Loading state records
└── repos/ # Cached repositoriesProject Local Storage
<project>/
├── .gitreference/ # Default loading directory
└── .gitignore # Automatically adds .gitreference/ entryRequirements
Node.js >= 18.0.0
Git installed and available in PATH
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/haiyewei/mcp-server-grf'
If you have feedback or need assistance with the MCP directory API, please join our Discord server