Inliner MCP Server

Inliner MCP Server

Enables AI coding agents to manage image projects, generate and edit images, and check usage via Inliner.ai through natural language commands.

Category
访问服务器

README

@inliner/mcp-server

MCP server for Inliner.ai — gives AI coding agents live access to your image projects, credits, and generation.

Works with any Model Context Protocol compatible tool: Claude Code, OpenAI Codex CLI, GitHub Copilot, Gemini CLI, Cursor, Windsurf, and more.

Install

Claude Code

claude mcp add --transport stdio inliner -- npx -y @inliner/mcp-server --api-key=YOUR_API_KEY

# Or with environment variable
export INLINER_API_KEY=your-key
claude mcp add --transport stdio inliner -- npx -y @inliner/mcp-server

OpenAI Codex CLI

Add to ~/.codex/config.toml:

[mcp.inliner]
command = "npx"
args = ["-y", "@inliner/mcp-server"]
env = { INLINER_API_KEY = "your-key" }

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "inliner": {
      "command": "npx",
      "args": ["-y", "@inliner/mcp-server"],
      "env": { "INLINER_API_KEY": "your-key" }
    }
  }
}

VS Code / Cursor / Windsurf

Project-specific (Recommended): Create .cursor/mcp.json (or .vscode/mcp.json) in your project root:

{
  "mcpServers": {
    "inliner": {
      "command": "npx",
      "args": ["-y", "@inliner/mcp-server"],
      "env": {
        "INLINER_API_KEY": "your-key",
        "INLINER_DEFAULT_PROJECT": "your-project-namespace"
      }
    }
  }
}

Global setup: Add to Cursor Settings > Features > MCP, or VS Code MCP settings:

{
  "mcpServers": {
    "inliner": {
      "command": "npx",
      "args": ["-y", "@inliner/mcp-server"],
      "env": { "INLINER_API_KEY": "your-key" }
    }
  }
}

Note: Using the env field is recommended over --api-key command-line arguments for better compatibility with MCP clients.

Preferred project behavior:

  • If a tool call omits project, the server resolves it in this order:
    1. INLINER_DEFAULT_PROJECT (if set)
    2. account default project
    3. first available project
    4. "default" fallback
  • This reduces repetitive "which project?" confirmations in day-to-day usage.

Tools

Tool Description
generate_image_url Build a properly formatted Inliner image URL from description, dimensions, and project (project is optional; smart URL slug recommendation by default)
generate_image Generate an image with full prompt + concise smart slug, and optionally save to a local file (project is optional)
create_image Quick alias for generating images with sensible defaults (800x600 PNG) with smart slug recommendation
edit_image Edit an existing image by URL or upload a local image, apply edit instructions, optionally resize, and save to a local file
get_projects List all your Inliner projects with namespaces and settings
create_project Create a new project (reserves namespace like 'my-project' for your account)
get_project_details Get detailed project config: namespace, custom prompt, reference images
get_usage Check remaining credits (base, premium, edit, infill, enhance)
get_current_plan View current subscription plan and feature allocations
list_images List generated images with optional project filter
get_image_dimensions Get recommended dimensions for common use cases (hero, product, profile, etc.)

Resources

Resource URI Description
Inliner Guide inliner://guide Quick reference for URL format, dimensions, and style hints

Example Interaction

Once installed, ask your AI agent naturally:

"Create a project called 'marketing' for my marketing team"

The agent will use create_project to reserve the namespace, then you can use it for generating images.

"Add a hero image to the landing page for my acme-corp project"

The agent will:

  1. Call get_project_details to get your project config
  2. Call generate_image_url with the right namespace and dimensions
  3. Output the <img> tag with the correct URL, alt text, and loading attributes

Smart URL behavior:

  • The server recommends concise slugs using POST /url/recommend
  • Then generates with full prompt context using POST /content/generate and the selected slug
  • This preserves rich prompt quality while producing readable/SEO-friendly URL paths
  • generate_image_url responses include the selected slug plus alternatives to help agents pick cleaner URLs when needed

"Generate a happy duck image and save it to ./images/duck.png"

The agent will:

  1. Call generate_image with the description, dimensions, and output path
  2. Poll until the image is ready (up to 3 minutes)
  3. Save the image to the specified file path
  4. Return the URL and file path

"Create a hero image for my landing page" (using create_image alias)

The agent will:

  1. Call create_image with just the description (defaults to 800x600 PNG)
  2. Poll until ready and save to a sensible default location
  3. Return the URL and file path

"Edit this local photo to remove the background and resize to 400x400"

The agent will:

  1. Call edit_image with sourcePath pointing to the local file
  2. Upload the file first (if no URL provided)
  3. Apply the edit instruction
  4. Resize to specified dimensions
  5. Save the result

"How many image credits do I have left?"

The agent calls get_usage and reports your remaining credits by type.

API Key

Generate an API key from Account > API Keys in the Inliner dashboard. Only account owners can create and revoke keys.

Pass it via:

  • Environment variable (recommended): INLINER_API_KEY — Use the env field in MCP configuration files
  • Command-line argument: --api-key=YOUR_KEY — Works for standalone testing, but may have parsing issues with some MCP clients

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选