MCP server for Karini AI copilots, webhook recipes, dataset search, and event tracing
Project description
Karini MCP Server
MCP (Model Context Protocol) server for integrating Karini AI copilots, webhook recipes, and dataset search.
Features
- 🤖 AI Copilot Integration - Ask questions and get AI-powered responses from your Karini copilots
- 📄 Document Processing - Process documents stored in S3 through copilots and webhooks
- 🔗 Webhook Recipes - Trigger asynchronous data processing workflows
- 📊 Status Tracking - Monitor webhook execution status and results
- 🔍 Dataset Search - Query your Karini knowledge base with semantic search
- 🔎 Event Tracing - Trace and debug Karini events by request ID
Installation
Via uvx (Recommended)
uvx karini-mcp-server
Via pip
pip install karini-mcp-server
Configuration
Claude Desktop Setup
Edit your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Full Configuration (All Features)
{
"mcpServers": {
"karini-mcp-server": {
"command": "uvx",
"args": ["karini-mcp-server@latest"],
"env": {
"KARINI_API_BASE": "https://app.karini.ai",
"KARINI_COPILOT_ID": "karini-copilot-id",
"KARINI_API_KEY": "karini-api-key",
"WEBHOOK_API_KEY": "karini-webhook-api-key",
"WEBHOOK_RECIPE_ID": "karini-webhook-recipe-id",
"KARINI_DATASET_ID": "karini-dataset-id"
}
}
}
}
Copilot Only Configuration
{
"mcpServers": {
"karini-mcp-server": {
"command": "uvx",
"args": ["karini-mcp-server@latest"],
"env": {
"KARINI_API_BASE": "https://app.karini.ai",
"KARINI_COPILOT_ID": "karini-copilot-id",
"KARINI_API_KEY": "karini-api-key"
}
}
}
}
Webhook Only Configuration
{
"mcpServers": {
"karini-mcp-server": {
"command": "uvx",
"args": ["karini-mcp-server@latest"],
"env": {
"KARINI_API_BASE": "https://app.karini.ai",
"WEBHOOK_API_KEY": "karini-webhook-api-key",
"WEBHOOK_RECIPE_ID": "karini-webhook-recipe-id"
}
}
}
}
Dataset Search Only Configuration
{
"mcpServers": {
"karini-mcp-server": {
"command": "uvx",
"args": ["karini-mcp-server@latest"],
"env": {
"KARINI_API_BASE": "https://app.karini.ai",
"KARINI_API_KEY": "karini-api-key",
"KARINI_DATASET_ID": "karini-dataset-id"
}
}
}
}
Note: Only tools with valid configuration will be available. Configure only the features you need.
Environment Variables
| Variable | Required For | Description |
|---|---|---|
KARINI_API_BASE |
All | Base URL for Karini API (e.g., https://app.karini.ai) |
KARINI_API_KEY |
Copilot, Dataset, Tracing | API key for authentication |
KARINI_COPILOT_ID |
Copilot | Your copilot's unique identifier |
KARINI_DATASET_ID |
Dataset | Your dataset's unique identifier |
WEBHOOK_API_KEY |
Webhook | API key for webhook authentication |
WEBHOOK_RECIPE_ID |
Webhook | Webhook recipe identifier |
Available Tools
Copilot Tools
ask_karini_copilot
Ask questions to your Karini AI copilot and receive intelligent responses.
Parameters:
question(string, required): The question or query to askfiles(list, optional): S3 file paths to include in the query- Example:
["s3://bucket/document.pdf", "s3://bucket/data.txt"]
- Example:
Webhook Tools
invoke_webhook_recipe
Trigger a webhook recipe for asynchronous data processing.
Parameters:
question(string, optional): Input message or queryfiles(list, optional): S3 file paths to process (content type auto-detected)- Example:
["s3://bucket/invoice.pdf", "s3://bucket/receipt.jpg"]
- Example:
metadata(dict, optional): Additional context as key-value pairs- Example:
{"user_id": "123", "priority": "high", "source": "email"}
- Example:
Returns: JSON with request_id for status tracking
get_webhook_status
Check the status of webhook recipe executions.
Parameters:
request_id(string, optional): Specific request ID to check. If not provided, returns recent requests.limit(integer, optional): Number of recent requests to return (default: 5)
Dataset Tools
query_karini_dataset
Search and retrieve information from your Karini knowledge base using semantic search.
Parameters:
text(string, required): The search query or questiontop_k(integer, optional): Number of results to return (default: 5, max: 20)
Tracing Tools
get_traces
Trace and retrieve detailed information about a specific Karini event using its request ID.
Parameters:
request_id(string, required): The unique identifier of the Karini event to trace
Returns: Detailed trace information including execution steps, timing, and debug data
Examples:
Trace event "67309a4f8b1c2d3e4f5a6b7c"
Get traces for request ID "abc123def456"
Development
Local Testing
# Clone repository
git clone https://github.com/yourusername/karini-mcp-server.git
cd karini-mcp-server
# Install dependencies
pip install -e .
# Run locally
python -m src.main
Project Structure
karini-mcp-server/
├── src/
│ ├── main.py # Entry point
│ ├── server.py # MCP server setup
│ ├── services/
│ │ ├── config.py # Configuration management
│ │ └── client.py # Karini API client
│ └── tools/
│ └── tools.py # Tool definitions
├── pyproject.toml
└── README.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file karini_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: karini_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a8e61e32f762c01709411e029b85dc17956045d7c56518b65474c57f36d00ce
|
|
| MD5 |
3e666708e4c3700b3506e6aa88279ef6
|
|
| BLAKE2b-256 |
577c1dbe7372c094b9a13d1395fb8bc8d1195c38963d8ead95ba9bd98b59e881
|
File details
Details for the file karini_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: karini_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
353880bf829e4e2277bdfe6eda732efcd85a506ac8c6104316dece597f22c33b
|
|
| MD5 |
94d2ccaa3ff0874ceb43be6e5e405fbc
|
|
| BLAKE2b-256 |
05ca8038b7039f9708d7c6f53c7f8a7a28002504446904da3d478e5762ff5859
|