Skip to main content
Glama
n416
by n416

Karakuri MCP

このプロジェクトは、AIエージェントから複数の特定APIを効率よく呼び出せるように設計された、モジュール式の MCP (Model Context Protocol) サーバー です。 「何でもできるサーバー」ではなく、必要なAPI(プラグイン)を少しずつ個別に追加し、管理できるように作られています。

📦 現在インストールされているプラグイン

現在、以下のサービスが組み込まれています。

  1. PiAPI Seedance (piapi-seedance)

    • PiAPIの seedance-2 (動画生成AI) を利用して動画を生成するプラグインです。

    • ツール: create_seedance_task, get_seedance_task

    • 利用するには .envSEEDDANCE2.0_API_KEY を設定する必要があります。

  2. File Utils (file-utils)

    • 動画ファイルなどを指定したURLからローカルの downloads/ フォルダへ自動保存する共通ツールです。

    • ツール: download_file

  3. Logger Service (logger-service)

    • すべてのツール呼び出しを mcp-audit.log に自動記録し、AIエージェント自身が過去の実行履歴を読み出せる監査ログツールです。

    • ツール: get_audit_logs


Related MCP server: Jilebi

🚀 セットアップ方法

  1. 依存関係のインストール

    npm install
  2. 環境変数の設定 プロジェクト直下に .env ファイルを作成(または .env.example をコピー)し、APIキーを設定してください。

    SEEDDANCE2.0_API_KEY=your_piapi_seedance_api_key_here
  3. ビルド TypeScriptコードをコンパイルします。

    npm run build
  4. テスト実行 同梱されているテストクライアントを使って、サーバーの動作確認が可能です。

    npx tsx test-client.ts

🛠️ プラグイン(新API)の追加方法

このサーバーは、新しいAPIを簡単に追加できる「プラガブル(着脱可能)」なアーキテクチャを採用しています。 新しいAPIを追加するには、以下の3ステップを行うだけです。

Step 1: サービスモジュールの作成

src/services/ フォルダ内に新しいディレクトリを作成し、index.ts を配置します。 (例: src/services/my-new-api/index.ts

src/types.ts で定義されている McpService インターフェースを満たすオブジェクトを作成し、エクスポートします。

import { Tool } from "@modelcontextprotocol/sdk/types.js";
import { McpService } from "../../types.js";

export const myNewApiService: McpService = {
  name: "my-new-api",
  getTools(): Tool[] {
    return [
      {
        name: "my_tool_name",
        description: "新しいツールの説明",
        inputSchema: { /* JSON Schema */ }
      }
    ];
  },
  async handleToolCall(name: string, args: any): Promise<{ content: any[]; isError?: boolean }> {
    if (name === "my_tool_name") {
      return { content: [{ type: "text", text: "Success!" }] };
    }
    throw new Error(`Unknown tool: ${name}`);
  }
};

Step 2: 環境変数の準備

新しいAPIに認証キーが必要な場合は、他のモジュールと干渉しないように独自の環境変数(例: MY_NEW_API_KEY)を .env に追加し、モジュール内でそれを利用するようにしてください。

Step 3: ルーター (src/index.ts) への登録

作成したモジュールを src/index.ts でインポートし、services 配列に追加します。

// src/index.ts
import { myNewApiService } from "./services/my-new-api/index.js";

const services: McpService[] = [
  piapiSeedanceService,
  fileUtilsService,
  loggerService,
  myNewApiService // ← これを追加するだけ!
];

これで作業は完了です! 再ビルド (npm run build) すれば、AIエージェントは自動的に新しいツールを認識し、利用できるようになります。ツールの実行履歴も自動的に logger-service によって記録されます。

Available Tools

4 tools
create_seedance_taskB

Create a video generation task using PiAPI Seedance 2.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoThe model name to use. Options: 'seedance-2' (Pro), 'seedance-2-fast', 'seedance-2-mini'. Default is 'seedance-2'.seedance-2
promptYesThe text prompt for video generation.
image_urlNoThe reference image URL (optional).
resolutionNoThe resolution (e.g. 480p, 720p, 1080p). Use 480p for lower cost.
aspect_ratioNoThe aspect ratio (e.g. 16:9, 9:16, 1:1).

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden for behavioral disclosure. The description only states the core action ('Create a task') without revealing important traits such as whether the task is asynchronous, what the return value contains, if any polling is required, or how to check status using sibling tools. This is a significant gap for a creation operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the purpose directly. It contains zero filler, no redundant details, and is appropriately concise for a one-line summary. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no output schema and no annotations, the description is notably incomplete. It fails to mention what the tool returns (e.g., a task ID), whether the operation is asynchronous, or how to relate this task to get_seedance_task. While the schema covers parameter options, the overall context—especially post-creation flow—is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already has 100% coverage: every parameter (model, prompt, image_url, resolution, aspect_ratio) includes a description. The tool description adds no additional parameter-level context, but since schema coverage is complete, the baseline of 3 applies. The description does not improve or supplement the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Create') and a specific resource ('a video generation task using PiAPI Seedance 2'). This clearly distinguishes it from sibling tools like get_seedance_task (retrieval), download_file (file retrieval), and get_audit_logs (history/audit). The purpose is unambiguous and unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb 'Create' — the agent can infer this is the tool to initiate a new video generation task. However, the description does not explicitly state when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. It provides no direct guidance on selection beyond the basic action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

download_fileA

Download a file from a URL to the local downloads directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the file to download.
filenameNoThe name of the file to save (e.g. video.mp4). If not provided, a random name will be generated.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the local downloads directory as the destination, which adds context beyond the schema. However, it does not mention side effects (e.g., whether the download is a write operation), error handling, or whether existing files are overwritten.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only two parameters and no output schema, so the description should explain what happens after the download (e.g., return value, local path). It does not mention this, leaving a gap for the agent. However, the description is still adequate for understanding the basic function.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of the parameter meanings, so the baseline is 3. The description does not add additional insight into the parameters beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific language ('Download a file from a URL to the local downloads directory') that clearly states the action, resource, and destination. This distinguishes it from sibling tools which deal with tasks and audit logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context for when to use the tool (whenever a file needs to be downloaded from a URL). There are no explicit alternatives or exclusions, but none are needed given the unrelated sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_audit_logsA

Retrieve recent execution audit logs of this MCP server. Shows who called which tool and when.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoThe maximum number of recent logs to retrieve. Default is 50.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool retrieves recent audit logs and details what the logs contain, which is useful context. However, it doesn't explicitly confirm it is read-only, define 'recent' (e.g., time window) or mention any prerequisites/rate limits. These are minor gaps given the simple nature of the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no fluff. The first sentence states the action and resource; the second clarifies the value. It is front-loaded and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (one optional parameter, no output schema). The description provides the core purpose and the kind of information returned. It doesn't define 'recent' precisely, but given the simplicity and that the schema covers the default limit, the description is sufficiently complete for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: the single optional parameter 'limit' is described in the schema with its default value. The description does not add any parameter-specific meaning, but since the schema fully covers it, a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Retrieve' and a specific resource 'execution audit logs of this MCP server', clearly distinguishing it from sibling tools (create_seedance_task, get_seedance_task, download_file) which are unrelated. It also specifies what the logs contain ('who called which tool and when'), leaving no ambiguity about its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when one needs to audit recent tool invocations ('Shows who called which tool and when'). It doesn't explicitly name alternatives, but sibling tools are clearly different, so no exclusion is needed. The context is clear enough for an agent to decide.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_seedance_taskA

Get the status and result of a PiAPI task.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID.

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The verb 'Get' implies a read-only operation, which provides some transparency, but with no annotations, the description carries the full burden. It does not mention potential errors, whether the call blocks/waits for completion, or any rate limits—significant gaps for a task-status operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One clear, single-sentence description that conveys the core purpose without any redundant words or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter getter, the description is minimally sufficient, but it lacks details about return values (e.g., expected statuses, result format) and any edge cases. Since there is no output schema, the description should have offered more context to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes task_id fully, and schema coverage is 100%. The description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Get') and a specific resource ('status and result of a PiAPI task'), making it easy to distinguish from sibling tools like create_seedance_task (creates) and download_file (downloads).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied as a way to retrieve task status/result, but there is no explicit guidance on when to use it versus alternatives, no mention of polling patterns, or exclusions. It serves as a natural follow-up to create_seedance_task, but this connection is not articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedcreate_seedance_task
    • First observeddownload_file
    • First observedget_audit_logs
    • First observedget_seedance_task

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool serves a distinct purpose: creating a video task, checking its status, downloading a file, and viewing audit logs. There is no overlap or ambiguity in their roles.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (create_seedance_task, get_seedance_task, download_file, get_audit_logs). The naming is predictable and clearly conveys each tool's function.

Tool Count5/5

With only 4 tools, the server is lean but well-scoped for its purpose: submitting a generation request, polling for results, downloading output, and auditing usage. Each tool earns its place.

Completeness4/5

The core video generation workflow is covered: create task, get task status, and download the result. Missing a list/cancel feature is a minor gap, but the primary lifecycle is complete.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A comprehensive MCP server providing secure tools for filesystem operations, Git management, web search, document conversion, npm/.NET project management, and AI generative capabilities (image/video/audio generation and processing) via PiAPI.ai integration.
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    A plugin-based MCP server that enables AI assistants to interact with external systems through custom tools, resources, and prompts.
    4
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    A hosted MCP server providing 15 media and data tools for AI agents, including web search, news, content extraction, summarization, translation, moderation, script writing, text-to-voiceover, transcription, subtitles, viral-clip discovery, and short-form video editing.
    1
    MIT