MCP TemplateIO - 画像生成ツール
mcp-framework を使用して構築された Model Context Protocol (MCP) サーバー。Templated.io を使用して画像生成ツールを提供します。
概要
このテンプレートは、カスタムツールを使ったMCPサーバー構築の出発点となります。サンプルツールと、ツールの追加、開発、そしてnpmへの公開方法の説明が含まれています。このREADMEでは、独自のMCPサーバーのセットアップ、開発、そしてデプロイのプロセスをガイドします。
クイックスタート
プロジェクト構造
利用可能なツール
テンプレート画像ジェネレーター
このツールは、Templated.io API を使用して、テキストと画像の URL を指定して、テンプレートに基づいて画像を生成します。
入力パラメータ:
templateId
: 使用するTemplated.ioテンプレートのIDphotoBgImageUrl
: 「photo-bg」レイヤーに配置する画像の URL。bgYellowImageUrl
: 「bg-yellow」レイヤーに配置する画像の URL。buildText
: 「ビルド」テキスト レイヤーのテキスト コンテンツ。
ツール開発
ツール構造の例:
コンポーネントの追加
このプロジェクトsrc/tools/ExampleTool.ts
とTemplatedImageTool.ts
にサンプルツールが付属しています。CLI を使用してツールを追加することもできます。
npmへの公開
- package.json を更新します。
name
が一意であり、npm の命名規則に従っていることを確認してください。- 適切な
version
を設定する description
、author
、license
などを追加します。bin
が正しいエントリファイルを指しているか確認する
- ローカルでビルドしてテストします。
- npm にログインします (必要に応じてアカウントを作成します)。
- パッケージを公開します:
公開後、ユーザーはそれをクロードデスクトップクライアント(下記参照)に追加したり、npxで実行したりすることができます。
Claude Desktopでの使用
地域開発
この構成を Claude Desktop 構成ファイルに追加します。
MacOS : ~/Library/Application Support/Claude/claude_desktop_config.json
Windows : %APPDATA%/Claude/claude_desktop_config.json
公開後
API キーはこちらから取得できます: https://app.templated.io/api-integration?template=4ae9a86b-4ecd-44ee-aebd-7c5a49c16969
この構成を Claude Desktop 構成ファイルに追加します。
MacOS : ~/Library/Application Support/Claude/claude_desktop_config.json
Windows : %APPDATA%/Claude/claude_desktop_config.json
構築とテスト
- ツールに変更を加える
npm run build
を実行してコンパイルする- サーバーは起動時にツールを自動的に読み込みます
もっと詳しく知る
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Templated.io を使用した画像生成ツールを提供するモデル コンテキスト プロトコル サーバー。ユーザーは、テキスト レイヤーと画像レイヤーを含むテンプレートに基づいてカスタマイズされた画像を作成できます。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that provides image generation capabilities using the Ideogram API, allowing users to create images from text prompts with customizable parameters.Last updated -1973TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that enables high-quality image generation using the Flux.1 Schnell model via Together AI with customizable parameters.Last updated -1298JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables generation of high-quality images using the Flux.1 Schnell model via Together AI, allowing users to create images from text prompts with customizable dimensions.Last updated -18PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that extracts images from URLs or base64 data and converts them into a format suitable for LLM analysis, allowing AI models to process and understand visual content.Last updated -3846MIT License