UNPKG

@mseep/atlas-mcp-server

Version:

A Model Context Protocol (MCP) server for ATLAS, a Neo4j-powered task management system for LLM Agents - implementing a three-tier architecture (Projects, Tasks, Knowledge) to manage complex workflows.

67 lines (66 loc) 2.23 kB
import { Driver, Session } from 'neo4j-driver'; /** * Neo4j connection management singleton * Responsible for creating and managing the Neo4j driver connection */ declare class Neo4jDriver { private static instance; private driver; private connectionPromise; private transactionCounter; private constructor(); /** * Get the Neo4jDriver singleton instance */ static getInstance(): Neo4jDriver; /** * Initialize the Neo4j driver connection * @returns Promise that resolves to the Neo4j driver */ private initDriver; /** * Get the Neo4j driver instance, initializing it if necessary * @returns Promise that resolves to the Neo4j driver */ getDriver(): Promise<Driver>; /** * Create a new Neo4j session * @param database Optional database name * @returns Promise that resolves to a new Neo4j session */ getSession(database?: string): Promise<Session>; /** * Execute a query with a transaction * @param cypher Cypher query to execute * @param params Parameters for the query * @param database Optional database name * @returns Promise that resolves to the query result records */ executeQuery<T = any>(cypher: string, params?: Record<string, any>, database?: string): Promise<T[]>; /** * Execute a read-only query * @param cypher Cypher query to execute * @param params Parameters for the query * @param database Optional database name * @returns Promise that resolves to the query result records */ executeReadQuery<T = any>(cypher: string, params?: Record<string, any>, database?: string): Promise<T[]>; /** * Publish a database write operation event * @param operation Details about the operation * @private */ private publishWriteOperation; /** * Triggers a database backup in the background, including rotation logic. * Logs errors but does not throw to avoid interrupting the main flow. * @private */ private triggerBackgroundBackup; /** * Close the Neo4j driver connection */ close(): Promise<void>; } export declare const neo4jDriver: Neo4jDriver; export {};