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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@swairshah/input-mcp

v0.0.5

Published

MCP server for different kinds of UI input from user

Readme

input-mcp

MCP server for collecting contextual user input. The server exposes a single collect_input tool that can collect:

  • Text input - simple text or JSON from the user
  • Image input - freeform drawing on a canvas
  • Pixel art - grid-based pixel art editor with color palette

When called, it launches an Electron window where the user can provide their input, then returns the result (as a file path for images) back to the MCP client.

Pixel Art Example

Quick Start

npm install
npm run build
npx @modelcontextprotocol/inspector node dist/src/server.js

Note: This package is also published on npm as @swairshah/input-mcp and can be used directly with npx @swairshah/input-mcp.

This opens a web interface where you can test the tool. Try calling collect_input with different parameters:

  • {"kind": "text"} - opens a text input window
  • {"kind": "pixelart", "gridWidth": 16, "gridHeight": 16} - opens a pixel art editor
  • {"kind": "image", "initialImage": "/path/to/image.png"} - opens an image editor with a starting image

Build and Test the UI Components

bun install first. obviously.

  1. Build the UI bundle (creates ui/dist/ assets used by Electron):

    npm run build:ui
    # or
    bun run build:ui
  2. Launch the Electron prompt helper directly (useful for smoke tests):

    bun run create

    This spawns the image/text prompt window with the default text spec.

  3. Test script:

    bunx tsx scripts/test-input.ts image

Testing with MCP Inspector

npm run build
npx @modelcontextprotocol/inspector node dist/src/server.js

The inspector provides a web UI to test the tool. Images are saved to ~/.cache/input-mcp/images/ and the tool returns the file path.

Using with Claude Desktop

Add to your Claude config (~/Library/Application Support/Claude/claude_desktop_config.json):

Using npm package (recommended):

{
  "mcpServers": {
    "input-mcp": {
      "command": "npx",
      "args": ["-y", "@swairshah/input-mcp"]
    }
  }
}

Using local clone:

{
  "mcpServers": {
    "input-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/input-mcp/dist/src/server.js"]
    }
  }
}

Then ask Claude things like:

  • "Let me draw something for you" (opens drawing canvas)
  • "I want to create pixel art" (opens pixel art editor)

Dev

Project Structure

shared/       → Zod schemas, shared types, and error helpers
ui/           → Electron renderer (HTML/CSS/JS) and prompt modules
create.ts     → Launches the Electron window and normalises specs
server.ts     → MCP server definition for the `collect_input` tool
scripts/      → Ad-hoc utilities (`test-input.ts` for manual runs)

Development Workflow

  • Modify the renderer in ui/renderer.ts and module files under ui/modules/.
  • Add new input kinds by extending shared/types.ts and branching inside mount*Module helpers.
  • When iterating on the UI, run bun run create (or npx tsx scripts/test-input.ts image) to open a live window with the current spec.

License

MIT