An agent with access to an authenticated GitHub CLI often needs only one command. An MCP server becomes relevant when clients need an operation catalog with input schemas or a remotely managed connection. Compare three ways to read the same pull request. GitHub CLI · GitHub MCP Server
Read a pull request’s state and current commit
| Route | Operation | Connection and result |
|---|---|---|
| CLI | gh pr view 42 --repo OWNER/REPO --json state,headRefOid | gh uses its own authentication and returns JSON with the two requested fields. |
| HTTP API | GET /repos/OWNER/REPO/pulls/42 | An HTTP client calls the GitHub REST API. state holds the state and head.sha the commit hash. Private repositories require access. |
| MCP | pull_request_read with method: get, owner, repo and pullNumber: 42 | The agent invokes the connected GitHub MCP Server. The server reads data from GitHub using its configured authentication. |
These examples come from documentation. Field names and state representations vary by route. For example, GitHub CLI can report MERGED as a state, while the REST response carries a separate merged field. A check that uses both paths needs to normalize the responses first. gh pr view fields · GitHub REST API · pull_request_read implementation
What a Skill contributes
A SKILL.md can describe which command or endpoint to use, which fields to read and what to report to the user. For a CLI or direct HTTP request, the agent already needs an execution tool, network access and suitable authorization. If your application uses function calling, it can expose its own function and argument schema to the model and execute the function in application code. A tool is an operation the model can invoke. MCP standardizes how a client discovers and invokes server operations. Function calling in the OpenAI API · MCP architecture
Choose for your environment
In a Reddit discussion about GitHub, the author asks whether a short Skill with gh would consume less context. The answer depends on the configuration. Cost depends on the tool descriptions the client sends to the model and the amount of data returned. In this example, gh selects two fields at the source. GitHub MCP lets you select tools and enable read-only mode. In both cases, repository access depends on the credentials in use. GitHub MCP or CLI discussion · GitHub MCP Server configuration
For one terminal query, check whether gh is already available and whether its JSON covers the task. For several clients that need to discover the same operations, evaluate MCP against the actual tool catalog and authentication requirements. If you control the application and it needs only one narrow endpoint, a direct HTTP call can be the shortest path.