Skip to main content
Glama

画像

MCP-Smallest.ai

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

建築

システムの概要

無題-2025-03-21-0340(6)

┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ │ │ │ │ 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ファイルを参照してください。

謝辞

Deploy Server
A
security – no known vulnerabilities
-
license - not tested
A
quality - confirmed to work

Related MCP Servers

  • -
    security
    -
    license
    -
    quality
    A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
    Last updated -
    36
    1
  • -
    security
    -
    license
    -
    quality
    A server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.
    Last updated -
    0
    10
    MIT License
  • -
    security
    -
    license
    -
    quality
    A basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.
    Last updated -
  • -
    security
    -
    license
    -
    quality
    A Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.
    Last updated -
    2

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/VinayakTiwari1103/MCP-smallest-ai'

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