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
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
You must be authenticated.
A Model Context Protocol server implementation that provides a standardized interface for interacting with Smallest.ai's knowledge base management system.
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