AgentSkillsCN

add-gitmcp

在项目的 MCP 配置文件(.cursor/mcp.json)中,为 GitHub 仓库添加 GitMCP URL。

SKILL.md
--- frontmatter
name: add-gitmcp
description: Adds a GitMCP URL for a GitHub repository to the project's MCP configuration (.cursor/mcp.json).

Add GitMCP

You are a helper that adds GitMCP documentation URLs to the project's MCP configuration.

What is GitMCP?

GitMCP is a service that turns any public GitHub repository into an MCP-compatible documentation server. It works on-the-fly — no registration needed. URLs are deterministic.

URL Format:

code
https://gitmcp.io/{owner}/{repo}

Input Parameters

ParameterRequiredDescription
repoYesGitHub repo URL, owner/repo format, or just repo name

Accepted input formats:

  • Full URL: https://github.com/owner/repo
  • Full URL with .git: https://github.com/owner/repo.git
  • SSH URL: git@github.com:owner/repo.git
  • Short format: owner/repo
  • Just repo name: repo (will search or ask for owner)

Example invocations:

Workflow (Fast Path)

IMPORTANT: Do NOT make network calls to validate repos. GitMCP URLs are deterministic and work for any public repo. Skip validation to avoid timeouts.

Step 1: Parse Repository Input

Extract owner and repo name from the input. This is string parsing only — no network calls.

If user provides owner/repo: Use directly. If user provides just repo:

  • Check the Quick Reference table below for known repos
  • If not found, ask user for the owner

Step 2: Construct GitMCP URL

code
GITMCP_URL = "https://gitmcp.io/{owner}/{repo}"

Step 3: Add to Project MCP Configuration

Always use project-level config: .cursor/mcp.json

Never use user-level config (~/.cursor/mcp.json)

Read the existing .cursor/mcp.json (if exists), add the new entry:

json
{
  "mcpServers": {
    "{repo}-docs": {
      "url": "https://gitmcp.io/{owner}/{repo}"
    }
  }
}

If file exists: Merge the new server into existing mcpServers If file doesn't exist: Create it with proper structure

Step 4: Report Result

code
✅ GitMCP Added
Repository: {owner}/{repo}
GitMCP URL: https://gitmcp.io/{owner}/{repo}
Config: .cursor/mcp.json
Server name: {repo}-docs

Restart Cursor to load the new MCP server.

Server Naming Convention

  • Pattern: {repo}-docs
  • Examples: vulnhuntr-docs, libbpf-docs, sigma-docs
  • If name exists, use {owner}-{repo}-docs

Quick Reference: Known Repos

Use this table to quickly resolve repo names without network lookups:

Repo NameOwnerFull Path
vulnhuntrprotectaiprotectai/vulnhuntr
sigmaSigmaHQSigmaHQ/sigma
pySigmaSigmaHQSigmaHQ/pySigma
libbpflibbpflibbpf/libbpf
bcciovisoriovisor/bcc
bpftoollibbpflibbpf/bpftool
ciliumciliumcilium/cilium
falcofalcosecurityfalcosecurity/falco
ebpfciliumcilium/ebpf
traceeaquasecurityaquasecurity/tracee

Error Handling

ScenarioAction
Cannot parse inputAsk user for owner/repo format
Unknown repo nameAsk user for the owner
Config file malformedReport JSON error, don't modify
Server name existsUse {owner}-{repo}-docs instead

Notes

  1. No validation needed — GitMCP URLs work for any public repo without verification
  2. Project-level only — Always use .cursor/mcp.json, never user-level
  3. Fast execution — No network calls during skill execution
  4. Restart required — User must restart Cursor after adding