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

doubao-image-mcp

v0.2.5

Published

Doubao AI image generation MCP server

Downloads

377

Readme

Custom MCP Server

A Model Context Protocol (MCP) server that exposes custom tools for Claude.

Tools Available

generate_image - Generate images using Doubao AI and save to local file

  • Parameters:
    • prompt (string, required): Text description of the image to generate
    • size (string, optional): Output image size. Supported values: 2K, 3K, or <width>x<height> (for example 3072x2048)
  • Returns: Generation details (model, requested/returned size) and path to the locally saved image file
  • Default settings:
    • Model (preferred): doubao-seedream-5-0-260128
    • Automatic fallbacks when the account has not activated the preferred model:
      • doubao-seedream-5-0-lite-260128
      • doubao-seedream-4-5-251128
    • Size: 2K
    • Sequential image generation: disabled
    • Response format: url
    • Watermark: false
    • Stream: false
  • Requirements: Set DOUBAO_API_KEY environment variable with your API key

Setup and Installation

  1. Install dependencies:

    npm install
  2. Build the server:

    npm run build
  3. Set up environment variable for Doubao API:

    export DOUBAO_API_KEY="your-api-key-here"

    Or add it to your shell profile (.bashrc, .zshrc, etc.).

  4. Run the server:

    npm start

For development with auto-reload:

npm run dev

Automated npm Publishing

This project publishes to npm automatically when a Git tag like v0.2.1 is pushed.

This workflow uses npm Trusted Publishing (OIDC), so no NPM_TOKEN secret is required.

  1. In npm package settings, configure Trusted Publisher:
    • Provider: GitHub Actions
    • Owner: strzhao
    • Repository: doubao-image-mcp
    • Workflow file: npm-publish.yml
    • Environment: leave empty
  2. Ensure package.json version matches the tag (v<version>)
  3. Push tag to trigger workflow:
git push origin v0.2.1

Connecting to Claude Code

To use this MCP server with Claude Code, add it to your Claude Code configuration:

  1. Edit your Claude Code config file (usually at ~/.claude/claude_desktop_config.json)

  2. Add the server configuration (recommended: run from npm package via npx):

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

Or if you want to run it from the local project directory:

{
  "mcpServers": {
    "doubao-image-mcp": {
      "command": "npm",
      "args": ["start"],
      "cwd": "/absolute/path/to/this/project"
    }
  }
}

Adding More Tools

To add more tools:

  1. Add the tool definition to the tools array in src/index.ts
  2. Add a new case in the switch statement in the CallToolRequestSchema handler
  3. Rebuild and restart the server

Development

  • Write TypeScript code in the src/ directory
  • The project uses tsx for development with hot reload
  • Build output goes to dist/ directory

License

MIT