Skip to content
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

github server fail to request list_issues #296

Open
kzmszk opened this issue Dec 10, 2024 · 6 comments
Open

github server fail to request list_issues #296

kzmszk opened this issue Dec 10, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@kzmszk
Copy link

kzmszk commented Dec 10, 2024

Describe the bug
The github mcp server should have supported list_issues command (which is documented) but list_tools doesn't return this tool entry and we can't call it actually.

To Reproduce
Steps to reproduce the behavior:

  1. setup claude desktop with server-github
  2. request claude to get issues from any repo

or

  1. create mcp-client which support github mcp server
  2. call list_tools() after connecting github server
  3. tools list doesn't contain list_issues tool

or

  1. create mcp-client which support github mcp server
  2. call session.call_tool("list_issues",...) fail

Expected behavior
list_issues should be available for github_server.

Logs
error log from my mcp-client sample bellow:
| Traceback (most recent call last):
| File "/workspace/tachikoma/infra/mcp/github.py", line 34, in list_issues
| result = await session.call_tool("list_issues", arguments={"owner": owner, "repo": repo})
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/opt/.venv/lib/python3.12/site-packages/mcp/client/session.py", line 163, in call_tool
| return await self.send_request(
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "/opt/.venv/lib/python3.12/site-packages/mcp/shared/session.py", line 175, in send_request
| raise McpError(response_or_error.error)
| mcp.shared.exceptions.McpError: code=-32603 message='Unknown tool: list_issues' data=None

conversation with claude desktop:

The original response is in Japanese. I translated into English.
Claude responded available github related commands.

I'm sorry `list_issues` function seems to be not included in github features.

Availabe GitHub related function is bellow:
- create_or_update_file
- search_repositories
- create_repository
- get_file_contents
- push_files
- create_issue
- create_pull_request
- fork_repository
- create_branch

Additional context
Other than list_issues, many features seems to be disabled.
It looks like first 10 features only available in list_tools()?

@kzmszk kzmszk added the bug Something isn't working label Dec 10, 2024
@0xRaduan
Copy link
Contributor

@kzmszk - I do think, that you are not on the latest version of Github MCP server.

@jspahrsummers - just curious, how often do you update the officially maintained servers?

I did try to reproduce this error on my Claude Desktop, with local build and got next error though(here is a fix PR: #305):

Error executing code: MCP error -32603: Invalid arguments: 6.body: Expected string, received null

@kzmszk
Copy link
Author

kzmszk commented Dec 12, 2024

I don't know how to check the server-github version.

I tried with the modified mcp-client.py (https://modelcontextprotocol.io/tutorials/building-a-client).
I modified the code only to use official server-github by setting the following info.

server_params = StdioServerParameters(
            command="npx",
            args=["-y", "@modelcontextprotocol/server-github"],
            env={
                "GITHUB_PERSONAL_ACCESS_TOKEN": "my_token",
                "PATH": "/opt/homebrew/bin:/usr/bin:/bin"
            }
        )

I got the following response:
no list_issues here.

GitHub MCP Server running on stdio

Connected to server with tools: ['create_or_update_file', 'search_repositories', 'create_repository', 'get_file_contents', 'push_files', 'create_issue', 'create_pull_request', 'fork_repository', 'create_branch']

MCP Client Started!
Type your queries or 'quit' to exit.

The problem is in python_sdk client library? We need to get next pages or something?

@jspahrsummers
Copy link
Member

just curious, how often do you update the officially maintained servers?

At the moment, this is basically "whenever we remember to." Agree we need to improve this! See, e.g., #330

@jspahrsummers
Copy link
Member

Are you still having the original issue on the latest main and with #305 merged in?

@dazzaji
Copy link

dazzaji commented Dec 17, 2024

Update on tool availability after testing both npm package and local build:

Current Status:

  1. Local build (with fix(github): Allow body to be nullable in GithubIssueSchema #305 merged):

    • Successfully exposes 16 GitHub functions
    • Can see previously unavailable tools like add_issue_comment
    • Issue list/search functionality now visible to Claude Desktop
  2. Published npm package (via npx):

    • Still limited to original 9 tools
    • Issue list/search functionality not available
    • Appears to need updating to include recent fixes

Remaining Issues:
Even with local build, some functionality is still problematic:

  • add_issue_comment: Visible but unable to add comments
  • create_or_update_file: Can create but not update files
    • Error when updating: "MCP error -32603: Invalid arguments: content.encoding: Required, content.content: Required"

Suggestion:
Consider updating the published npm package to include recent fixes. Also, the remaining errors with file updates suggest possible schema validation issues that might need investigation. I also had errors when attempting to add a comment to an existing GitHub issue.

@mikhailshilkov
Copy link

Got the same problem with npx, the docker-based server works fine. It looks like the NPM package is not up-to-date.

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

5 participants