Skip to content

feat: Embedded Graph Engine for academic researcher network analysis #1

@kiki830621

Description

@kiki830621

Summary

Add an embedded graph database engine to che-zotero-mcp for academic researcher network analysis with in-memory adjacency lists, custom binary persistence, and graph algorithms.

Architecture

  • Property graph with 4 node types (Researcher, Paper, Institution, Journal) and 6 edge types (AUTHORED, CO_AUTHOR, PUBLISHED_IN, AFFILIATED_WITH, CITES, ADVISOR_OF)
  • In-memory index-free adjacency (nodes hold direct pointers to edges)
  • Binary persistence to ~/.che-zotero-mcp/graph.bin with custom format (magic "CHEG", string table, linked lists)
  • Simplified Cypher query support (MATCH/WHERE/RETURN)

New MCP Tools (13)

Tool Description
graph_stats Graph statistics
graph_add_node Add node (Researcher/Paper/Institution/Journal)
graph_add_edge Add edge with type
graph_remove_node Remove node and connected edges
graph_remove_edge Remove edge
graph_save Persist graph to disk
graph_neighbors Find neighbor nodes
graph_shortest_path BFS shortest path
graph_co_author_stats Co-authorship statistics
graph_citation_network Citation tree traversal
graph_community Community detection
graph_query Simplified Cypher queries
graph_import_from_zotero Import from Zotero collections

Implementation Plan

See docs/plans/2026-03-08-embedded-graph-engine-plan.md for detailed task-by-task TDD plan (12 tasks).

Tech Stack

Swift 5.9, XCTest, MCP swift-sdk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions