atlas-mcp-server

by cyanheads
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • ATLAS uses .ENV files for configuration management, with support for creating a .env file based on the provided .env.example template.

  • ATLAS integrates with Docker for simplified installation and running of Neo4j. Docker-compose is included in the repository for self-hosting the Neo4j database.

  • ATLAS Skills system includes git integration, with configuration options for GitHub username and email available through environment variables.

ATLAS:任务管理系统

ATLAS(自适应任务和逻辑自动化系统)是 LLM 代理的任务管理系统。

基于三层架构构建:

+------------------------------------------+ | PROJECT | |------------------------------------------| | id: string | | name: string | | description: string | | status: string | | urls?: Array<{title: string, url: string}>| | completionRequirements: string | | outputFormat: string | | taskType: string | | createdAt: string | | updatedAt: string | +----------------+-------------------------+ | | | | v v +----------------------------------+ +----------------------------------+ | TASK | | KNOWLEDGE | |----------------------------------| |----------------------------------| | id: string | | id: string | | projectId: string | | projectId: string | | title: string | | text: string | | description: string | | tags?: string[] | | priority: string | | domain: string | | status: string | | citations?: string[] | | assignedTo?: string | | createdAt: string | | urls?: Array<{title: string, | | | | url: string}> | | updatedAt: string | | tags?: string[] | | | | completionRequirements: string | | | | outputFormat: string | | | | taskType: string | | | | createdAt: string | | | | updatedAt: string | | | +----------------------------------+ +----------------------------------+

ATLAS 作为模型上下文协议 (MCP) 服务器实现,允许 LLM 代理与项目管理数据库交互,从而实现对项目、任务和知识项的管理。

重要版本说明1.5.4 版是最后一个使用 SQLite 作为数据库的版本。2.0 版及更高版本已完全重写,使用 Neo4j,这需要以下任一配置:

2.5.0 版本引入了新的 3 节点系统(项目、任务、知识)来取代以前的结构。

目录

概述

ATLAS 实现了模型上下文协议 (MCP),通过以下方式实现 LLM 与外部系统之间的标准化通信:

  • 客户端:Claude Desktop、IDE 和其他与 MCP 兼容的客户端
  • 服务器:项目、任务和知识管理的工具和资源
  • LLM 代理:利用服务器管理功能的 AI 模型

系统集成

Atlas 平台将这些组件集成到一个有凝聚力的系统中:

  • 项目-任务关系:项目包含任务,这些任务代表实现项目目标所需的可操作步骤。任务继承其父项目的上下文,同时提供对各个工作项的精细跟踪。
  • 知识整合:项目和任务都可以通过知识项来丰富,为团队成员提供必要的信息和背景。
  • 依赖管理:项目和任务都支持依赖关系,允许具有先决条件和顺序执行要求的复杂工作流。
  • 统一搜索:该平台提供跨实体搜索功能,允许用户根据各种标准查找相关的项目、任务或知识。

特征

项目管理

  • **全面跟踪:**管理项目元数据、状态和丰富内容(注释、链接等),内置批量操作支持。
  • **依赖和关系处理:**自动验证和跟踪项目间依赖关系。

任务管理

  • **任务生命周期管理:**在整个生命周期内创建、跟踪和更新任务。
  • **优先级和分类:**分配优先级并使用标签对任务进行分类,以便更好地组织。
  • **依赖关系跟踪:**建立任务依赖关系以创建结构化工作流程。

知识管理

  • **结构化知识库:**维护一个可搜索的项目相关信息库。
  • **领域分类:**按领域和标签组织知识,以便于检索。
  • **引用支持:**跟踪知识项的来源和参考。

图数据库集成

  • **原生关系管理:**利用 Neo4j 的 ACID 兼容事务和优化查询来实现强大的数据完整性。
  • **高级搜索和可扩展性:**使用模糊匹配和通配符执行基于属性的搜索,同时保持高性能。

统一搜索

  • **跨实体搜索:**根据内容、元数据或关系查找相关的项目、任务或知识。
  • **灵活的查询选项:**支持不区分大小写、模糊和高级过滤选项。

安装

  1. 克隆存储库:
git clone https://github.com/cyanheads/atlas-mcp-server.git cd atlas-mcp-server
  1. 安装依赖项:
npm install
  1. 配置 Neo4j:
# Start Neo4j using Docker docker-compose up -d
  1. 构建项目:
npm run build

配置

环境变量

根据.env.example创建.env文件:

# Neo4j Configuration NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=password2 # Application Configuration LOG_LEVEL=info # debug, info, warn, error NODE_ENV=development # development, production

MCP 客户端设置

添加到您的 MCP 客户端设置:

{ "mcpServers": { "atlas": { "command": "node", "args": ["/path/to/atlas-mcp-server/dist/index.js"], "env": { "NEO4J_URI": "bolt://localhost:7687", "NEO4J_USER": "neo4j", "NEO4J_PASSWORD": "password2", "LOG_LEVEL": "info", "NODE_ENV": "production" } } } }

项目结构

代码库遵循模块化结构:

src/ ├── config/ # Configuration management (index.ts) ├── index.ts # Main server entry point ├── mcp/ # MCP server implementation (server.ts) │ ├── resources/ # MCP resource handlers (index.ts, types.ts, knowledge/, projects/, tasks/) │ └── tools/ # MCP tool handlers (individual tool directories) ├── services/ # Core application services │ └── neo4j/ # Neo4j database services (index.ts, driver.ts, backupRestoreService.ts, etc.) ├── types/ # Shared TypeScript type definitions (errors.ts, mcp.ts, tool.ts) └── utils/ # Utility functions (logger.ts, errorHandler.ts, etc.)

注意:ID 生成逻辑主要位于src/services/neo4j/helpers.ts中。

工具

ATLAS 提供了一套全面的项目、任务和知识管理工具,可通过模型上下文协议调用。

项目运营

工具名称描述关键论点
atlas_project_create创建新项目(单个/批量)。mode ('单一'/'批量')、项目详细信息( namedescriptionstatusurlscompletionRequirementsdependenciesoutputFormattaskType )、 responseFormat ('格式化'/'json',可选)。
atlas_project_list列出项目(全部/详细信息)。mode ('全部'/'详细信息')、 id (用于详细信息)、过滤器( statustaskType )、分页( pagelimit )、包含( includeKnowledgeincludeTasks )、 responseFormat ('格式化'/'json',可选)。
atlas_project_update更新现有项目(单个/批量)。mode ('single'/'bulk')、 idupdates对象、 responseFormat ('formatted'/'json',可选)。批量模式使用projects数组。
atlas_project_delete删除项目(单个/批量)。mode ('单一'/'批量')、 id (单一)或projectIds数组(批量)、 responseFormat ('格式化'/'json',可选)。

任务操作

工具名称描述关键论点
atlas_task_create创建新任务(单个/批量)。mode ('单一'/'批量')、 projectId 、任务详情( titledescriptionprioritystatusassignedTotagscompletionRequirementsdependenciesoutputFormattaskType )、 responseFormat ('格式化'/'json',可选)。
atlas_task_update更新现有任务(单个/批量)。mode ('single'/'bulk')、 idupdates对象、 responseFormat ('formatted'/'json',可选)。批量模式使用tasks数组。
atlas_task_delete删除任务(单个/批量)。mode ('单个'/'批量')、 id (单个)或taskIds数组(批量)、 responseFormat ('格式化'/'json',可选)。
atlas_task_list列出特定项目的任务。projectId (必需)、过滤器( statusassignedToprioritytagstaskType )、排序( sortBysortDirection )、分页( pagelimit )、 responseFormat ('格式化'/'json',可选)。

知识运营

工具名称描述关键论点
atlas_knowledge_add添加新的知识项目(单个/批量)。mode ('single'/'bulk')、 projectId 、知识详情( texttagsdomaincitations )、 responseFormat ('formatted'/'json',可选)。批量模式使用knowledge数组。
atlas_knowledge_delete删除知识项(单个/批量)。mode ('单一'/'批量')、 id (单一)或knowledgeIds数组(批量)、 responseFormat ('格式化'/'json',可选)。
atlas_knowledge_list列出特定项目的知识项。projectId (必需)、过滤器( tagsdomainsearch )、分页( pagelimit )、 responseFormat ('格式化'/'json',可选)。

搜索行动

工具名称描述关键论点
atlas_unified_search跨实体执行统一搜索。value (搜索词)、 property (可选)、过滤器( entityTypestaskType )、选项( caseInsensitivefuzzy )、分页( pagelimit )、 responseFormat ('formatted'/'json',可选)。

研究运营

工具名称描述关键论点
atlas_deep_research通过在 Atlas 知识库中创建分层计划来启动结构化的深度研究过程。projectId (必需)、 researchTopic (必需)、 researchGoal (必需)、 scopeDefinition (可选)、 subTopics (包含问题和搜索查询的必需数组)、 researchDomain (可选)、 initialTags (可选)、 planNodeId (可选)、 responseFormat (可选)。

数据库操作

工具名称描述关键论点
atlas_database_clean**破坏性:**完全重置数据库,删除所有项目、任务和知识。acknowledgement (必须设置为true才能确认), responseFormat ('formatted'/'json',可选)。

资源

ATLAS 通过标准 MCP 资源端点公开项目、任务和知识数据。

直接资源

资源名称描述
atlas://projects列出 Atlas 平台中的所有项目,并支持分页。
atlas://tasks列出 Atlas 平台中的所有任务,并支持分页和过滤。
atlas://knowledge列出 Atlas 平台中所有知识项,支持分页和过滤。

资源模板

资源名称描述
atlas://projects/{projectId}通过唯一标识符 ( projectId ) 检索单个项目。
atlas://tasks/{taskId}通过唯一标识符( taskId )检索单个任务。
atlas://projects/{projectId}/tasks检索属于特定项目 ( projectId ) 的所有任务。
atlas://knowledge/{knowledgeId}通过唯一标识符 ( knowledgeId ) 检索单个知识项。
atlas://projects/{projectId}/knowledge检索属于特定项目 ( projectId ) 的所有知识项。

数据库备份和恢复

ATLAS 提供了备份和恢复 Neo4j 数据库内容的功能。核心逻辑位于src/services/neo4j/backupRestoreService.ts中。

自动备份(注意)

**重要提示:**由于效率低下,自动备份功能已被移除。src src/services/neo4j/driver.ts中对triggerBackgroundBackup的调用已被注释掉,并附有注释表明该调用已被移除。请使用下文所述的手动备份流程来保护您的数据。

备份过程

  • 机制:备份过程将所有ProjectTaskKnowledge节点及其关系导出到单独的 JSON 文件中。
  • 输出:每次备份都会在配置的备份路径(默认值: ./atlas-backups/ )内创建一个带时间戳的目录(例如atlas-backup-YYYYMMDDHHMMSS )。此目录包含projects.jsontasks.jsonknowledge.jsonrelationships.json
  • 手动备份:您可以使用提供的脚本触发手动备份:
    npm run db:backup
    此命令执行scripts/db-backup.ts ,它会调用exportDatabase函数。

恢复过程

  • 机制:恢复过程首先会完全清除现有的 Neo4j 数据库。然后,它会从位于指定备份目录中的 JSON 文件导入节点和关系。
  • 警告:从备份恢复是一项破坏性操作。它将覆盖 Neo4j 数据库中的所有当前数据。
  • 手动恢复:要从备份目录恢复数据库,请使用导入脚本:
    npm run db:import <path_to_backup_directory>
    <path_to_backup_directory>替换为备份文件夹的实际路径(例如, ./atlas-backups/atlas-backup-20250326120000 )。此命令执行scripts/db-import.ts ,该文件调用importDatabase函数。
  • 关系处理:导入过程会尝试根据导出过程中存储在节点中的id属性重新创建关系。请确保节点具有一致的id属性,以便正确恢复关系。

示例

examples/目录包含演示 ATLAS MCP 服务器各种功能的实用示例。

  • 备份示例:位于examples/backup-example/下,展示了npm run db:backup命令生成的 JSON 文件的结构和格式。更多详情,请参阅示例的 README文件。
  • 深度研究示例:位于examples/deep-research-example/ ,演示了atlas_deep_research工具生成的输出和结构。它包含一个 Markdown 文件 ( covington_community_grant_research.md ),用于概述研究计划;以及一个 JSON 文件 ( full-export.json ),用于包含研究计划创建后从数据库导出的原始数据。更多详情,请参阅示例的 README文件。

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 提交您的更改并附带描述性消息
  4. 推送到分支
  5. 创建拉取请求

对于错误和功能请求,请创建问题。

执照

Apache 许可证 2.0


ID: b8veo1exod