Add Mcpのロゴ

Add Mcp

コミュニティ
lploc94
add-mcp

Use when connecting an MCP server for Raw, explaining its binding, or diagnosing tools, including dashboard discovery. Select exact original names and verify live calls. Use create-package to share definitions.

概要

公開者lploc94
リポジトリraw-cli
スキル名add-mcp
スター
107
フォーク
14
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    lploc94がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Add Mcp」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/lploc94/raw-cli/tree/main/examples/skills/add_mcp
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lploc94/raw-cli.git /tmp/raw-cli
mkdir -p .claude/skills
cp -r /tmp/raw-cli/examples/skills/add_mcp .claude/skills/add-mcp
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAdd Mcpを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAdd Mcpを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Add Mcpは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Add an MCP server to Raw

Use when connecting a new MCP capability to a Raw agent or diagnosing that connection. For a how-to, explain connection schema, exact selection and verification. For an actual setup, use the requested server; creating the optional echo fixture below is not a prerequisite or a replacement for that server.

Read references/packages.md for package bindings and references/dashboard.md for browser discovery with read_file.

Establish the connection

Identify the target config/agent, server command or endpoint, authentication requirements and needed tools. Use the server's actual documentation or tools/list to get original tool names. Ask for a missing endpoint/command or required credential source rather than inventing them. For an existing server, inspect its error and definition before replacing it.

Top-level mcp.servers is a connection catalog. An agent activates only exact entries in its ordered tools.use, e.g. mcp/search/web_search. A server definition alone stays inert. Do not select mcp/server/* or substitute Raw's generated model-facing alias for the original tool name.

Connection contract

TransportRequiredOptional
stdiotransport:"stdio", nonempty string commandargs: string array; env: string-to-string map; timeout_ms
remotetransport:"streamable-http", HTTP(S) string urlheaders: string-to-string map; timeout_ms

timeout_ms (integer 1..2147483647, default the agent's request_timeout_ms) bounds connect, tool discovery and each tool call. A call whose server sends progress notifications restarts the timer on each one, so raise it only for tools that work silently for long.

Those are the two configuration transports; unknown fields fail. Stdio starts in the session cwd. Make command/script paths valid for the target machine; a relative script argument is not automatically config-relative. Stdout must carry MCP protocol messages, with logs on stderr. Unselected catalog entries do not start.

env and headers are literal values: Raw does not expand ${VAR}. A stdio server can read inherited environment variables through its own authentication mechanism. For a remote endpoint needing a header, obtain a valid private value using the supported setup; do not teach nonexistent interpolation or OAuth configuration fields.

For a remote server, place this object at mcp.servers.search; replace the placeholder URL/header, then select exact names returned by that server:

json
{ "transport": "streamable-http", "url": "https://example.test/mcp", "headers": { "Authorization": "Bearer REPLACE_IN_PRIVATE_CONFIG" } }

For example, select mcp/search/web_search only if that is a real listed name. The URL itself is not a tool ID. Keep existing agents, servers, defaults and selected tool ordering intact.

Register and verify the requested server

  1. Obtain server-specific command/arguments or URL, check executable/dependency availability, and discover the actual tools. Verify the tool's input schema before choosing test arguments.
  2. Back up the config, add one server definition, and append only requested mcp/<server>/<original-name> IDs to agents.<name>.tools.use. Keep config mode 0600. Follow the canonical/portable path actually in use.
  3. Run raw config list or raw --config PATH config list. This checks structure and selected IDs' syntax; it does not prove handshake, original tool existence or successful execution.
  4. If the installed @tlelabs/raw library is importable, call loadConfig({configPath,requireModel:false}), then createRuntimeTools({runtime,cwd}). tools.mcp.catalog contains discovered tools; tools.mcp.exposed contains selected ones; tools.warnings must be empty. Find the selected server/original name there, dispatch its alias through tools.registry.dispatch(alias,args,{cwd,maxOutputBytes:8192}), inspect the real result, and close tools.mcp in finally. This does not require a model request. Otherwise run a harmless task with the configured agent when model access is available. Report inability to verify rather than equating config parsing with a live pass.
  5. Use a harmless server-specific call. Do not perform writes, purchases or other unrelated side effects just to test the connection. Unselecting the server's tool IDs should leave the definition inert on the next startup.
  6. Add a requested policy under this agent's tools.rules, matching canonical mcp/server/tool, not the alias. Effects are allow/ask/deny, last matching rule wins, unmatched calls run. Only ask permits when on a schema-bound string path and an RE2 regex. Verify policy with harmless arguments; headless ask without approval fails closed. Policy does not sandbox the server.

The registry/schema view is fixed for a running CLI session. Editing config does not add a callable MCP alias to that same session automatically; verify the changed configuration through a fresh runtime or next run.

Optional complete stdio test fixture

Use only when the user wants a reproducible MCP smoke test without installing a real server. Save as an actual absolute echo.mjs path. It exposes echo_text over newline-delimited JSON-RPC:

js
import { createInterface } from "node:readline";
const lines = createInterface({ input: process.stdin });
for await (const line of lines) {
  let request;
  try { request = JSON.parse(line); } catch { continue; }
  if (request.id === undefined) continue;
  let result;
  if (request.method === "initialize") result = { protocolVersion: request.params?.protocolVersion ?? "2025-11-25", capabilities: { tools: {} }, serverInfo: { name: "raw-echo", version: "1.0.0" } };
  else if (request.method === "tools/list") result = { tools: [{ name: "echo_text", description: "Echo text for connection testing", inputSchema: { type: "object", properties: { text: { type: "string" } }, required: ["text"], additionalProperties: false } }] };
  else if (request.method === "tools/call" && request.params?.name === "echo_text") result = { content: [{ type: "text", text: String(request.params.arguments?.text ?? "") }] };
  else if (request.method === "ping") result = {};
  else { process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: request.id, error: { code: -32601, message: "Method not found" } }) + "\n"); continue; }
  process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id: request.id, result }) + "\n");
}

Complete config for that fixture; replace both the model ID and script path. Its MCP server needs no credentials:

json
{
  "default_agent": "research",
  "models": { "local": { "provider": "ollama", "method": "openai-chat-completions", "model_id": "YOUR_INSTALLED_MODEL", "base_url": "http://127.0.0.1:11434/v1" } },
  "mcp": { "servers": { "echo": { "transport": "stdio", "command": "node", "args": ["/absolute/path/echo.mjs"] } } },
  "agents": { "research": { "model": "local", "tools": { "use": ["builtin/read_file", "mcp/echo/echo_text"] } } }
}

With this fixture, verify a real echo_text call with {"text":"hello"} returns hello. With a different requested server, use its real tool/schema instead.

Diagnose and report

  • Spawn/handshake failure: check command/PATH, cwd, script arguments, stdout protocol and timeout_ms.
  • Unknown tool/server: check server key and actual original names, including paginated tools/list; do not guess from an alias. Raw skips an unavailable selected server or tool with a stderr warning (unknown MCP tool NAME selected from SERVER; skipped) and still starts; a server upgrade can rename or drop tools, so replace stale IDs with current names.
  • Unsupported selected schema: identify the actual schema error; an unselected unsupported tool is inert.
  • Authentication failure: check the server's real credential mechanism and literal headers/environment, not model-provider credentials.
  • Image content failure: native images need a capable model/adapter; text-only agents can use OCR tools returning text.

Raw validates selected schemas/arguments and closes connections. Selected changes may rotate the generated key once; unselected edits stay inert. Valid changes resume on the same ID. Missing historical aliases leave saved ACP views, while unavailable current selections are skipped with a warning. Report checks and prerequisites.

Raw vars do not interpolate MCP env/headers or tool arguments. Use a server's inherited environment/auth mechanism, or a local tool consuming context.vars. Executable var_providers use a separate one-request JSON protocol, not MCP.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Add Mcp」では何ができますか?

Use when connecting an MCP server for Raw, explaining its binding, or diagnosing tools, including dashboard discovery. Select exact original names and verify live calls. Use create-package to share definitions.

TypingMindでAdd Mcpを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Add Mcpはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAdd Mcpをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/lploc94/raw-cli/tree/main/examples/skills/add_mcpを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Add Mcpを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Add Mcpで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAdd Mcpを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Add Mcp」は無料ですか?

はい。lploc94がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

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

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