
5分钟内将任何数据源转化为MCP服务器。构建AI代理支持的知识库。
概览
建立知识库,让像Claude和Cursor这样的AI助手可以直接查询。不需要基础设施。 该SDK允许您从任何数据源创建MCP(模型上下文协议)服务器。您的文档、PDF、网站或任何文本都可以成为AI助手可直接访问的可查询知识库。 - 📚 使文档可通过Cursor/Claude搜索 - 🔍 构建RAG(检索-增强生成)流程 - 🤖 创建具备领域知识的定制AI助手 - 📖 索引研究论文、指南或任何文本内容 添加到 ~/Library/Application Support/Claude/claude_desktop_config.json: 文本会自动被拆分为最优嵌入区块: 默认使用 OpenAI,但你可以自带: 非常适合开发和小型数据集: 对于生产工作负载,可以使用Qdrant——一个高性能向量数据库:
概述(AI 翻译)
将任何数据源在5分钟内转化为MCP服务器。
建立知识库,让像Claude和Cursor这样的AI助手可以直接查询。不需要基础设施。
这是什么?
该SDK允许您从任何数据源创建MCP(模型上下文协议)服务器。您的文档、PDF、网站或任何文本都可以成为AI助手可直接访问的可查询知识库。
使用场景:
- 📚 让你的文档可通过光标/Claude搜索
- 🔍 构建RAG(检索增强生成)流水线
- 🤖 创建具备领域知识的定制AI助手
- 📖 索引研究论文、指南或任何文本内容
快速启动
安装
基本用法
连接光标
在你的.cursor/mcp.json中添加:
连接Claude桌面
加到~/Library/Application Support/Claude/claude_desktop_config.json:
特色
📁 多源摄取
🔍 聪明的块
文本会自动被拆分为最优嵌入区块:
🧠 柔性嵌入
默认使用 OpenAI,但你可以自带:
💾 向量商店
内存中(默认)
非常适合开发和小型数据集:
Qdrant
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
akyn-ai
Turn any data source into an MCP server in 5 minutes.
Build knowledge bases that AI assistants like Claude and Cursor can query directly. No infrastructure needed.
What is this?
This SDK lets you create MCP (Model Context Protocol) servers from any data source. Your docs, PDFs, websites, or any text can become a queryable knowledge base that AI assistants can access directly.
Use cases:
- 📚 Make your documentation searchable by Cursor/Claude
- 🔍 Build RAG (Retrieval-Augmented Generation) pipelines
- 🤖 Create custom AI assistants with domain knowledge
- 📖 Index research papers, guides, or any text content
Quick Start
Install
npm install akyn-ai
Basic Usage
import { KnowledgeBase } from 'akyn-ai'
// Create a knowledge base
const kb = new KnowledgeBase({
name: 'my-docs',
description: 'My project documentation',
})
// Add your content
await kb.addDirectory('./docs') // Add all docs from a folder
await kb.addFile('./README.md') // Add a specific file
await kb.addURL('https://docs.example.com') // Scrape a URL
await kb.addText('Important info here') // Add raw text
// Serve as MCP server
kb.serveStdio() // For Cursor/Claude Desktop
Connect to Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": {
"my-docs": {
"command": "npx",
"args": ["ts-node", "./my-kb.ts"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Connect to Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"my-docs": {
"command": "npx",
"args": ["ts-node", "/path/to/my-kb.ts"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Features
📁 Multi-Source Ingestion
// Files (PDF, DOCX, TXT, Markdown)
await kb.addFile('./guide.pdf')
await kb.addFile('./manual.docx')
// Directories (recursive)
await kb.addDirectory('./docs', {
recursive: true,
extensions: ['.md', '.txt', '.pdf'],
})
// URLs
await kb.addURL('https://docs.example.com')
await kb.addURLs([
'https://example.com/page1',
'https://example.com/page2',
])
// Raw text
await kb.addText('Custom content here', 'My Notes')
🔍 Smart Chunking
Text is automatically split into optimal chunks for embedding:
const kb = new KnowledgeBase({
name: 'my-kb',
chunking: {
maxSize: 1000, // Max characters per chunk
overlap: 200, // Overlap between chunks for context
},
})
🧠 Flexible Embeddings
Uses OpenAI by default, but you can bring your own:
import { KnowledgeBase, type EmbeddingsProvider } from 'akyn-ai'
安装
npx ts-node ./my-kb.ts配置
{
"mcpServers": {
"my-docs": {
"command": "npx",
"args": ["ts-node", "./my-kb.ts"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}