The MCP-Smallest.ai server acts as middleware for interacting with Smallest.ai's knowledge base management system through the Model Context Protocol. It provides:
- List Knowledge Bases: Retrieve a list of all available knowledge bases
- Create Knowledge Base: Create a new knowledge base by providing a name and description
- Get Knowledge Base: Retrieve details of a specific knowledge base by its ID
- Standardized Interface: Ensures consistent communication with the Smallest.ai API
- Validation and Error Handling: Manages parameter validation and error responses
- MCP Protocol Support: Handles protocol communication and routes client requests
Documentation is available via docs://smallest.ai
Supports running the MCP server on the Bun runtime, providing an alternative execution environment to Node.js for the server implementation.
Utilizes environment variables for configuration management, specifically for storing the Smallest.ai API key securely.
Hosts project repository and provides version control, allowing for collaborative development and contribution to the MCP server.
Integrates with Smallest.ai's knowledge base management system, providing tools for listing, creating, and retrieving knowledge bases through the Smallest.ai API.
Supports running the MCP server on Node.js 18+, providing the required runtime environment for server execution.
Uses TypeScript for implementation, providing type-safe development of the MCP server and its integration with Smallest.ai.
MCP-Smallest.ai
A Model Context Protocol (MCP) server implementation for Smallest.ai API integration. This project provides a standardized interface for interacting with Smallest.ai's knowledge base management system.
Architecture
System Overview
Component Details
1. Client Application Layer
- Implements MCP client protocol
- Handles request formatting
- Manages response parsing
- Provides error handling
2. MCP Server Layer
- Protocol Handler
- Manages MCP protocol communication
- Handles client connections
- Routes requests to appropriate tools
- Tool Implementation
- Knowledge base management tools
- Parameter validation
- Response formatting
- Error handling
- API Integration
- Smallest.ai API communication
- Authentication management
- Request/response handling
3. Smallest.ai API Layer
- Knowledge base management
- Data storage and retrieval
- Authentication and authorization
Data Flow
Security Architecture
Overview
This project implements an MCP server that acts as a middleware between clients and the Smallest.ai API. It provides a standardized way to interact with Smallest.ai's knowledge base management features through the Model Context Protocol.
Architecture
Components
- MCP Server
- Handles client requests
- Manages API communication
- Provides standardized responses
- Implements error handling
- Knowledge Base Tools
listKnowledgeBases
: Lists all knowledge basescreateKnowledgeBase
: Creates new knowledge basesgetKnowledgeBase
: Retrieves specific knowledge base details
- Documentation Resource
- Available at
docs://smallest.ai
- Provides usage instructions and examples
- Available at
Prerequisites
- Node.js 18+ or Bun runtime
- Smallest.ai API key
- TypeScript knowledge
Installation
- Clone the repository:
- Install dependencies:
- Create a
.env
file in the root directory:
Configuration
Create a config.ts
file with your Smallest.ai API configuration:
Usage
Starting the Server
Testing the Server
Available Tools
- List Knowledge Bases
- Create Knowledge Base
- Get Knowledge Base
Response Format
All responses follow this structure:
Error Handling
The server implements comprehensive error handling:
- HTTP errors
- API errors
- Parameter validation errors
- Type-safe error responses
Development
Project Structure
Adding New Tools
- Define the tool in
index.ts
:
- Update documentation in the resource:
Security
- API keys are stored in environment variables
- All requests are authenticated
- Parameter validation is implemented
- Error messages are sanitized
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server implementation that provides a standardized interface for interacting with Smallest.ai's knowledge base management system.
Related MCP Servers
- AsecurityAlicenseAqualityThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.Last updated -1351MIT License
- -securityFlicense-qualityA 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 -61TypeScript
- -securityAlicense-qualityA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.Last updated -27TypeScriptMIT License
- -securityFlicense-qualityA basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.Last updated -Python