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

express-postgres-starter

v1.0.0

Published

> API for AI agents to search, license, and download b-roll video clips and voiceovers via plain language queries.

Readme

AILibrary MCP Server

API for AI agents to search, license, and download b-roll video clips and voiceovers via plain language queries.

MCP Compatible npm License: MIT

AILibrary gives AI agents autonomous access to a licensed media library. Agents can search, preview, and download videos, images, and audio clips using natural language — with automatic per-download credit billing. No human required.

Live API: https://ailibrary-m43k.polsia.app


MCP Server Installation

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

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

Cursor

Add to .cursor/mcp.json in your project, or Settings → MCP → Add Server:

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

Windsurf / Cline / Continue

Same config works across all MCP-compatible clients:

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

Install via npm (alternative)

npm install -g ailibrary-mcp

Then configure with:

{
  "mcpServers": {
    "ailibrary": {
      "command": "ailibrary-mcp",
      "args": []
    }
  }
}

Authentication

No startup configuration required. Authentication uses an API key passed as a tool argument in each call — meaning multiple agents can use different keys with the same server instance.

Get your API key at ailibrary-m43k.polsia.app.

API keys start with alib_.


Tools

search_assets

Search the media library by natural language query.

search_assets(api_key, query, [type], [limit])

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | api_key | string | ✓ | Your AILibrary API key (alib_...) | | query | string | ✓ | Natural language query, e.g. "drone nature shot", "upbeat corporate music" | | type | string | — | Filter: video, image, or audio | | limit | number | — | Max results (default 20, max 100) |

Returns: asset IDs, titles, types, preview URLs, duration, resolution, and credit cost.


download_asset

Download a specific asset by ID. Deducts credits and returns the download URL.

download_asset(api_key, asset_id)

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | api_key | string | ✓ | Your AILibrary API key | | asset_id | number | ✓ | Asset ID from search_assets results |

Returns: download URL, credits deducted, remaining balance.


check_balance

Verify your API key is valid and active.

check_balance(api_key)

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | api_key | string | ✓ | Your AILibrary API key |

Returns: { valid: true } if the key works.


Example Agent Workflow

Agent task: "Create a 60-second product intro video using drone footage"

1. search_assets({ api_key: "alib_...", query: "drone product reveal", type: "video", limit: 5 })
   → Returns 5 matching clips with preview URLs and credit costs

2. download_asset({ api_key: "alib_...", asset_id: 42 })
   → Returns download URL, deducts 1 credit

3. search_assets({ api_key: "alib_...", query: "upbeat corporate background music", type: "audio" })
   → Returns matching audio tracks

4. download_asset({ api_key: "alib_...", asset_id: 87 })
   → Returns audio download URL

The agent handles the entire media sourcing workflow autonomously — no human needed to browse stock libraries or approve downloads.


Repository Structure

ailibrary/
├── server.js           # Express API server
├── migrations/         # PostgreSQL migrations
├── public/             # Static assets
├── mcp-server/         # MCP server (TypeScript)
│   ├── src/index.ts    # Server implementation
│   └── package.json    # npm package: ailibrary-mcp
├── smithery.yaml       # Smithery MCP registry config
└── servers.json        # MCP server manifest

Build from Source

git clone https://github.com/Polsia-Inc/ailibrary.git
cd ailibrary/mcp-server
npm install
npm run build
node dist/index.js

License

MIT


Links

  • Homepage: https://ailibrary-m43k.polsia.app
  • npm: https://www.npmjs.com/package/ailibrary-mcp
  • MCP Spec: https://modelcontextprotocol.io