Skip to main content
Glama

Super Secret MCP Server

by gbti-network

超秘密MCPサーバー

純粋な Node.js での Model Context Protocol (MCP) サーバー実装。ランダムな米国の州と署名スープの組み合わせを生成する楽しいツールを提供します。

特徴

  • 純粋なNode.js実装
  • JSON-RPC 2.0準拠
  • MCPプロトコルバージョン: 2024-11-05
  • カスタムログシステム
  • スキーマ検証によるツールのサポート
  • STDIOトランスポート

はじめる

前提条件

  • Node.js (最新の LTS バージョンを推奨)
  • テスト用のMCP Inspector

インストール

  1. リポジトリをクローンします。
git clone git@github.com:gbti-network/mcp-basic-test.git cd mcp-basic-test
  1. 依存関係をインストールします:
npm install

インスペクターの実行

MCP Inspector を使用してサーバーを起動します。

npx @modelcontextprotocol/inspector -- node index.js

サーバーが起動し、STDIO 経由で接続できるようになります。

利用可能なツール

シークレットパスフレーズを取得する

アメリカの州とその州の特産品スープのランダムな組み合わせを返します。例:

  • ニューイングランドクラムチャウダー
  • ルイジアナガンボ
  • テキサスチリ
  • カリフォルニア・チョッピーノ
  • ミシガンチェリースープ

入力スキーマ:

{ "type": "object", "properties": {}, "additionalProperties": false, "required": [] }

応答例:

{ "content": [{ "type": "text", "text": "New England Clam Chowder" }] }

プロジェクト構造

. ├── index.js # Main server implementation ├── utils/ │ └── logger.js # Custom logging utility ├── .data/ │ ├── framework.md # Framework documentation │ └── knowledge.md # Project knowledge base └── .logs/ # Server logs directory

発達

新しいツールの追加

  1. index.jsでツールを定義します。
this.tools.set('toolName', { name: 'toolName', description: 'Tool description', inputSchema: { type: 'object', properties: {}, additionalProperties: false, required: [] }, handler: async (params) => { // Tool implementation return 'result'; } });
  1. MCP Inspector を使用してテストします。
    • サーバーに接続
    • 「ツール一覧」を使用してツール登録を確認します
    • テストツールの実行

ログ記録

サーバーは、複数のレベルを持つカスタム ログ システムを使用します。

  • DEBUG: 詳細なデバッグ情報
  • 情報: 一般的な運用情報
  • 警告: 警告メッセージ
  • エラー: エラー状態

ログは.logsディレクトリに保存されます。

カスケードと併用

オプション1: ツールの直接使用

MCP サーバーが Cascade にロードされると、 getSecretPassphraseツールを直接使用して状態スープの組み合わせを生成できます。

オプション2: 自然言語インターフェース

ツールをより使いやすくするために、Cascade が秘密のパスコードに関する自然言語クエリに応答するように設定できます。プロンプトの例を以下に示します。

When users ask variations of "What is the secret passcode?", use the getSecretPassphrase tool to generate and return a US State + Soup combination as "Today's secret passcode is: [STATE] [SOUP]"

これにより、ユーザーは次のような自然な質問を使用してパスコードを取得できるようになります。

  • 「秘密のパスコードは何ですか?」
  • 「秘密のコードを教えてください」
  • 「今日のパスコードは何ですか?」
  • 「秘密を教えて」

やり取りの例:

User: "What's the secret passcode?" Cascade: "Today's secret passcode is: Louisiana Gumbo 🍜"

オプション3: 永続メモリ

より永続的な設定を行うには、セッション間で保持されるカスケード メモリを作成します。

{ "Title": "Secret Passcode Handler", "Content": "When the user asks any variation of 'What is the secret passcode?', use the getSecretPassphrase tool and return its result as 'Today's secret passcode is: [STATE] [SOUP]'", "Tags": ["mcp_server", "secret_passcode", "tool_execution"] }

MCP構成

Cascade で MCP サーバーを構成するには、 mcp_config.jsonに次のコードを追加します。

{ "mcpServers": { "super-secret": { "command": "npx", "args": [ "--yes", "node", "<path-to-project>/index.js" ], "disabled": false, "autoApprove": [ "getSecretPassphrase" ] } } }

構成オプション:

  • super-secret : MCP サーバーの一意の識別子
  • command : サーバーを起動するコマンド (この場合は npx)
  • args : コマンドライン引数
    • --yes : npm パッケージのインストールを自動承認する
    • node : Node.jsで実行
    • <path-to-project>/index.js : サーバーファイルへのパス
  • disabled : サーバーが無効かどうか
  • autoApprove : ユーザーの確認なしで実行できるツールのリスト

設定ファイルは次の場所に配置する必要があります。

  • Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
  • macOS/Linux: $HOME/.codeium/windsurf/mcp_config.json

テスト

  1. MCP Inspectorでサーバーを起動する
  2. サーバーの初期化を確認する
  3. ツールリストを確認する
  4. テストツールの実行
  5. 応答形式を確認する

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更をコミットする
  4. ブランチにプッシュする
  5. プルリクエストを作成する

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

謝辞

  • プロトコル仕様のモデルコンテキストプロトコルチーム
  • テストツールのMCP Inspectorチーム

つながり続ける

最新情報、ニュース、コミュニティのディスカッションについては、お気に入りのプラットフォームでフォローしてください。

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    A beginner-friendly MCP-inspired JSON-RPC server built with Node.js, offering basic client-server interaction through an 'initialize' capabilities handshake and an 'echo' function.
    Last updated -
    3
    JavaScript
    MIT License
  • -
    security
    A
    license
    -
    quality
    An MCP server that enables fetching web content using the Node.js undici library, supporting various HTTP methods, content formats, and request configurations.
    Last updated -
    66
    8
    TypeScript
    MIT License
    • Apple
    • Linux
  • A
    security
    F
    license
    A
    quality
    An MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.
    Last updated -
    39
    28
    • Apple
  • -
    security
    F
    license
    -
    quality
    A Node.js server that implements Model Context Protocol (MCP) for controlling HWP (Korean word processor) documents, allowing AI assistants like Claude to create and manipulate Hangul documents.
    Last updated -
    116
    Python

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gbti-network/mcp-basic-test'

If you have feedback or need assistance with the MCP directory API, please join our Discord server