knowledgegraph-mcp
Version:
MCP server for enabling persistent knowledge storage for Claude through a knowledge graph with multiple storage backends
72 lines • 1.92 kB
TypeScript
import { Pool as PgPool } from 'pg';
import { StorageProvider, StorageConfig } from '../types.js';
import { KnowledgeGraph } from '../../index.js';
/**
* SQL database storage provider for PostgreSQL only
*/
export declare class SQLStorageProvider implements StorageProvider {
private config;
private pgPool;
constructor(config: StorageConfig);
/**
* Validate PostgreSQL connection string format
*/
private validateConnectionString;
/**
* Initialize database connection and create tables
*/
initialize(): Promise<void>;
/**
* Close database connections
*/
close(): Promise<void>;
/**
* Health check for SQL storage
*/
healthCheck(): Promise<boolean>;
/**
* Load knowledge graph from PostgreSQL database
*/
loadGraph(project: string): Promise<KnowledgeGraph>;
/**
* Save knowledge graph to PostgreSQL database
*/
saveGraph(graph: KnowledgeGraph, project: string): Promise<void>;
/**
* Load graph from PostgreSQL
*/
private loadGraphPostgreSQL;
/**
* Save graph to PostgreSQL
*/
private saveGraphPostgreSQL;
/**
* Create PostgreSQL tables
*/
private createPostgreSQLTables;
/**
* Optional migration method for data migration
*/
migrate(_project: string): Promise<void>;
/**
* Check if PostgreSQL trigram extension is available
*/
private hasTrigramExtension;
/**
* Enable PostgreSQL trigram extension
*/
private enableTrigramExtension;
/**
* Create fuzzy search indexes for PostgreSQL
*/
private createFuzzySearchIndexes;
/**
* Initialize fuzzy search capabilities
*/
initializeFuzzySearch(): Promise<void>;
/**
* Get the PostgreSQL pool for search strategies
*/
getPostgreSQLPool(): PgPool | null;
}
//# sourceMappingURL=sql-storage.d.ts.map