Title: `get_file_contents` is not working properly (Path did not point to a file or directory, but resolved git ref) · Issue #864 · github/github-mcp-server · GitHub
Open Graph Title: `get_file_contents` is not working properly (Path did not point to a file or directory, but resolved git ref) · Issue #864 · github/github-mcp-server
X Title: `get_file_contents` is not working properly (Path did not point to a file or directory, but resolved git ref) · Issue #864 · github/github-mcp-server
Description: Describe the bug It's not able to resolve a file. Affected version GitHub MCP Server Version: v0.10.0 Commit: 45e90ae Build Date: 2025-08-01T14:36:17Z Steps to reproduce the behavior Type "Read file X in repo Y" Expected vs actual behavi...
Open Graph Description: Describe the bug It's not able to resolve a file. Affected version GitHub MCP Server Version: v0.10.0 Commit: 45e90ae Build Date: 2025-08-01T14:36:17Z Steps to reproduce the behavior Type "Read fil...
X Description: Describe the bug It's not able to resolve a file. Affected version GitHub MCP Server Version: v0.10.0 Commit: 45e90ae Build Date: 2025-08-01T14:36:17Z Steps to reproduce the behavior Type "...
Opengraph URL: https://github.com/github/github-mcp-server/issues/864
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`get_file_contents` is not working properly (Path did not point to a file or directory, but resolved git ref)","articleBody":"### Describe the bug\n\nIt's not able to resolve a file.\n\n### Affected version\n\nGitHub MCP Server\nVersion: v0.10.0\nCommit: 45e90aedd4445e0e61ead8cb165b45cc8e249f1e\nBuild Date: 2025-08-01T14:36:17Z\n\n### Steps to reproduce the behavior\n\n1. Type \"Read file X in repo Y\"\n\n### Expected vs actual behavior\n\nFile should be correctly retrieved from the Github.\n\n### Logs\n\n```\n⏺ I found the file localenv.config.yaml. Let me read its contents:\n\n⏺ github_twdcgrid - Get file or directory contents (MCP)(owner: \"COST\", repo: \"baymax\", path: \"localenv.config.yaml\")\n ⎿ Path did not point to a file or directory, but resolved git ref to {\"Ref\":\"refs/heads/main\",\"SHA\":\"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\"} with possible path matches: [\"\n localenv.config.yaml\"]\n\n ⎿ Interrupted by user\n\n\u003e supply \"Ref\":\"refs/heads/main\"\n\n✻ Thinking…\n\n The user wants me to supply the ref parameter with \"refs/heads/main\" when making the request to get the file contents.\n\n⏺ github_twdcgrid - Get file or directory contents (MCP)(owner: \"COST\", repo: \"baymax\", path: \"localenv.config.yaml\", ref: \"refs/heads/main\")\n ⎿ Path did not point to a file or directory, but resolved git ref to {\"Ref\":\"refs/heads/main\",\"SHA\":\"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\"} with possible path matches: [\"\n localenv.config.yaml\"]\n\n ⎿ Interrupted by user\n\n\u003e supply sha as well\n\n✻ Thinking…\n\n The user wants me to supply the SHA as well when making the request. Let me use the SHA that was returned in the previous response.\n\n⏺ github_twdcgrid - Get file or directory contents (MCP)(owner: \"COST\", repo: \"baymax\", path: \"localenv.config.yaml\", sha: \"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\")\n ⎿ Path did not point to a file or directory, but resolved git ref to {\"Ref\":\"\",\"SHA\":\"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\"} with possible path matches: [\"localenv.config\n .yaml\"]\n\n ⎿ Interrupted by user\n\n\u003e sha and ref\n\n✻ Thinking…\n\n The user wants me to supply both sha and ref parameters. Let me try that.\n\n⏺ github_twdcgrid - Get file or directory contents (MCP)(owner: \"COST\", repo: \"baymax\", path: \"localenv.config.yaml\", ref: \"refs/heads/main\", sha:\n \"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\")\n ⎿ Path did not point to a file or directory, but resolved git ref to {\"Ref\":\"\",\"SHA\":\"b32ec16443d8f6fef6ba16913d33f0abfc3aa02d\"} with possible path matches: [\"localenv.config\n .yaml\"]\n\n ⎿ Interrupted by user\n```\n","author":{"url":"https://github.com/nasxisbest","@type":"Person","name":"nasxisbest"},"datePublished":"2025-08-13T00:09:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":20},"url":"https://github.com/864/github-mcp-server/issues/864"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:235740af-75ed-9fd4-45ad-d2a86701f63f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC4E:7B7E7:188BE92:2247116:6A60DF77 |
| html-safe-nonce | e9df78b05b9f6b856fc70107a51855afea50199f13772638e607a68817872563 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzRFOjdCN0U3OjE4OEJFOTI6MjI0NzExNjo2QTYwREY3NyIsInZpc2l0b3JfaWQiOiI3NzY3MDIwOTA0Mjc1NTY2NDU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 24b5c09659f83e1a7887f56ebac7953bbb6834eaaffd991ec06fca9f48d6b350 |
| hovercard-subject-tag | issue:3316421096 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/864/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95eb471e440fec9f83df158aea80c84b66d0480293e620789efc756e75e1116c/github/github-mcp-server/issues/864 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95eb471e440fec9f83df158aea80c84b66d0480293e620789efc756e75e1116c/github/github-mcp-server/issues/864 |
| og:image:alt | Describe the bug It's not able to resolve a file. Affected version GitHub MCP Server Version: v0.10.0 Commit: 45e90ae Build Date: 2025-08-01T14:36:17Z Steps to reproduce the behavior Type "Read fil... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nasxisbest |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8302bdfafed4cf34ac9c1d3593108fafa53bc3f86b893907e38fa6bdd74361ac |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3c2ff0c76b34772c83c9498a08cefee28f53da0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width