Skip to content

MCP server to read image files and return as base64.

License

Notifications You must be signed in to change notification settings

boecht/read-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boecht/read-image

MCP server to read image files.

As of February 2026, GitHub Copilot does not have built-in support for reading image files directly. This MCP server provides a workaround by reading image files and returning their contents in a format that can be processed by Copilot.

Tool

read_image

Read an image file from the filesystem and return its contents.

Arguments:

  • file_path (required): Absolute path to the image file

Returns:

Multipart content containing:

  1. JSON metadata with file information:

    {
      "fileName": "image.png",
      "filePath": "/path/to/image.png",
      "mimeType": "image/png",
      "sizeBytes": 12345
    }
  2. The image content (viewable by the AI agent)

Setup

Clone or copy this repository into your project:

git clone https://github.com/boecht/read-image .mcp/read-image

Then add the server to your .vscode/mcp.json:

{
  "servers": {
    "read-image": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "${workspaceFolder}/.mcp/read-image",
        "python",
        "server.py"
      ]
    }
  }
}

Adjust the --directory path to match where you've placed this server.

License

Unlicense - Public Domain

About

MCP server to read image files and return as base64.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages