npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-image-adapter

v1.0.0

Published

MCP image adapter: path in, base64 out

Readme

MCP Image Adapter

A library for converting images to base64 format for use with Model Context Protocol (MCP) in Cursor AI and other MCP-compatible applications.

About

MCP Image Adapter is primarily designed for use with Cursor AI as an MCP server for image handling. It allows AI assistants to view and process images within the IDE, enhancing their contextual understanding and capabilities when working with visual content.

This adapter implements the Model Context Protocol (MCP), making it compatible with Cursor AI and other MCP-supporting applications.

Usage

This package is designed to be used as an MCP server with Cursor AI, not as a regular npm dependency. To use it, configure Cursor AI as described in the "Cursor Configuration" section below.

Compatibility

  • Tested and works well with Claude 3.7.
  • Known Issue: There is an incompatibility with the argument schema for the mcp_image-adapter_get_compressed_image tool when used with gemini-2.5-pro-preview-05-06. This may lead to errors when this specific tool is invoked by that model.

Available Tools

For Working with Original Images

  • get_unprocessed_image - get original image in base64 format without compression
  • get_multiple_unprocessed_images - get multiple original images without compression

For Working with Compressed Images

  • get_compressed_image - get compressed image
  • get_multiple_compressed_images - get multiple compressed images

Additional Tools

  • get_supported_formats - list of supported formats
  • get_image_metadata - get image metadata

Cursor Configuration

To use mcp-image-adapter with Cursor AI, you need to create an MCP configuration file. Here's an example:

Project-Specific Configuration

Create a .cursor/mcp.json file in your project directory:

{
  "mcpServers": {
    "image-adapter": {
      "command": "npx",
      "args": ["-y", "mcp-image-adapter"]
    }
  }
}

Global Configuration

Alternatively, create a ~/.cursor/mcp.json file to make the adapter available across all projects:

{
  "mcpServers": {
    "image-adapter": {
      "command": "npx",
      "args": ["-y", "mcp-image-adapter"]
    }
  }
}

Once configured, Cursor AI will be able to use the image processing tools provided by the adapter.

Tips

Optimizing Image Tools Usage

For most use cases, we recommend using compressed image methods instead of unprocessed ones. In your Cursor configuration (.cursor/rules or .cursorrules), you can set up tool preferences to prioritize compressed image methods.

Using compressed images has several advantages:

  • Reduces context token consumption
  • Improves processing speed
  • Still provides sufficient visual information for AI models

Roadmap

Brief overview of our future plans:

  • Testing: Expand test coverage, add integration tests
  • Security: Implement path validation, file size limits, and safer MIME type handling
  • Logging: Add structured logging with configurable verbosity levels

License

MIT