Brightsy MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows forwarding requests to an Brightsy AI agent using an OpenAI-compatible format, enabling interaction with the agent through a standardized messages array with role and content properties.

Brightsy MCP サーバー

これは、Brightsy AI エージェントに接続するモデル コンテキスト プロトコル (MCP) サーバーです。

インストール

npm install

使用法

サーバーを起動するには:

npm start -- --agent-id=<your-agent-id> --api-key=<your-api-key>

または位置引数を使用する場合:

npm start -- <your-agent-id> <your-api-key> [tool-name] [message]

エージェントに送信する初期メッセージを指定することもできます。

npm start -- --agent-id=<your-agent-id> --api-key=<your-api-key> --message="Hello, agent!"

ツール名のカスタマイズ

デフォルトでは、MCPサーバーは「brightsy」という名前のツールを登録します。この名前は--tool-nameパラメータを使用してカスタマイズできます。

npm start -- --agent-id=<your-agent-id> --api-key=<your-api-key> --tool-name=<custom-tool-name>

ツール名を 3 番目の位置引数として設定することもできます。

npm start -- <your-agent-id> <your-api-key> <custom-tool-name>

または、 BRIGHTSY_TOOL_NAME環境変数を使用します。

export BRIGHTSY_TOOL_NAME=custom-tool-name npm start -- --agent-id=<your-agent-id> --api-key=<your-api-key>

環境変数

サーバーを構成するために、次の環境変数を使用できます。

  • BRIGHTSY_AGENT_ID : 使用するエージェントID(コマンドライン引数の代替)
  • BRIGHTSY_API_KEY : 使用する API キー (コマンドライン引数の代替)
  • BRIGHTSY_TOOL_NAME : 登録するツール名(デフォルト: "brightsy")

agent_proxyツールのテスト

agent_proxyツールを使用すると、Brightsy AIエージェントへのリクエストをプロキシできます。このツールをテストするには、提供されているテストスクリプトを使用してください。

前提条件

テストを実行する前に、次の環境変数を設定します。

export AGENT_ID=your-agent-id export API_KEY=your-api-key # Optional: customize the tool name for testing export TOOL_NAME=custom-tool-name

あるいは、次の値をコマンドライン引数として渡すこともできます。

# Using named arguments npm run test:cli -- --agent-id=your-agent-id --api-key=your-api-key --tool-name=custom-tool-name # Using positional arguments npm run test:cli -- your-agent-id your-api-key custom-tool-name

テストの実行

すべてのテストを実行するには:

npm test

特定のテストを実行するには:

# Test using the command line interface npm run test:cli # Test using the direct MCP protocol npm run test:direct

テストスクリプト

  1. コマンドライン テスト( test-agent-proxy.ts ): テスト メッセージを使用して MCP サーバーを実行し、agent_proxy ツールをテストします。
  2. 直接 MCP プロトコル テスト( test-direct.ts ): 適切にフォーマットされた MCP 要求をサーバーに直接送信して、agent_proxy ツールをテストします。

ツールの仕組み

MCPサーバーは、OpenAI互換のAIエージェントにリクエストを転送し、レスポンスを返すツール(デフォルトでは「brightsy」という名前)を登録します。このツールは、 rolecontentプロパティを持つメッセージオブジェクトの配列であるmessagesパラメータを受け取ります。

MCP クライアントでの使用例:

// Using the default tool name const response = await client.callTool("brightsy", { messages: [ { role: "user", content: "Hello, can you help me with a simple task?" } ] }); // Or using a custom tool name if configured const response = await client.callTool("custom-tool-name", { messages: [ { role: "user", content: "Hello, can you help me with a simple task?" } ] });

応答にはcontentフィールドにエージェントの返信が含まれます。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

モデル コンテキスト プロトコルを実装して LLM を Brightsy AI エージェントに接続し、ユーザーがこれらのエージェントにメッセージを渡したり、エージェントからの応答を受け取ったりできるようにするサーバー。

  1. Installation
    1. Usage
      1. Customizing the Tool Name
      2. Environment Variables
    2. Testing the agent_proxy Tool
      1. Prerequisites
      2. Running the Tests
      3. Test Scripts
    3. How the Tool Works
      ID: 9u6g2y8vk6