{"type":"mcp_server","name":"klavis","description":"**Option 1 (Focus on integration):**\n\nOpen Source MCP integration library for AI apps. (Klavis AI)\n\n**Option 2 (Focus on context):**\n\nKlavis AI's Open Source MCP: Context management for AI application","category":"AI","language":"Python","stars":5775,"forks":284,"owner":"Klavis-AI","github_url":"https://github.com/Klavis-AI/klavis","homepage":"https://www.klavis.ai/","setup":"## Setup\n\n### Prerequisites\n\n*   **Python:** Ensure you have Python 3.7 or higher installed.\n*   **Node.js and npm:** Required for TypeScript/JavaScript development.  Install Node.js from [https://nodejs.org/](https://nodejs.org/).\n\n### Installation\n\n**Python**\n\n```bash\npip install klavis\n```\n\n**TypeScript/JavaScript**\n\n```bash\nnpm install klavis\n```\n\n### Configuration\n\n1.  **Get Your API Key:** Sign up at [klavis.ai](https://www.klavis.ai) and create your [API key](https://www.klavis.ai/home/api-keys). This API key is essential for authenticating your requests to the Klavis AI platform.\n\n2.  **Environment Variables (Optional but Recommended):** While you can directly embed your API key in your code (as shown in the examples), it's best practice to store it as an environment variable. This prevents accidental exposure of your key.\n\n    *   **Example (Python):**\n\n        ```python\n        import os\n        from klavis import Klavis\n\n        klavis_client = Klavis(api_key=os.environ.get(\"KLAVIS_API_KEY\"))\n        ```\n\n    *   **Example (TypeScript/JavaScript):**\n\n        ```typescript\n        const klavisClient = new KlavisClient({ apiKey: process.env.KLAVIS_API_KEY });\n        ```\n\n    *   **Setting Environment Variables:**  The method for setting environment variables depends on your operating system and environment.  Here are a few common ways:\n\n        *   **Linux/macOS:**  Add the following line to your `.bashrc`, `.zshrc`, or equivalent shell configuration file:\n\n            ```bash\n            export KLAVIS_API_KEY=\"your-klavis-api-key\"\n            ```\n\n            Then, source the file (e.g., `source ~/.bashrc`) or restart your terminal.\n\n        *   **Windows:**  Use the `setx` command in the command prompt (run as administrator):\n\n            ```\n            setx KLAVIS_API_KEY \"your-klavis-api-key\" /M\n            ```\n\n            The `/M` flag sets the variable at the system level, requiring administrator privileges.  You'll need to restart your command prompt for the changes to take effect.  Alternatively, you can set user-level environment variables through the System Properties dialog (search for \"environment variables\" in the Windows search bar).\n\n        *   **`.env` files (for development):**  For local development, you can use a `.env` file along with a library like `python-dotenv` (Python) or `dotenv` (Node.js) to load environment variables from a file.\n\n            *   **Python:**\n\n                ```bash\n                pip install python-dotenv\n                ```\n\n                Create a `.env` file in your project directory:\n\n                ```\n                KLAVIS_API_KEY=\"your-klavis-api-key\"\n                ```\n\n                Then, in your Python code:\n\n                ```python\n                from dotenv import load_dotenv\n                import os\n                from klavis import Klavis\n\n                load_dotenv()  # Load environment variables from .env\n                klavis_client = Klavis(api_key=os.environ.get(\"KLAVIS_API_KEY\"))\n                ```\n\n            *   **Node.js:**\n\n                ```bash\n                npm install dotenv\n                ```\n\n                Create a `.env` file in your project directory:\n\n                ```\n                KLAVIS_API_KEY=\"your-klavis-api-key\"\n                ```\n\n                Then, in your Node.js code:\n\n                ```javascript\n                require('dotenv').config(); // Load environment variables from .env\n                const klavisClient = new KlavisClient({ apiKey: process.env.KLAVIS_API_KEY });\n                ```\n\n### Environment Variables\n\n*   `KLAVIS_API_KEY`: (Required) Your Klavis AI API key.  This is the primary environment variable you'll need to set.","tools":"## Available Tools\n\nKlavis AI offers a wide range of tools through its MCP (Managed Connector Protocol) servers, enabling AI applications to interact with various services. Here's a breakdown of the available tools and features:\n\n**Key Features:**\n\n*   **Instant Integration:** Python and TypeScript SDKs, or REST API for quick setup.\n*   **Built-in Authentication:** Secure OAuth flows and API key management.\n*   **Production-Ready:** Hosted infrastructure for scalability.\n*   **Multi-Platform:** Compatible with any LLM provider (OpenAI, Anthropic, Gemini, etc.) and AI agent framework (LangChain, Llamaindex, CrewAI, AutoGen, etc.).\n*   **Self-Hostable:** Open-source MCP servers for custom deployments.\n\n**MCP Servers & Integrations:**\n\nKlavis AI provides access to over 100 tools across various categories, including:\n\n*   **CRM:** Customer Relationship Management tools.\n*   **GSuite:** Google Workspace applications (Gmail, Google Drive, etc.).\n*   **Github:** Version control and collaboration platform.\n*   **Slack:** Team communication and collaboration platform.\n*   **Databases:** Access to various database systems.\n\n**Specific MCP Servers (Examples):**\n\n*   **YouTube:** Enables AI to summarize videos, search for content, and more.\n    *   **Usage Example (Python):**\n        ```python\n        from klavis import Klavis\n        from klavis.types import McpServerName, ToolFormat\n\n        klavis_client = Klavis(api_key=\"your-klavis-key\")\n\n        youtube_server = klavis_client.mcp_server.create_server_instance(\n            server_name=McpServerName.YOUTUBE,\n            user_id=\"user123\",\n            platform_name=\"MyApp\"\n        )\n\n        tools = klavis_client.mcp_server.list_tools(\n            server_url=youtube_server.server_url,\n            format=ToolFormat.OPENAI,\n        )\n        ```\n*   **Gmail:** Allows AI to send emails, read emails, and manage inboxes.\n    *   **Usage Example (TypeScript):**\n        ```typescript\n        import { KlavisClient, Klavis } from 'klavis';\n\n        const klavisClient = new KlavisClient({ apiKey: 'your-klavis-key' });\n\n        const gmailServer = await klavisClient.mcpServer.createServerInstance({\n            serverName: Klavis.McpServerName.Gmail,\n            userId: \"user123\",\n            platformName: \"MyApp\"\n        });\n        ```\n\n**Upcoming Integrations (Roadmap):**\n\n*   **CRM & Sales:**\n    *   Greenhouse (Applicant tracking system)\n    *   Monday.com (Work management platform)\n    *   Zendesk (Customer service platform)\n*   **Microsoft Ecosystem:**\n    *   Microsoft Teams (Team collaboration and communication)\n    *   Microsoft Outlook (Email and calendar management)\n    *   OneDrive (Cloud storage and file sharing)\n*   **Professional Networks & Communication:**\n    *   LinkedIn (Professional networking platform)\n*   **File Storage & Productivity:**\n    *   Dropbox (Cloud file storage and synchronization)\n*   **Scheduling & Calendar:**\n    *   Cal.com (Open-source scheduling platform)\n\n**Authentication & Multi-Tool Workflows:**\n\n*   Klavis handles authentication (OAuth, API keys) for various services.\n*   Combine multiple MCP servers in a single AI conversation for complex workflows.\n\n**Example Multi-Tool Workflow (GitHub & Slack):**\n\n```python\n# Create multiple servers\ngithub_server = klavis_client.mcp_server.create_server_instance(...)\nslack_server = klavis_client.mcp_server.create_server_instance(...)\n\n# Use tools from both servers in a single AI conversation\nall_tools = []\nall_tools.extend(klavis_client.mcp_server.list_tools(github_server.server_url).tools)\nall_tools.extend(klavis_client.mcp_server.list_tools(slack_server.server_url).tools)\n```\n\n**MCP Clients (for Self-Hosting):**\n\n*   Discord Bot\n*   Slack Bot\n*   Web Interface\n*   WhatsApp Bot\n\n**Note:**  The specific tools available within each MCP server can be listed using the `list_tools` method, as demonstrated in the examples.  See the [documentation](https://docs.klavis.ai) for a complete list and details on each tool.","faq":null,"created_at":"2025-04-14T07:53:36+00:00","updated_at":"2025-07-07T15:51:23+00:00","source_url":"https://model-context-protocol.com/servers/klavis","related_articles":[]}