TepraMCP
Enables printing labels on King Jim Tepra PRO SR5900P over Wi-Fi/LAN, supporting Japanese text, QR codes, and images through natural language.
README
TepraMCP
キングジムのラベルプリンター 「テプラ」PRO SR5900P を Wi-Fi/LAN 経由で操作する MCP サーバーです。 Claude などの MCP クライアントから、日本語テキスト・QRコード・画像を載せたラベルを直接印刷できます。
tepra_discover … ネットワーク上のテプラを探す
tepra_status … 電源・カバー・装着テープ幅を確認
tepra_preview … 印刷せずにラベル画像を返す(テープを無駄にしない)
tepra_print … 実際に印刷する
動作原理
SR5900P は UDP/9100 を制御チャネル、TCP/9100 をラスターデータの転送に使う独自プロトコルを話します。 本実装はその解析結果(Mine02C4 / hikalium/sr5900p)に基づく 非公式 の再実装です。 公式ドライバやテプラクリエイターのインストールは不要ですが、本体ファームウェアの更新で 動かなくなる可能性がある点はご承知おきください。
印刷解像度は 360dpi。ラベルは 1bpp に二値化され、テープ送り方向に 1 列ずつ転送されます。
セットアップ
npm install && npm run build
MCP クライアントの設定に追加します(claude_desktop_config.json や .mcp.json):
{
"mcpServers": {
"tepra": {
"command": "node",
"args": ["C:/Users/swmr7/Documents/GitHub/TepraMCP/dist/index.js"],
"env": {
"TEPRA_PRINTER_IP": "192.168.1.50"
}
}
}
}
TEPRA_PRINTER_IP を設定しておくと毎回 IP を指定せずに済みます。未設定の場合は各ツールの
printer 引数で渡すか、まず tepra_discover で探してください。
環境変数
| 変数 | 用途 |
|---|---|
TEPRA_PRINTER_IP |
プリンターの IP アドレス(既定値) |
TEPRA_FONT |
使用フォントの CSS スタック。未設定ならシステムの日本語フォントを自動選択 |
TEPRA_FONT_DIR |
日本語フォントを持たない環境(コンテナ等)でフォントを読み込むディレクトリ |
使い方
自然言語で頼めば十分です。
「会議室A / 3F 北側」って2行のラベルを18mmテープで印刷して
このURLのQRコード付きラベルをプレビューして
ラベルの指定項目
| 引数 | 説明 |
|---|---|
text |
行の配列。テープ幅いっぱいになるよう自動で文字サイズを決定 |
qr |
左端に置く QR コードの内容 |
imagePath / imageBase64 |
貼り込む PNG/JPEG |
tapeWidthMm |
4/6/9/12/18/24/36。省略時はプリンターから自動検出 |
lengthMm / minLengthMm |
ラベル長の固定/最低長の指定 |
align |
ラベルに余白がある場合の寄せ方向 |
marginMm |
前後の余白(既定 2mm) |
bold |
太字(既定 true) |
halfCut |
ハーフカット(tepra_print のみ、既定 true) |
copies |
同一ラベルの連続印刷枚数(tepra_print のみ) |
制限
- 印刷は 1 行レイアウト([QR][画像][テキスト])に固定です。枠線や複雑な組版は未対応。
- テープカートリッジの色は判別しません(プリンターが幅しか返さないため)。
tepra_discoverは mDNS を使うため、プリンターと同一サブネットにいる必要があります。
ライセンス
Apache-2.0
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.