
cognee-mcp
用于人工智能应用和代理的内存管理器,它使用各种图和向量存储,并允许从 30 多种数据源摄取数据。
Tools
cognify
Cognifies text into knowledge graph
codify
Transforms codebase into knowledge graph
search
Searches for information in knowledge graph
prune
Prunes knowledge graph
README
cognee - AI 应用和代理的记忆层
[Demo](https://www.youtube.com/watch?v=1bezuvLwJmw&t=2s)
.
[了解更多](https://cognee.ai)
·
[加入 Discord](https://discord.gg/NQPKmU5CCg)
你可以信赖的 AI Agent 回复。
使用可扩展的模块化 ECL (提取、认知、加载) 管道构建动态 Agent 记忆。
更多关于 [用例](https://docs.cognee.ai/use_cases)。
## 特性
- 互连并检索你过去的对话、文档、图像和音频转录
- 减少幻觉、开发者工作量和成本。
- 仅使用 Pydantic 将数据加载到图和向量数据库
- 在从 30 多个数据源摄取数据时操作你的数据
## 快速开始
通过 Google Colab <a href="https://colab.research.google.com/drive/1g-Qnx6l_ecHZi0IOw23rg0qC4TYvEvWZ?usp=sharing">notebook</a> 或 <a href="https://github.com/topoteretes/cognee-starter">starter repo</a> 快速开始
## 贡献
你的贡献是使这成为真正的开源项目的核心。 任何你做出的贡献都**非常感谢**。 有关更多信息,请参见 [`CONTRIBUTING.md`](CONTRIBUTING.md)。
## 📦 安装
你可以使用 **pip**、**poetry**、**uv** 或任何其他 python 包管理器安装 Cognee。
### 使用 pip
```bash
pip install cognee
💻 基本用法
设置
import os
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY"
你还可以通过创建 .env 文件来设置变量,使用我们的 <a href="https://github.com/topoteretes/cognee/blob/main/.env.template">模板。</a> 要使用不同的 LLM 提供商,请查看我们的 <a href="https://docs.cognee.ai">文档</a> 获取更多信息
简单例子
此脚本将运行默认管道:
import cognee
import asyncio
async def main():
# Add text to cognee
await cognee.add("Natural language processing (NLP) is an interdisciplinary subfield of computer science and information retrieval.")
# Generate the knowledge graph
await cognee.cognify()
# Query the knowledge graph
results = await cognee.search("Tell me about NLP")
# Display the results
for result in results:
print(result)
if __name__ == '__main__':
asyncio.run(main())
示例输出:
Natural Language Processing (NLP) is a cross-disciplinary and interdisciplinary field that involves computer science and information retrieval. It focuses on the interaction between computers and human language, enabling machines to understand and process natural language.
图可视化: <a href="https://rawcdn.githack.com/topoteretes/cognee/refs/heads/add-visualization-readme/assets/graph_visualization.html"><img src="assets/graph_visualization.png" width="100%" alt="Graph Visualization"></a> 在 浏览器 中打开。
有关更高级的用法,请查看我们的 <a href="https://docs.cognee.ai"> 文档</a>。
了解我们的架构
Demos
- 什么是 AI 记忆:
- 简单 GraphRAG 演示
- cognee 与 Ollama
行为准则
我们致力于使开源成为我们社区中一种愉快和尊重的体验。 有关更多信息,请参见 <a href="https://github.com/topoteretes/cognee/blob/main/CODE_OF_CONDUCT.md"><code>CODE_OF_CONDUCT</code></a>。
💫 贡献者
Star 历史
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。