Lulu Print MCP Server

by devlimelabs
Integrations
  • Used for environment variable configuration to store Lulu API credentials and other settings

  • Provides containerized deployment of the Lulu Print MCP server through Docker and Docker Compose

  • Repository hosting for the Lulu Print MCP code, allowing cloning for local development

Lulu 打印 MCP 服务器

模型上下文协议 (MCP) 服务器通过 Claude Desktop 和其他 MCP 客户端提供与 Lulu Print API 的集成,以实现按需打印服务。

特征

📚 打印作业管理

  • 创建和管理书籍和其他印刷材料的打印作业
  • 跟踪订单状态,从创建到交付
  • 下订单前计算成本
  • 支持每个订单多个项目

📄 文件验证

  • 打印前验证内部 PDF 文件
  • 使用尺寸检查来验证封面 PDF 文件
  • 根据页数计算所需的封面尺寸
  • 获取详细的验证状态和错误报告

💰 成本计算

  • 根据规格计算产品成本
  • 包括运费和税费计算
  • 支持不同的运输级别(MAIL 到 EXPRESS)
  • 获取详细的成本明细

🚚 运输管理

  • 按目的地检索可用的运输选项
  • 支持国际运输
  • 从标准邮件到快递的不同服务级别

🔔 Webhook

  • 订阅打印作业状态更改
  • 管理 Webhook 端点
  • 测试 webhook 传送
  • 查看 webhook 提交历史记录

安装

全局安装

# Install the package globally npm install -g @devlimelabs/lulu-print-mcp # Start the server lulu-print-mcp

本地开发

# Clone the repository git clone https://github.com/devlimelabs/lulu-print-mcp.git cd lulu-print-mcp # Install dependencies npm install # Set up development environment npm run setup:dev # Start the development server npm run dev

Docker 安装

# Build and run with Docker Compose docker-compose up -d # Or build and run the Docker image directly docker build -t lulu-print-mcp . docker run -p 3000:3000 lulu-print-mcp

配置

1. 获取 Lulu API 凭证

  1. https://developers.lulu.com/注册 Lulu 开发者账户
  2. 为了进行测试,请在https://developers.sandbox.lulu.com/创建一个沙盒帐户
  3. 导航到您的API 密钥页面
  4. 复制您的客户端密钥和客户端机密

2.配置环境变量

# Create a configuration file cp .env.example .env

使用您的 Lulu API 凭证编辑.env文件:

# Required: Your Lulu API credentials LULU_CLIENT_KEY=your_client_key_here LULU_CLIENT_SECRET=your_client_secret_here # Optional: API endpoints (defaults are provided) LULU_API_URL=https://api.lulu.com LULU_SANDBOX_API_URL=https://api.sandbox.lulu.com LULU_AUTH_URL=https://api.lulu.com/auth/realms/glasstree/protocol/openid-connect/token LULU_SANDBOX_AUTH_URL=https://api.sandbox.lulu.com/auth/realms/glasstree/protocol/openid-connect/token # Use sandbox environment for testing (default: false) LULU_USE_SANDBOX=false # Enable debug logging (default: false) DEBUG=false

与 Claude Desktop 一起使用

将此 MCP 服务器添加到您的 Claude Desktop 配置文件中:

# Run the Claude Desktop setup script npm run setup:claude

按照说明更新 Claude Desktop 配置文件。脚本将生成类似以下内容的配置:

{ "mcpServers": { "lulu-print": { "command": "lulu-print-mcp", "env": { "LULU_CLIENT_KEY": "your_client_key", "LULU_CLIENT_SECRET": "your_client_secret" } } } }

与游标一起使用

将此 MCP 服务器添加到您的 Cursor 配置文件中:

  1. 打开光标设置( Cursor → SettingsCmd+,在 Mac 上)
  2. 导航至“功能”部分
  3. 找到“模型上下文协议”设置
  4. 添加以下配置:
{ "mcpServers": { "lulu-print": { "command": "node", "args": ["/path/to/global/lulu-print-mcp/dist/index.js"], "env": { "LULU_CLIENT_KEY": "your_client_key", "LULU_CLIENT_SECRET": "your_client_secret" } } } }

或者如果全局安装:

{ "mcpServers": { "lulu-print": { "command": "lulu-print-mcp", "env": { "LULU_CLIENT_KEY": "your_client_key", "LULU_CLIENT_SECRET": "your_client_secret" } } } }

与 Windsurf 一起使用

将此 MCP 服务器添加到您的 Windsurf 配置中:

  1. 在项目目录中创建或编辑.windsurf/config.json文件
  2. 添加以下配置:
{ "mcpServers": { "lulu-print": { "command": "lulu-print-mcp", "env": { "LULU_CLIENT_KEY": "your_client_key", "LULU_CLIENT_SECRET": "your_client_secret" } } } }

对于使用 Windsurf 进行开发设置:

{ "mcpServers": { "lulu-print": { "command": "tsx", "args": ["src/index.ts"], "cwd": "/path/to/lulu-print-mcp", "env": { "LULU_CLIENT_KEY": "your_client_key", "LULU_CLIENT_SECRET": "your_client_secret" } } } }

可用工具

成本计算

计算打印作业成本

无需创建打印作业即可计算其成本:

calculate-print-job-cost line_items: Array of items to price - pod_package_id: Product SKU (e.g., "0600X0900BWSTDPB060UW444MXX") - page_count: Number of pages - quantity: Number of copies shipping_address: Delivery address - street1: Street address - city: City name - country_code: 2-letter ISO country code - postcode: Postal code - phone_number: Contact phone shipping_option: MAIL | PRIORITY_MAIL | GROUND | EXPEDITED | EXPRESS

打印作业管理

创建打印作业

创建新的打印作业订单:

create-print-job line_items: Array of books to print - title: Book title - cover_url: URL to cover PDF - interior_url: URL to interior PDF - pod_package_id: Product SKU - quantity: Number of copies shipping_address: Delivery address - name: Recipient name - street1: Street address - city: City - country_code: 2-letter ISO code - postcode: Postal code - phone_number: Phone contact_email: Email for order communication shipping_level: MAIL | PRIORITY_MAIL | GROUND | EXPEDITED | EXPRESS external_id: Your order reference (optional)
列出打印作业

使用可选过滤器列出打印作业:

list-print-jobs page: Page number (optional) page_size: Results per page (optional) status: Filter by status (optional) created_after: Filter by creation date (optional) created_before: Filter by creation date (optional)
获取打印作业

获取特定打印作业的详细信息:

get-print-job id: Print job ID
更新打印作业

更新打印作业(仅在付款前):

update-print-job id: Print job ID external_id: New reference (optional) contact_email: New email (optional)
取消打印作业

取消打印作业(仅限未付款):

cancel-print-job id: Print job ID
获取打印作业状态

获取打印作业的当前状态:

get-print-job-status id: Print job ID
获取打印作业成本

获取打印作业的详细成本:

get-print-job-costs id: Print job ID
获取打印作业统计信息

获取一段时间内打印作业的统计数据:

get-print-job-statistics start_date: Start date (YYYY-MM-DD) (optional) end_date: End date (YYYY-MM-DD) (optional) group_by: DAY | WEEK | MONTH (optional)

文件验证

验证内部文件

验证内部 PDF 文件:

validate-interior-file file_url: URL to interior PDF pod_package_id: Product SKU (optional, for normalization)
获取内部验证

检查验证状态:

get-interior-validation validation_id: ID from validate-interior-file
计算覆盖尺寸

计算所需的覆盖尺寸:

calculate-cover-dimensions pod_package_id: Product SKU page_count: Number of interior pages unit: IN | MM | PT (optional, default: PT)
验证封面文件

验证封面 PDF 文件:

validate-cover-file file_url: URL to cover PDF pod_package_id: Product SKU page_count: Number of interior pages
获取封面验证

检查封面验证状态:

get-cover-validation validation_id: ID from validate-cover-file

船运

获取运输选项

获取可用的运输选项:

get-shipping-options country_code: 2-letter ISO country code state_code: State/province code (optional) quantity: Number of items (optional) pod_package_id: Product SKU (optional) page_count: Number of pages (optional) level: Filter by specific level (optional)

Webhook

创建 webhook

创建 webhook 订阅:

create-webhook url: Webhook endpoint URL topics: Array of events (currently supports ["PRINT_JOB_STATUS_CHANGED"])
列出 webhook

列出所有 webhook 订阅:

list-webhooks
获取 webhook

获取 webhook 详细信息:

get-webhook id: Webhook ID
更新 webhook

更新 webhook:

update-webhook id: Webhook ID url: New URL (optional) topics: New topics (optional) is_active: Enable/disable (optional)
删除 webhook

删除 webhook:

delete-webhook id: Webhook ID
测试 webhook

发送测试 webhook:

test-webhook id: Webhook ID topic: PRINT_JOB_STATUS_CHANGED
列出 webhook 提交

列出 webhook 传送尝试:

list-webhook-submissions webhook_id: Filter by webhook (optional) page: Page number (optional) page_size: Results per page (optional)

Lulu 产品 SKU

Lulu 使用 27 个字符的 SKU 系统来识别产品:

格式Trim Size + Color + Print Quality + Bind + Paper + PPI + Finish + Linen + Foil

常见示例

库存单位描述
0850X1100BWSTDLW060UW444MNG8.5 英寸 x 11 英寸黑白标准亚麻布包装,配海军蓝亚麻布和金箔
0600X0900FCSTDPB080CW444GXX6 英寸 x 9 英寸全彩色标准平装本,带光面封面
0700X1000FCPRECO060UC444MXX7 英寸 x 10 英寸全彩色优质线圈装订,带哑光封面
0600X0900BWSTDPB060UW444MXX6 英寸 x 9 英寸黑白标准平装本,带哑光封面

使用Lulu 定价计算器来生成满足您特定需求的 SKU。

使用沙盒进行测试

使用Lulu沙盒环境进行测试:

  1. https://developers.sandbox.lulu.com/创建沙盒帐户
  2. 获取沙盒 API 凭证
  3. .env文件中设置LULU_USE_SANDBOX=true
  4. 或者在运行 CLI 时使用--sandbox标志: lulu-print-mcp --sandbox

在沙盒模式下:

  • 使用测试信用卡号进行付款
  • 订单不会发送到实际生产
  • 非常适合开发和测试

命令行选项

lulu-print-mcp [options] Options: -s, --sandbox Use Lulu sandbox environment instead of production -d, --debug Enable debug logging -h, --help Display help -V, --version Display version

故障排除

身份验证问题

  • 验证您的客户端密钥和密码是否正确
  • 检查您是否使用了正确的环境(生产环境与沙盒环境)
  • 确保您的 API 凭证具有必要的权限

文件验证错误

  • 确保 PDF 文件可通过 URL 公开访问
  • 检查 Lulu 文档中的文件格式要求
  • 验证页数和尺寸是否符合产品规格

网络问题

  • 检查您的互联网连接
  • 验证防火墙设置是否允许 HTTPS 连接到 api.lulu.com
  • 启用调试模式以查看详细的请求/响应日志

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

通过 Claude Desktop 和其他 MCP 客户端提供与 Lulu Print API 的集成,以实现按需打印服务,使用户能够创建和管理打印作业、验证文件、计算成本以及处理书籍和印刷材料的运输。

  1. 特征
    1. 📚 打印作业管理
    2. 📄 文件验证
    3. 💰 成本计算
    4. 🚚 运输管理
    5. 🔔 Webhook
  2. 安装
    1. 全局安装
    2. 本地开发
    3. Docker 安装
  3. 配置
    1. 获取 Lulu API 凭证
    2. 2.配置环境变量
  4. 与 Claude Desktop 一起使用
    1. 与游标一起使用
      1. 与 Windsurf 一起使用
        1. 可用工具
          1. 成本计算
          2. 打印作业管理
          3. 文件验证
          4. 船运
          5. Webhook
        2. Lulu 产品 SKU
          1. 常见示例
        3. 使用沙盒进行测试
          1. 命令行选项
            1. 故障排除
              1. 身份验证问题
              2. 文件验证错误
              3. 网络问题
            2. 贡献
              1. 执照

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  Enables interaction with 3D printer management systems through an MCP server, supporting STL file manipulation, slicing, and control of printers like OctoPrint, Klipper, Duet, and more.
                  Last updated -
                  11
                  33
                  48
                  TypeScript
                  GPL 2.0
                  • Linux
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  MCP server that integrates with Shopify API, allowing Claude Desktop users to retrieve and manipulate product information from Shopify stores.
                  Last updated -
                  5
                  Python
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  Integrates Inkdrop note-taking app with Claude AI through Model Context Protocol, allowing Claude to search, read, create, and update notes in your Inkdrop database.
                  Last updated -
                  5
                  58
                  16
                  JavaScript
                  Apache 2.0
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  An unofficial MCP server that provides an interface to access the Autumn pricing API for managing customers, entitlements, invoices, and generating billing portal links.
                  Last updated -
                  5
                  TypeScript
                  MIT License

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/devlimelabs/lulu-print-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server