Printer AI MCPのロゴ

Printer AI MCP

コミュニティ
NullYing

A cross-platform printer AI MCP server that supports Windows, macOS, and Linux systems, providing printer management, status queries, and file printing capabilities.

公開者NullYing
リポジトリPrinter-AI-MCP
言語Python
フォーク
3
スター
14
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    Printer AI MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには14件のスターと3件のフォークがあります。

Printer AI MCP

中文文档

A cross-platform printer AI MCP server that supports Windows, macOS, and Linux systems, providing printer management, status queries, and file printing capabilities.

Features

  • 🌍 Cross-platform Support: Windows, macOS, Linux
  • 🖨️ Printer Management: Get printer list, status queries
  • 📄 File Printing: Support multiple file format printing
  • 🔧 Printer Attributes: Get detailed printer configuration information
  • 📊 Task Management: Print job status queries and cancellation
  • 🚀 MCP Protocol: Built on FastMCP, supports AI assistant integration

System Requirements

  • Python 3.10+
  • Windows: Recommended Windows 10 or above
  • macOS/Linux: CUPS support

Installation

Using uv Installation

bash
# Clone the project
git clone https://github.com/NullYing/printer-ai-mcp.git
cd printer-ai-mcp

# Install dependencies
uv sync

Using Docker

bash
docker compose up -d

Usage

Start MCP Server

bash
python main.py

Available MCP Tools

1. Get Printer List

python
get_printer_list() -> dict

Returns a list of all available printers in the system.

2. Get Printer Status

python
printer_status(index: int = None) -> dict

Gets the status information of the specified printer. If no index is specified, returns the default printer status.

3. Get Printer Attributes

python
printer_attrs(index: int = None) -> dict

Gets detailed configuration attributes of the printer (macOS/Linux only).

4. Print File

python
print_file(index: int = None, file_path: str = None, options: dict = None) -> dict

Prints files using the specified printer. Supports custom print options.

Parameters:

  • index: Printer index (1-based). If None, uses the default printer
  • file_path: Path to the file to print
  • options: Print options dict (optional), format differs by platform:

Windows uses Device Mode (DEVMODE) parameters with dm prefix:

json
{
    "dmCopies": 2,
    "dmOrientation": 1,
    "dmColor": 2,
    "dmPaperSize": 9,
    "dmDuplex": 1,
    "dmDefaultSource": 7,
    "dmMediaType": 0,
    "dmPrintQuality": -4,
    "dmCollate": 1
}
OptionTypeDescription
dmCopiesintNumber of copies
dmOrientationint1 = Portrait, 2 = Landscape
dmColorint1 = Monochrome, 2 = Color
dmPaperSizeintPaper size constant (1 = Letter, 5 = Legal, 8 = A3, 9 = A4, 11 = A5)
dmDuplexint1 = Simplex, 2 = Long Edge, 3 = Short Edge
dmDefaultSourceintPaper source / bin
dmMediaTypeintMedia type
dmPrintQualityintPrint quality (-4 = Default, positive values = DPI)
dmCollateint1 = Collate, 0 = No collate

Linux and macOS use CUPS with IPP standard options:

json
{
    "copies": "2",
    "media": "A4",
    "orientation_requested": "3",
    "print_color_mode": "color",
    "sides": "one-sided",
    "print_quality": "4",
    "page_ranges": "1-5,10-15",
    "number_up": "1"
}
OptionTypeDescription
copiesstrNumber of copies
mediastrPaper size (e.g., A4, Letter, Legal)
orientation_requestedstr3 = Portrait, 4 = Landscape
print_color_modestrmonochrome or color
sidesstrone-sided, two-sided-long-edge, two-sided-short-edge
print_qualitystr3 = Draft, 4 = Normal, 5 = High
page_rangesstrPage ranges (e.g., 1-5,10-15)
number_upstrPages per sheet

API Response Format

All APIs return responses in a unified format:

json
{
  "code": 200,
  "msg": "success",
  "data": {
    // Specific data content
  }
}

Configuration

MCP Configuration Example

Add to your MCP configuration file:

json
{
  "mcpServers": {
    "printerAIMcp": {
      "url": "http://127.0.0.1:8000/mcp",
      "headers": {}
    }
  }
}

Development

Project Structure

printer-ai-mcp/
├── main.py                 # MCP server main file
├── local_printer/          # Local printer module
│   ├── __init__.py
│   ├── cups.py            # macOS/Linux CUPS support
│   └── windows.py         # Windows printer support
├── network_printer/       # Network printer module (to be developed)
│   └── __init__.py
├── Dockerfile             # Docker image build file
├── docker-compose.yml     # Docker Compose deployment config
├── pyproject.toml         # Project configuration
└── README.md              # Project documentation

Contributing

We welcome contributions from the community! Here are several ways you can help:

  • ⭐ Star this repository to show your support and help others discover this project
  • 🐛 Report bugs by opening an issue with detailed information about the problem
  • 💡 Suggest new features or improvements through GitHub issues
  • 🔧 Submit pull requests to fix bugs or add new functionality
  • 📖 Improve documentation to help other users understand the project better
  • 🧪 Test on different platforms and report compatibility issues

Your contributions help make this project better for everyone. Thank you for your support!

License

MIT License

See Also

Printer AI Skills

If you prefer a CLI + AI Skill approach instead of running an MCP server, check out printer-ai-skills. It provides a standalone printer-ai CLI tool that AI assistants (OpenClaw / Cursor / Claude) can drive directly through SKILL.md — no server process needed. Same cross-platform printing capabilities, lighter deployment.

Related Links

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "nullying-printer-ai-mcp": {
      "command": "",
      "args": []
    }
  }
}

Printer AI MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Printer AI MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Printer AI MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Printer AI MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "nullying-printer-ai-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "printer-ai-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてPrinter AI MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Printer AI MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Printer AI MCPを使ってこのタスクを手伝ってもらえますか?
Printer AI MCP
はい、読みました。
Printer AI MCPで調べた結果をお伝えします。

よくある質問

Printer AI MCP MCPサーバーは何に使いますか?

Printer AI MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでPrinter AI MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでPrinter AI MCPを利用できます。

TypingMindでPrinter AI MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Printer AI MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Printer AI MCP MCPをTypingMindに接続するにはどうすればよいですか?

Printer AI MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでPrinter AI MCP MCPのどのようなツールを利用できますか?

Printer AI MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Printer AI MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Printer AI MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇