github-mcp-demo
Provides tools for searching repositories, retrieving repository details, listing issues, and reading README files from GitHub via the REST API.
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., "@github-mcp-demoShow me the README for axios/axios"
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.
github-mcp-demo
A small, working MCP (Model Context Protocol) server that wraps the GitHub REST API as four tools an AI agent can call directly: search repositories, get repository details, list issues, and read a README.
This exists for two reasons:
Portfolio proof — a real, tested MCP server you can point to (GitHub pin, Fiverr/Contra gig samples, Upwork portfolio) that shows exactly what the $99 "custom MCP server" gig delivers.
Reusable boilerplate — the fastest way to deliver a paid job is to copy this folder and swap the API-specific pieces (see "Adapting this for a client" below), not start from a blank file each time.
What it does
Tool | What it calls | What it returns |
|
| Top matching repos: name, stars, description, URL |
|
| Stars, forks, open issues, license, topics |
|
| Open/closed issues, most recently updated first |
|
| Decoded README text (truncated to 6000 chars) |
Related MCP server: @cloud9-labs/mcp-github
Setup
npm install
npm run buildThis produces dist/index.js, a standard stdio-based MCP server.
Optional: raise the rate limit
Without a token, GitHub allows 60 unauthenticated API requests/hour per IP, shared across anything else on that network — you'll hit this fast in testing. Set a token for real use:
export GITHUB_TOKEN=ghp_yourPersonalAccessTokenA read-only, no-scopes personal access token is enough for public repos.
Connect to Claude Desktop
Add this to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"github-demo": {
"command": "node",
"args": ["/absolute/path/to/github-mcp-demo/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_yourPersonalAccessToken"
}
}
}
}Restart Claude Desktop, then try asking it things like:
"Search GitHub for popular MCP servers written in TypeScript"
"What are the open issues on modelcontextprotocol/typescript-sdk?"
"Show me the README for anthropics/anthropic-sdk-python"
Adapting this for a client (the actual delivery workflow)
This is the part that makes a $99, 48-hour turnaround realistic:
Copy this whole folder, rename it.
In
src/index.ts, replaceGITHUB_API_BASEand the auth header logic ingithubRequest()with the client's API base URL and auth scheme (API key header, Bearer token, Basic auth — same shape, different values).Replace the four
registerTool(...)blocks with tools matching their API's endpoints. Keep the same pattern: a ZodinputSchemafor arguments, a fetch call, a small object shaping the response,textResult(...).npm run build, run it through the same test pattern (spin up an MCP client over stdio, call each tool once, check the output).Deliver
dist/index.js+ a short README with their own Claude Desktop config snippet filled in.
Steps 2–3 are the only genuinely custom work per client — everything else (project scaffold, error handling, stdio wiring, response shaping pattern) is already done.
Notes
Errors from the upstream API (rate limits, 404s, bad auth) are caught and returned as a readable message rather than crashing the server — this matters more than it sounds like once a client is testing it themselves.
get_readmetruncates long files to ~6000 characters so a huge README doesn't eat the calling model's whole context window on one tool call.
Available Tools
4 toolsget_readmeGet repository READMEB
Fetch and decode the README file contents for a repository.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| owner | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior. It mentions 'decode' but does not explain what decoding means, whether authentication is required, what errors occur if the README is absent, or what the output structure looks like. This leaves significant uncertainty for a tool that performs an action beyond a simple fetch.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no redundant words. It efficiently states the action and target, making it a model of conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The basic action is clear, but given no output schema or annotations, the description should provide more detail about return format, error cases, and any side effects. It is adequate for a simple tool but leaves gaps that could confuse an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not mention owner or repo at all. Parameter meaning is left entirely to the property names, which is insufficient compensation for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses the specific verb 'fetch and decode' and names the resource 'README file contents for a repository', clearly distinguishing it from siblings like search_repositories or list_issues.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternatives are mentioned, but the tool's purpose is clear enough that an agent can infer it should be used when README contents are needed. Lacks exclusions or guidance about when other repository tools might be preferable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repositoryGet repository detailsA
Fetch metadata for a single GitHub repository: description, stars, forks, open issues, license, topics.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name, e.g. 'anthropic-sdk-python' | |
| owner | Yes | Repository owner, e.g. 'anthropics' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that this is a fetch/read operation and lists the metadata returned, which is helpful. However, it does not mention potential error cases (e.g., 404), authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently communicates the purpose and key output fields. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two well-described parameters and no output schema, the description is mostly complete. It lists the returned metadata fields, giving the agent a clear idea of the result. However, it could briefly mention error handling or authentication requirements for full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description does not add extra meaning to the owner and repo parameters beyond what the schema already provides; it only lists the metadata fields returned, which is not directly parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches metadata for a single GitHub repository and lists the specific fields (description, stars, forks, etc.). This specific verb-resource combination distinguishes it from sibling tools like search_repositories and list_issues.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for when you have a known repo and need metadata, but it does not explicitly state when to use this tool versus alternatives such as search_repositories or get_readme. Sibling tool names provide context, but no direct guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_issuesList repository issuesA
List open (or closed) issues for a repository, most recently updated first.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| limit | No | ||
| owner | Yes | ||
| state | No | open |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the burden. It discloses sort order ('most recently updated first') and state filtering ('open or closed'), but omits default state, limit behavior, and pagination details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one concise, front-loaded sentence. It communicates the essential purpose and ordering without redundant words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, yet the description omits default state (open), the limit constraint, and return structure. For an autonomous agent, this leaves important gaps in understanding what the tool returns and how defaults work.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds minimal context for the 'state' parameter but does not explain owner, repo, or limit semantics. The default and constraints are only in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists issues for a repository, with a specific verb and resource. It distinguishes from sibling tools (search_repositories, get_repository, get_readme) which focus on different entities.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the usage context ('for a repository') but does not explicitly state when to prefer this tool over alternatives or provide exclusions. It is clear enough for issues but lacks explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_repositoriesSearch GitHub repositoriesA
Search public GitHub repositories by keyword. Returns name, owner, stars, description, and URL for the top matches.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results to return (1-20) | |
| query | Yes | Search keywords, e.g. 'mcp server typescript' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavior. It states that only public repositories are searched and results are 'top matches', implying ranking. However, it does not detail ordering criteria, pagination, or specify that it is read-only, though 'search' implicitly indicates a non-mutating operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the action ('Search public GitHub repositories by keyword') and directly lists the return fields. Every word adds value, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (2 parameters, no output schema, no annotations), the description covers the primary use case, scope, and return fields. It does not specify sorting or result count, but these are inferable from 'top matches' and the 'limit' parameter. It is sufficient for an agent to correctly select and invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents both 'query' and 'limit'. The description adds minimal extra meaning beyond tying 'query' to 'keyword' and implying the limit affects 'top matches', but this is redundant with the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'search' with a specific resource ('public GitHub repositories') and a scope ('by keyword'), and lists the output fields. It distinguishes itself from sibling tools like 'get_repository' (specific repo) and 'list_issues' by focusing on search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for use: searching public repositories by keyword. It does not explicitly mention alternatives or exclusions, but the phrase 'public GitHub repositories' implies it is for finding repositories, not for other operations like issues or readmes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
get_readme - First observed
get_repository - First observed
list_issues - First observed
search_repositories
TDQS
Each tool clearly targets a distinct operation: searching repositories, fetching one repository's metadata, listing issues, and retrieving a README. There is no functional overlap or ambiguity.
All four tool names follow the same verb_noun pattern (search_repositories, get_repository, list_issues, get_readme), making the API surface predictable and easy to navigate.
Four tools is within the ideal 3–15 range and feels well-scoped for a read-only GitHub demo. Each tool serves a clear purpose without redundancy.
The set covers the main read operations for exploring repositories and issues, but lacks some common GitHub surface like commits, pull requests, or user info. For a demo, these are minor gaps that agents can work around.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Search GitHub, npm, PyPI, StackOverflow, ArXiv from one MCP — built for coding agents.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- AlicenseBqualityDmaintenanceMCP (Model Context Protocol) server for GitHub API integration. This server provides comprehensive tools for interacting with GitHub repositories, issues, pull requests, branches, and code search through a unified interface.1514MIT
- FlicenseAqualityCmaintenanceMCP server for AI agents to securely access GitHub data, including listing repositories and user profile info via the GitHub API.2-
- FlicenseCqualityCmaintenanceMCP server that enables LLMs to search GitHub, clone repositories, and perform read-only git/GitHub operations such as listing branches, commits, issues, and pull requests.25-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/mirajmahmudul/github-mcp-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server