ailibrary-mcp
v1.0.0
Published
MCP server for AILibrary - AI-native video and media asset library
Maintainers
Readme
ailibrary-mcp
MCP (Model Context Protocol) server for AILibrary — the AI-native media asset library.
Gives AI agents the ability to search, discover, and download licensed videos, images, and audio clips autonomously, with automatic credit billing.
Installation
npx -y ailibrary-mcpOr install globally:
npm install -g ailibrary-mcpConfiguration
Add to your MCP client config (Claude Desktop, Cursor, Windsurf, Cline, etc.):
Using environment variable (recommended)
{
"mcpServers": {
"ailibrary": {
"command": "npx",
"args": ["-y", "ailibrary-mcp"],
"env": {
"AILIBRARY_API_KEY": "alib_your_key_here"
}
}
}
}Passing API key per tool call
{
"mcpServers": {
"ailibrary": {
"command": "npx",
"args": ["-y", "ailibrary-mcp"]
}
}
}Then pass api_key in each tool call directly.
Get an API key at ailibrary-m43k.polsia.app.
Tools
| Tool | Description |
|------|-------------|
| search_assets | Search the media library by keyword, with optional type filter (video, image, audio) |
| download_asset | Download an asset by ID (deducts credits from your balance) |
| check_balance | Check your remaining credit balance |
Usage Example
Once connected, your AI agent can:
Search for 3 drone nature videos suitable for a product intro
→ Uses search_assets({ api_key: "alib_...", query: "drone nature", type: "video" })
Download the best match
→ Uses download_asset({ api_key: "alib_...", asset_id: 42 })
Check remaining credits
→ Uses check_balance({ api_key: "alib_..." })API Reference
All tools accept an api_key parameter (or read AILIBRARY_API_KEY from the environment).
search_assets
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| api_key | string | yes* | Your AILibrary API key |
| query | string | yes | Search terms |
| type | string | no | Filter by type: video, image, audio |
| limit | number | no | Max results (default: 10) |
download_asset
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| api_key | string | yes* | Your AILibrary API key |
| asset_id | number | yes | ID from search results |
check_balance
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| api_key | string | yes* | Your AILibrary API key |
* Or set AILIBRARY_API_KEY environment variable
License
MIT
