Skip to content

ninavolu/image-mcp-server

Repository files navigation

image-mcp-server (pixlib)

A Model Context Protocol (MCP) server that lets Claude search an image library and pull back real image URLs during a normal conversation. It runs locally over stdio for Claude Desktop, or hosted over Streamable HTTP with OAuth so anyone can connect their own library. Live at pixlib.app.

What it does

The server gives the model two tools:

  • search_images: find images by purpose (hero, landing-page, icon, background, product, and so on) and by tags, returning the matching public URLs, tags, and descriptions.
  • list_images: page through everything in the library.

Image metadata lives in Supabase (PostgreSQL) and the files are served from Supabase storage, so a search comes back with URLs the model can drop straight into whatever it's building. The bulk.js and manage.js scripts handle uploading and managing the library outside of chat.

How it's built

  • Node.js on the official @modelcontextprotocol/sdk.
  • Two transports from one codebase: stdio for local Claude Desktop, and a stateless Streamable HTTP server for the hosted version.
  • Auth is Clerk OAuth. The hosted server implements the OAuth discovery endpoints the MCP spec expects, proxies the authorize and token steps to Clerk, then issues its own opaque bearer token instead of passing Clerk's token around.
  • Deployed on Railway, with the landing and privacy page at pixlib.app.

Running it locally

You'll need a Supabase project and a .env with SUPABASE_URL and SUPABASE_SERVICE_KEY (see .env.example). Point Claude Desktop at the server over stdio:

{
  "mcpServers": {
    "image-library": {
      "command": "node",
      "args": ["/path/to/image-mcp-server/index.js"]
    }
  }
}

To run the hosted version instead, set PORT and the CLERK_* variables. With a port present the server boots as an HTTP service and switches to the OAuth and Streamable HTTP path automatically.

About

pixlib: a Model Context Protocol (MCP) server that lets Claude search and manage an image library in chat. Clerk OAuth, Supabase (PostgreSQL), Cloudflare R2, served over Streamable HTTP on Railway.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors