Title: Passing attachments (resources) to MCP servers? · Issue #155 · modelcontextprotocol/modelcontextprotocol · GitHub
Open Graph Title: Passing attachments (resources) to MCP servers? · Issue #155 · modelcontextprotocol/modelcontextprotocol
X Title: Passing attachments (resources) to MCP servers? · Issue #155 · modelcontextprotocol/modelcontextprotocol
Description: Is your feature request related to a problem? Please describe. As I was reading through the documentation, and experimenting with Claude Desktop and my own MCP server implementation, I couldn't find a way to pass a binary file as an 'att...
Open Graph Description: Is your feature request related to a problem? Please describe. As I was reading through the documentation, and experimenting with Claude Desktop and my own MCP server implementation, I couldn't fin...
X Description: Is your feature request related to a problem? Please describe. As I was reading through the documentation, and experimenting with Claude Desktop and my own MCP server implementation, I couldn't...
Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/155
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Passing attachments (resources) to MCP servers?","articleBody":"**Is your feature request related to a problem? Please describe.**\nAs I was reading through the documentation, and experimenting with Claude Desktop and my own MCP server implementation, I couldn't find a way to pass a binary file as an 'attachment' to MCP server. I can return a 'resource', but apparently there's no way to provide resource to the MCP tool call.\n\n**Describe the solution you'd like**\nI would like to support the following scenario:\nWhen prompting an LLM, user attaches a file. An MCP tool can then take this file and preprocess it (for example, extracting some metadata, or converting it to a different format) and return the result in plain text format or as a resource of any mime type. An LLM can then either display it to the user or decide what to do with this resource next.\n\n**Describe alternatives you've considered**\nI tried to instruct LLM (Claude 3.5 Sonnet) to pass file as a Base64-encoded string, but if the file is large, it is suboptimal, and it does seem that Claude is confused about its ability to pass files this way, which requires some additional prompting.\n","author":{"url":"https://github.com/iafan","@type":"Person","name":"iafan"},"datePublished":"2025-02-01T00:28:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/155/modelcontextprotocol/issues/155"}
| 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:a5feec5a-9509-ac25-1f71-2e294c21f2a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E266:1FC98B:71E07B:978AE7:6A5B4D26 |
| html-safe-nonce | 29b3a551856dce804a7dbc77e7ce75b79b1815f5a2335ed2ca84c826566eeec9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjY2OjFGQzk4Qjo3MUUwN0I6OTc4QUU3OjZBNUI0RDI2IiwidmlzaXRvcl9pZCI6IjgzMDgwNjYwOTkyODUxNTEwMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1baf3c25858a8e6ae8a18a02456f371fda93c5e230aaafddf46f7299473aeed0 |
| hovercard-subject-tag | issue:2824634488 |
| 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/modelcontextprotocol/modelcontextprotocol/155/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a436c58f2b9ae258ae28d5a1202538f30265a87f2d3ccc1177d8bbd284811d1/modelcontextprotocol/modelcontextprotocol/issues/155 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a436c58f2b9ae258ae28d5a1202538f30265a87f2d3ccc1177d8bbd284811d1/modelcontextprotocol/modelcontextprotocol/issues/155 |
| og:image:alt | Is your feature request related to a problem? Please describe. As I was reading through the documentation, and experimenting with Claude Desktop and my own MCP server implementation, I couldn't fin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iafan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862570523 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/modelcontextprotocol |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862570523 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/modelcontextprotocol |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width