Screenshot to Base64 MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Screenshot to Base64 MCP Server
Convert image files to base64 data URIs for seamless integration with LMStudio vision models.
๐ฏ Purpose
This MCP (Model Context Protocol) server solves the common error when sending screenshots to LMStudio vision models:
[ERROR] [Server Error] 'url' field must be a base64 encoded imageInstead of manually converting images, this server provides a simple tool that converts any image file to a properly formatted base64 data URI that LMStudio expects.
Universal MCP Compatibility - This server works with ALL MCP-compatible tools, including KILO CODE, Cline, Roo-Code, Claude Desktop, Continue.dev, and any other application that supports the Model Context Protocol standard.
Related MCP server: image-to-base64
โจ Features
๐ผ๏ธ Format Support: PNG, JPEG, GIF, WebP, BMP, SVG
๐ Automatic MIME Detection: Detects and applies correct MIME type
โ Error Handling: Clear error messages for missing/invalid files
๐ Easy Integration: Works seamlessly with KILO CODE and other MCP clients
๐ฆ Lightweight: Zero external dependencies except MCP SDK
๐ฅ Installation
Option 1: From GitHub (Recommended)
# Clone the repository
git clone https://github.com/amitrathiesh/screenshot-to-base64-mcp.git
cd screenshot-to-base64-mcp
# Install dependencies
npm installOption 2: From npm (Coming Soon)
npm install -g screenshot-to-base64-mcpโ๏ธ Configuration
Works with ALL MCP-Compatible Tools!
This server uses the standard Model Context Protocol, so it works with any MCP-compatible application. The configuration is nearly identical across all tools.
KILO CODE / VSCode Extensions
Open your MCP settings configuration file
Add the server configuration:
{
"mcpServers": {
"screenshot-to-base64": {
"command": "node",
"args": ["/absolute/path/to/screenshot-to-base64-mcp/index.js"]
}
}
}Restart your editor/extension
Cline (Claude Dev)
Open Cline MCP settings
Add the same configuration:
{
"mcpServers": {
"screenshot-to-base64": {
"command": "node",
"args": ["/absolute/path/to/screenshot-to-base64-mcp/index.js"]
}
}
}Claude Desktop
Open
~/Library/Application Support/Claude/claude_desktop_config.json(macOS)Add the server configuration:
{
"mcpServers": {
"screenshot-to-base64": {
"command": "node",
"args": ["/absolute/path/to/screenshot-to-base64-mcp/index.js"]
}
}
}Roo-Code / Continue.dev / Other MCP Tools
Use the same JSON configuration format in your tool's MCP settings. The Model Context Protocol is a universal standard!
Alternative: Global Installation Setup
If you installed via npm globally:
{
"mcpServers": {
"screenshot-to-base64": {
"command": "screenshot-to-base64-mcp"
}
}
}๐ฎ Usage
General Workflow (Any MCP-Compatible Tool + LMStudio)
Take a screenshot using your MCP client's browser/screenshot tools (KILO CODE, Cline, etc.)
Use the MCP tool to convert the screenshot:
Use the convert_image_to_base64 tool with the screenshot pathSend to LMStudio - The tool returns a base64 data URI that you can directly use in the
urlfieldSuccess! LMStudio's vision model processes the image without errors
Example Tool Call
Input:
{
"image_path": "/path/to/screenshot.png"
}Output:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...Supported Image Formats
Format | Extension | MIME Type |
PNG |
|
|
JPEG |
|
|
GIF |
|
|
WebP |
|
|
BMP |
|
|
SVG |
|
|
๐ง Development
Testing Locally
# Start the MCP server
npm start
# The server runs on stdio and waits for MCP protocol messagesProject Structure
screenshot-to-base64-mcp/
โโโ index.js # Main MCP server implementation
โโโ package.json # Project metadata and dependencies
โโโ LICENSE # MIT License
โโโ README.md # This file
โโโ .gitignore # Git ignore rules๐ Troubleshooting
Error: "Image file not found"
Ensure the path is correct (absolute paths recommended)
Check file permissions
Error: "Unsupported image format"
Verify the file extension is one of:
.png,.jpg,.jpeg,.gif,.webp,.bmp,.svgCheck the file isn't corrupted
MCP Server Not Loading
Verify the path in your KILO CODE config is absolute
Ensure Node.js โฅ18.0.0 is installed:
node --versionCheck that dependencies are installed:
npm install
๐ License
MIT License - Copyright (c) 2025 Amit Rathiesh
See LICENSE file for details.
๐ค Author
Amit Rathiesh
Email: amitrathiesh@webzler.com
Website: www.webzler.com
๐ค Contributing
Contributions, issues, and feature requests are welcome!
Fork the repository
Create your feature branch:
git checkout -b feature/amazing-featureCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
๐ Show Your Support
If this MCP server helped solve your LMStudio screenshot issues, give it a โญ๏ธ!
Built with โค๏ธ for the MCP and LMStudio community
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Convert JPG images to and from popular formats through MCP-compatible AI clients.
Convert images to PNG, JPEG, WebP, or AVIF through one public remote MCP tool.
Related MCP Servers
- AlicenseAqualityDmaintenanceThe MCP server offers the function of extracting images from local files and urls and converting them to base64 format, which is suitable for LLM analysis.32Apache 2.0
- AlicenseAqualityDmaintenanceConverts local images or remote image URLs to Base64 format via the MCP protocol, enabling AI assistants to process images.11ISC
- AlicenseAqualityNot gradedmaintenanceEnables text-only agents to process images by accepting image files, base64 data, or URLs, sending them to multimodal models, and returning structured text results via MCP.41MIT
- AlicenseNot gradedqualityDmaintenanceEnables analysis of local images through Kimi (Moonshot AI) vision models via the MCP protocol, supporting features like OCR and long context understanding.MIT