knowledgegraph-mcp
Version:
MCP server for enabling persistent knowledge storage for Claude through a knowledge graph with multiple storage backends
44 lines • 1.58 kB
TypeScript
import { Entity } from '../core.js';
export interface SearchStrategy {
canUseDatabase(): boolean;
searchDatabase(query: string | string[], threshold: number, project?: string): Promise<Entity[]>;
searchClientSide(entities: Entity[], query: string | string[]): Entity[];
getAllEntities(project?: string): Promise<Entity[]>;
searchDatabasePaginated?(query: string | string[], threshold: number, pagination: PaginationOptions, project?: string): Promise<PaginationResult<Entity>>;
searchExactPaginated?(query: string | string[], pagination: PaginationOptions, project?: string): Promise<PaginationResult<Entity>>;
getAllEntitiesPaginated?(pagination: PaginationOptions, project?: string): Promise<PaginationResult<Entity>>;
}
export interface SearchConfig {
useDatabaseSearch: boolean;
threshold: number;
clientSideFallback: boolean;
fuseOptions?: {
threshold: number;
distance: number;
includeScore: boolean;
keys: string[];
};
}
export interface SearchOptions {
searchMode?: 'exact' | 'fuzzy';
fuzzyThreshold?: number;
exactTags?: string[];
tagMatchMode?: 'any' | 'all';
pagination?: PaginationOptions;
}
export interface PaginationOptions {
page?: number;
pageSize?: number;
}
export interface PaginationResult<T> {
data: T[];
pagination: {
currentPage: number;
pageSize: number;
totalCount: number;
totalPages: number;
hasNextPage: boolean;
hasPreviousPage: boolean;
};
}
//# sourceMappingURL=types.d.ts.map