Skip to content

github-mcp-server --export-translation does not work #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tjamet opened this issue May 2, 2025 · 1 comment
Open

github-mcp-server --export-translation does not work #367

tjamet opened this issue May 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@tjamet
Copy link

tjamet commented May 2, 2025

Describe the bug

Trying to run multiple instances (for github.com and some ghe), I was following the documentation:

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-translations
cat github-mcp-server-config.json

Running it, errors and does not generate the relevant translation file.

go run github.com/github/github-mcp-server/cmd/github-mcp-server@v0.2.1 --export-translations
A GitHub MCP server that handles various tools and resources.

Usage:
  server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  stdio       Start stdio server

Flags:
      --dynamic-toolsets         Enable dynamic toolsets
      --enable-command-logging   When enabled, the server will log all command requests and responses to the log file
      --export-translations      Save translations to a JSON file
      --gh-host string           Specify the GitHub hostname (for GitHub Enterprise etc.)
  -h, --help                     help for server
      --log-file string          Path to log file
      --read-only                Restrict the server to read-only operations
      --toolsets strings         An optional comma separated list of groups of tools to allow, defaults to enabling all (default [all])
  -v, --version                  version for server

Use "server [command] --help" for more information about a command.
docker run --rm ghcr.io/github/github-mcp-server:v0.2.1 /server/github-mcp-server --export-translations 
A GitHub MCP server that handles various tools and resources.

Usage:
  server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  stdio       Start stdio server

Flags:
      --dynamic-toolsets         Enable dynamic toolsets
      --enable-command-logging   When enabled, the server will log all command requests and responses to the log file
      --export-translations      Save translations to a JSON file
      --gh-host string           Specify the GitHub hostname (for GitHub Enterprise etc.)
  -h, --help                     help for server
      --log-file string          Path to log file
      --read-only                Restrict the server to read-only operations
      --toolsets strings         An optional comma separated list of groups of tools to allow, defaults to enabling all (default [all])
  -v, --version                  version for server

Use "server [command] --help" for more information about a command.

Affected version

v0.2.1

The problem also appears in main

go run github.com/github/github-mcp-server/cmd/github-mcp-server@main --export-translations
A GitHub MCP server that handles various tools and resources.

Usage:
  server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  stdio       Start stdio server

Flags:
      --dynamic-toolsets         Enable dynamic toolsets
      --enable-command-logging   When enabled, the server will log all command requests and responses to the log file
      --export-translations      Save translations to a JSON file
      --gh-host string           Specify the GitHub hostname (for GitHub Enterprise etc.)
  -h, --help                     help for server
      --log-file string          Path to log file
      --read-only                Restrict the server to read-only operations
      --toolsets strings         An optional comma separated list of groups of tools to allow, defaults to enabling all (default [all])
  -v, --version                  version for server

Use "server [command] --help" for more information about a command.

Steps to reproduce the behavior

go run github.com/github/github-mcp-server/cmd/github-mcp-server@main --export-translations
A GitHub MCP server that handles various tools and resources.

Usage:
  server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  stdio       Start stdio server

Flags:
      --dynamic-toolsets         Enable dynamic toolsets
      --enable-command-logging   When enabled, the server will log all command requests and responses to the log file
      --export-translations      Save translations to a JSON file
      --gh-host string           Specify the GitHub hostname (for GitHub Enterprise etc.)
  -h, --help                     help for server
      --log-file string          Path to log file
      --read-only                Restrict the server to read-only operations
      --toolsets strings         An optional comma separated list of groups of tools to allow, defaults to enabling all (default [all])
  -v, --version                  version for server

Use "server [command] --help" for more information about a command.

Expected vs actual behavior

A completion json is dumped.

relates to: #206

@SamMorrowDrums
Copy link
Collaborator

Hi @tjamet this doesn't quite work as it should, but it does work. If you run ./github-mcp-server stdio --export-translations it will work, and the server starts and then you need to exit out, which is not really the right behaviour so I'll leave this bug open - but it does mean you are not blocked!

Probably the best way to do this is:

Create an empty json file:

echo "{}" > github-mcp-server-config.json

Run the docker command with a volume mount, and it will then update it and you'll have the local translations available.

docker run --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=1 -v $(pwd)/github-mcp-server-config.json:/server/github-mcp-server-config.json ghcr.io/github/github-mcp-server:v0.2.1 ./github-mcp-server stdio --export-translations

You can keep this file and update it in future versions by running same docker command with same volume mount, and it will add new keys, but it will not overwrite the ones you have set already.

I run it and get this:

{
  "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_ADD_PULL_REQUEST_COMMENT_DESCRIPTION": "Add a review comment to a pull request",
  "TOOL_CREATE_BRANCH_DESCRIPTION": "Create a new branch in a GitHub repository",
  "TOOL_CREATE_ISSUE_DESCRIPTION": "Create a new issue in a GitHub repository",
  "TOOL_CREATE_OR_UPDATE_FILE_DESCRIPTION": "Create or update a single file in a GitHub repository",
  "TOOL_CREATE_PULL_REQUEST_DESCRIPTION": "Create a new pull request in a GitHub repository",
  "TOOL_CREATE_PULL_REQUEST_REVIEW_DESCRIPTION": "Create a review on a pull request",
  "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_COMMITS_DESCRIPTION": "Get details for a commit from a GitHub repository",
  "TOOL_GET_FILE_CONTENTS_DESCRIPTION": "Get the contents of a file or directory from a GitHub repository",
  "TOOL_GET_ISSUE_COMMENTS_DESCRIPTION": "Get comments for a GitHub issue",
  "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. Use this when a request include \"me\", \"my\"...",
  "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_GET_SECRET_SCANNING_ALERT_DESCRIPTION": "Get details of a specific secret scanning alert in a GitHub repository.",
  "TOOL_LIST_BRANCHES_DESCRIPTION": "List branches in a GitHub repository",
  "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_ISSUES_DESCRIPTION": "List issues in a GitHub repository with filtering options",
  "TOOL_LIST_PULL_REQUESTS_DESCRIPTION": "List and filter repository pull requests",
  "TOOL_LIST_SECRET_SCANNING_ALERTS_DESCRIPTION": "List secret scanning alerts in a GitHub repository.",
  "TOOL_MERGE_PULL_REQUEST_DESCRIPTION": "Merge a pull request",
  "TOOL_PUSH_FILES_DESCRIPTION": "Push multiple files to a GitHub repository in a single commit",
  "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_ISSUE_DESCRIPTION": "Update an existing issue in a GitHub repository",
  "TOOL_UPDATE_PULL_REQUEST_BRANCH_DESCRIPTION": "Update a pull request branch with the latest changes from the base branch",
  "TOOL_UPDATE_PULL_REQUEST_DESCRIPTION": "Update an existing pull request in a GitHub repository"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants