Skip to main content
Glama

영상

MCP-Smallest.ai

Smallest.ai API 통합을 위한 모델 컨텍스트 프로토콜(MCP) 서버 구현입니다. 이 프로젝트는 Smallest.ai의 지식 기반 관리 시스템과 상호 작용하기 위한 표준화된 인터페이스를 제공합니다.

건축학

시스템 개요

제목없음-2025-03-21-0340(6)

지엑스피1

구성 요소 세부 정보

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 서버를 구현합니다. Model Context Protocol을 통해 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 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

감사의 말

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

Related MCP Servers

  • -
    security
    F
    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 -
    5
    2
  • -
    security
    A
    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 -
    1
    11
    MIT License
  • -
    security
    F
    license
    -
    quality
    A basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.
    Last updated -
  • -
    security
    F
    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