Skip to main content
Glama

gh-mcp

github_code_search

Search GitHub repositories for specific code snippets using exact matches. Find files containing particular code patterns across projects to analyze implementations or locate examples.

Instructions

Search files on GitHub with code snippets.

Normally you should try different queries and combinations of filters until you get useful results. If you are searching for something generic, try thinking in reverse about what the code might be, and search for that code snippet instead.

Input Schema

NameRequiredDescriptionDefault
code_snippetYesNot a fuzzy search. Grep exact code snippet you want to find. Modifiers or wildcards not supported.
extensionNo
filenameNo
ownerNo
repoNoFormat: owner/repo
languageNo
match_typeNocontent

Input Schema (JSON Schema)

{ "properties": { "code_snippet": { "description": "Not a fuzzy search. Grep exact code snippet you want to find. Modifiers or wildcards not supported.", "type": "string" }, "extension": { "type": "string" }, "filename": { "type": "string" }, "language": { "type": "string" }, "match_type": { "default": "content", "enum": [ "content", "path" ], "type": "string" }, "owner": { "items": { "type": "string" }, "type": "array" }, "repo": { "description": "Format: owner/repo", "items": { "type": "string" }, "type": "array" } }, "required": [ "code_snippet" ], "type": "object" }

Other Tools from gh-mcp

Related Tools

    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/CNSeniorious000/gh-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server