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 知识库管理系统交互的标准化接口。
建筑学
系统概述
Copy
组件详细信息
1.客户端应用层
- 实现 MCP 客户端协议
- 处理请求格式
- 管理响应解析
- 提供错误处理
2. MCP 服务器层
- 协议处理程序
- 管理 MCP 协议通信
- 处理客户端连接
- 将请求路由到适当的工具
- 工具实现
- 知识库管理工具
- 参数验证
- 响应格式
- 错误处理
- API 集成
- Smallest.ai API 通信
- 身份验证管理
- 请求/响应处理
3. Smallest.ai API层
- 知识库管理
- 数据存储和检索
- 身份验证和授权
数据流
Copy
安全架构
Copy
概述
该项目实现了一个 MCP 服务器,作为客户端和 Smallest.ai API 之间的中间件。它提供了一种通过模型上下文协议 (MCP) 与 Smallest.ai 知识库管理功能进行交互的标准化方式。
建筑学
Copy
成分
- MCP 服务器
- 处理客户端请求
- 管理 API 通信
- 提供标准化的响应
- 实现错误处理
- 知识库工具
listKnowledgeBases
:列出所有知识库createKnowledgeBase
:创建新的知识库getKnowledgeBase
:检索特定知识库详细信息
- 文档资源
- 可在
docs://smallest.ai
获取 - 提供使用说明和示例
- 可在
先决条件
- Node.js 18+ 或 Bun 运行时
- Smallest.ai API 密钥
- TypeScript 知识
安装
- 克隆存储库:
Copy
- 安装依赖项:
Copy
- 在根目录中创建一个
.env
文件:
Copy
配置
使用 Smallest.ai API 配置创建一个config.ts
文件:
Copy
用法
启动服务器
Copy
测试服务器
Copy
可用工具
- 列出知识库
Copy
- 创建知识库
Copy
- 获取知识库
Copy
响应格式
所有回复都遵循以下结构:
Copy
错误处理
服务器实现了全面的错误处理:
- HTTP 错误
- API 错误
- 参数验证错误
- 类型安全的错误响应
发展
项目结构
Copy
添加新工具
- 在
index.ts
中定义该工具:
Copy
- 更新资源中的文档:
Copy
安全
- API 密钥存储在环境变量中
- 所有请求都经过身份验证
- 参数验证已实现
- 错误消息已净化
贡献
- 分叉存储库
- 创建你的功能分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add some amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
Related MCP Servers
- AsecurityFlicenseAqualityA 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 -2514
- -securityFlicense-qualityA 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 -19TypeScript
- -securityFlicense-qualityA 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 -462Python
- -securityFlicense-qualityA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated -Python