Closes#24
i18n / Overriding descriptions
The descriptions of the tools can be overridden by creating a github-mcp-server.json file in the same directory as the binary.
The file should contain a JSON object with the tool names as keys and the new descriptions as values.
For example:
{"TOOL_ADD_ISSUE_COMMENT_DESCRIPTION":"an alternative description","TOOL_CREATE_BRANCH_DESCRIPTION":"Create a new branch in a GitHub repository"}
You can create an export of the current translations by running the binary with the--export-translations
flag.
This flag will preserve any translations/overrides you have made, while adding any new translations that have been added to the binary since the last time you exported.
./github-mcp-server --export-translationscat github-mcp-server.json
You can also use ENV vars to override the descriptions. The environment variable names are the same as the keys in the JSON file,
prefixed withGITHUB_MCP_
and all uppercase.
For example, to override theTOOL_ADD_ISSUE_COMMENT_DESCRIPTION
tool, you can set the following environment variable:
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
The JSON Dump
So far, I have drawn the line at descriptions, but parameters can easily be added, I just didn't want this PR to touch any more parts. This is the whole shebang:
{"RESOURCE_REPOSITORY_CONTENT_BRANCH_DESCRIPTION":"Repository Content for specific branch","RESOURCE_REPOSITORY_CONTENT_COMMIT_DESCRIPTION":"Repository Content for specific commit","RESOURCE_REPOSITORY_CONTENT_DESCRIPTION":"Repository Content","RESOURCE_REPOSITORY_CONTENT_PR_DESCRIPTION":"Repository Content for specific pull request","RESOURCE_REPOSITORY_CONTENT_TAG_DESCRIPTION":"Repository Content for specific tag","TOOL_ADD_ISSUE_COMMENT_DESCRIPTION":"Add a comment to an existing issue","TOOL_CREATE_BRANCH_DESCRIPTION":"Create a new branch in a GitHub repository","TOOL_CREATE_OR_UPDATE_FILE_DESCRIPTION":"Create or update a single file in a GitHub repository","TOOL_CREATE_REPOSITORY_DESCRIPTION":"Create a new GitHub repository in your account","TOOL_FORK_REPOSITORY_DESCRIPTION":"Fork a GitHub repository to your account or specified organization","TOOL_GET_CODE_SCANNING_ALERT_DESCRIPTION":"Get details of a specific code scanning alert in a GitHub repository.","TOOL_GET_FILE_CONTENTS_DESCRIPTION":"Get the contents of a file or directory from a GitHub repository","TOOL_GET_ISSUE_DESCRIPTION":"Get details of a specific issue in a GitHub repository.","TOOL_GET_ME_DESCRIPTION":"Get details of the authenticated GitHub user","TOOL_GET_PULL_REQUEST_COMMENTS_DESCRIPTION":"Get the review comments on a pull request","TOOL_GET_PULL_REQUEST_DESCRIPTION":"Get details of a specific pull request","TOOL_GET_PULL_REQUEST_FILES_DESCRIPTION":"Get the list of files changed in a pull request","TOOL_GET_PULL_REQUEST_REVIEWS_DESCRIPTION":"Get the reviews on a pull request","TOOL_GET_PULL_REQUEST_STATUS_DESCRIPTION":"Get the combined status of all status checks for a pull request","TOOL_LIST_CODE_SCANNING_ALERTS_DESCRIPTION":"List code scanning alerts in a GitHub repository.","TOOL_LIST_COMMITS_DESCRIPTION":"Get list of commits of a branch in a GitHub repository","TOOL_LIST_PULL_REQUESTS_DESCRIPTION":"List and filter repository pull requests","TOOL_MERGE_PULL_REQUEST_DESCRIPTION":"Merge a pull request","TOOL_SEARCH_CODE_DESCRIPTION":"Search for code across GitHub repositories","TOOL_SEARCH_ISSUES_DESCRIPTION":"Search for issues and pull requests across GitHub repositories","TOOL_SEARCH_REPOSITORIES_DESCRIPTION":"Search for GitHub repositories","TOOL_SEARCH_USERS_DESCRIPTION":"Search for GitHub users","TOOL_UPDATE_PULL_REQUEST_BRANCH_DESCRIPTION":"Update a pull request branch with the latest changes from the base branch"}
Live exampletools/list
An example running with a file, and an env var:
{"jsonrpc":"2.0","id":3,"result": {"tools": [ {"description":"an alternative description","inputSchema": {"type":"object","properties": {"body": {"description":"Comment text","type":"string" },"issue_number": {"description":"Issue number to comment on","type":"number" },"owner": {"description":"Repository owner","type":"string" },"repo": {"description":"Repository name","type":"string" } },"required": ["owner","repo","issue_number","body" ] },"name":"add_issue_comment" }, {"description":"OVERRIDE DESCRIPTION","inputSchema": {"type":"object","properties": {"branch": {"description":"Name for new branch","type":"string" },"from_branch": {"description":"Source branch (defaults to repo default)","type":"string" },"owner": {"description":"Repository owner","type":"string" },"repo": {"description":"Repository name","type":"string" } },"required": ["owner","repo","branch" ] },"name":"create_branch" },... ] }}
Uh oh!
There was an error while loading.Please reload this page.
Closes#24
i18n / Overriding descriptions
The descriptions of the tools can be overridden by creating a github-mcp-server.json file in the same directory as the binary.
The file should contain a JSON object with the tool names as keys and the new descriptions as values.
For example:
You can create an export of the current translations by running the binary with the
--export-translations
flag.This flag will preserve any translations/overrides you have made, while adding any new translations that have been added to the binary since the last time you exported.
You can also use ENV vars to override the descriptions. The environment variable names are the same as the keys in the JSON file,
prefixed with
GITHUB_MCP_
and all uppercase.For example, to override the
TOOL_ADD_ISSUE_COMMENT_DESCRIPTION
tool, you can set the following environment variable:The JSON Dump
So far, I have drawn the line at descriptions, but parameters can easily be added, I just didn't want this PR to touch any more parts. This is the whole shebang:
Live example
tools/list
An example running with a file, and an env var: