MCP-Smallest.ai

Integrations

  • Utilizes environment variables for configuration management, specifically for storing the Smallest.ai API key securely.

  • Supports running the MCP server on the Bun runtime, providing an alternative execution environment to Node.js for the server implementation.

  • Hosts project repository and provides version control, allowing for collaborative development and contribution to the MCP server.

MCP-Smallest.ai

Smallest.ai API統合のためのモデルコンテキストプロトコル(MCP)サーバー実装。このプロジェクトは、Smallest.aiのナレッジベース管理システムと連携するための標準化されたインターフェースを提供します。

建築

システムの概要

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ │ │ │ │ Client App │◄────┤ MCP Server │◄────┤ Smallest.ai │ │ │ │ │ │ API │ └─────────────────┘ └─────────────────┘ └─────────────────┘

コンポーネントの詳細

1. クライアントアプリケーション層
  • MCPクライアントプロトコルを実装
  • リクエストのフォーマットを処理する
  • レスポンス解析を管理する
  • エラー処理を提供します
2. MCPサーバー層
  • プロトコルハンドラー
    • MCPプロトコル通信を管理する
    • クライアント接続を処理する
    • リクエストを適切なツールにルーティングします
  • ツールの実装
    • ナレッジベース管理ツール
    • パラメータ検証
    • 応答のフォーマット
    • エラー処理
  • API統合
    • Smallest.ai API通信
    • 認証管理
    • リクエスト/レスポンス処理
3. Smallest.ai APIレイヤー
  • ナレッジベース管理
  • データの保存と検索
  • 認証と承認

データフロー

1. Client Request └─► MCP Protocol Validation └─► Tool Parameter Validation └─► API Request Formation └─► Smallest.ai API Call └─► Response Processing └─► Client Response

セキュリティアーキテクチャ

┌─────────────────┐ │ Client Auth │ └────────┬────────┘ │ ┌────────▼────────┐ │ MCP Validation │ └────────┬────────┘ │ ┌────────▼────────┐ │ API Auth │ └────────┬────────┘ │ ┌────────▼────────┐ │ Smallest.ai │ └─────────────────┘

概要

このプロジェクトは、クライアントとSmallest.ai API間のミドルウェアとして機能するMCPサーバーを実装します。モデルコンテキストプロトコル(MCP)を介してSmallest.aiのナレッジベース管理機能とやり取りするための標準化された方法を提供します。

建築

[Client Application] <---> [MCP Server] <---> [Smallest.ai API]

コンポーネント

  1. MCPサーバー
    • クライアントのリクエストを処理する
    • API通信を管理する
    • 標準化された応答を提供する
    • エラー処理を実装する
  2. ナレッジベースツール
    • listKnowledgeBases : すべてのナレッジベースを一覧表示します
    • createKnowledgeBase : 新しいナレッジベースを作成する
    • getKnowledgeBase : 特定のナレッジベースの詳細を取得します
  3. ドキュメントリソース
    • docs://smallest.aiで入手可能
    • 使用方法と例を示します

前提条件

  • Node.js 18+ または Bun ランタイム
  • Smallest.ai APIキー
  • TypeScriptの知識

インストール

  1. リポジトリをクローンします。
git clone https://github.com/yourusername/MCP-smallest.ai.git cd MCP-smallest.ai
  1. 依存関係をインストールします:
bun install
  1. ルート ディレクトリに.envファイルを作成します。
SMALLEST_AI_API_KEY=your_api_key_here

構成

Smallest.ai API 構成を含むconfig.tsファイルを作成します。

export const config = { API_KEY: process.env.SMALLEST_AI_API_KEY, BASE_URL: 'https://atoms-api.smallest.ai/api/v1' };

使用法

サーバーの起動

bun run index.ts

サーバーのテスト

bun run test-client.ts

利用可能なツール

  1. ナレッジベースのリスト
await client.callTool({ name: "listKnowledgeBases", arguments: {} });
  1. ナレッジベースを作成する
await client.callTool({ name: "createKnowledgeBase", arguments: { name: "My Knowledge Base", description: "Description of the knowledge base" } });
  1. ナレッジベースを入手
await client.callTool({ name: "getKnowledgeBase", arguments: { id: "knowledge_base_id" } });

応答フォーマット

すべての応答は次の構造に従います。

{ content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }

エラー処理

サーバーは包括的なエラー処理を実装します。

  • HTTPエラー
  • APIエラー
  • パラメータ検証エラー
  • 型安全なエラー応答

発達

プロジェクト構造

MCP-smallest.ai/ ├── index.ts # MCP server implementation ├── test-client.ts # Test client implementation ├── config.ts # Configuration file ├── package.json # Project dependencies ├── tsconfig.json # TypeScript configuration └── README.md # This file

新しいツールの追加

  1. index.tsでツールを定義します。
server.tool( "toolName", { param1: z.string(), param2: z.number() }, async (args) => { // Implementation } );
  1. リソース内のドキュメントを更新します。
server.resource( "documentation", "docs://smallest.ai", async (uri) => ({ contents: [{ uri: uri.href, text: `Updated documentation...` }] }) );

安全

  • APIキーは環境変数に保存されます
  • すべてのリクエストは認証されます
  • パラメータ検証が実装されています
  • エラーメッセージはサニタイズされる

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く

ライセンス

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

謝辞

You must be authenticated.

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

Smallest.ai のナレッジ ベース管理システムと対話するための標準化されたインターフェイスを提供するモデル コンテキスト プロトコル サーバー実装。

  1. 建築
    1. システムの概要
    2. コンポーネントの詳細
    3. データフロー
    4. セキュリティアーキテクチャ
  2. 概要
    1. 建築
      1. コンポーネント
    2. 前提条件
      1. インストール
        1. 構成
          1. 使用法
            1. サーバーの起動
            2. サーバーのテスト
            3. 利用可能なツール
          2. 応答フォーマット
            1. エラー処理
              1. 発達
                1. プロジェクト構造
                2. 新しいツールの追加
              2. 安全
                1. 貢献
                  1. ライセンス
                    1. 謝辞

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        A Model Context Protocol server that enables AI models to interact with SourceSync.ai's knowledge management platform for managing documents, ingesting content from various sources, and performing semantic searches.
                        Last updated -
                        25
                        14
                        • Apple
                        • Linux
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A Model Context Protocol server that provides AI assistants with structured access to your Logseq knowledge graph, enabling retrieval, searching, analysis, and creation of content within your personal knowledge base.
                        Last updated -
                        19
                        TypeScript
                        • Apple
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
                        Last updated -
                        46
                        2
                        Python
                        • Linux
                        • Apple
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.
                        Last updated -
                        Python
                        • Linux
                        • Apple

                      View all related MCP servers

                      ID: gens081rtr