Skip to main content
Glama
portel-dev

NCP - Natural Context Provider

by portel-dev
neo4j-server.js3.88 kB
#!/usr/bin/env node /** * Mock Neo4j MCP Server * Real MCP server structure for Neo4j graph database testing */ import { MockMCPServer } from './base-mock-server.js'; const serverInfo = { name: 'neo4j-test', version: '1.0.0', description: 'Neo4j graph database server with schema management and read/write cypher operations' }; const tools = [ { name: 'execute_cypher', description: 'Execute Cypher queries on Neo4j graph database. Query relationships, find patterns, analyze connections.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Cypher query string' }, parameters: { type: 'object', description: 'Query parameters as key-value pairs' }, database: { type: 'string', description: 'Target database name' } }, required: ['query'] } }, { name: 'create_node', description: 'Create nodes in Neo4j graph with labels and properties. Add entities, create graph elements.', inputSchema: { type: 'object', properties: { labels: { type: 'array', description: 'Node labels', items: { type: 'string' } }, properties: { type: 'object', description: 'Node properties as key-value pairs' } }, required: ['labels'] } }, { name: 'create_relationship', description: 'Create relationships between nodes in Neo4j graph. Connect entities, define associations, build graph structure.', inputSchema: { type: 'object', properties: { from_node_id: { type: 'string', description: 'Source node ID' }, to_node_id: { type: 'string', description: 'Target node ID' }, relationship_type: { type: 'string', description: 'Relationship type/label' }, properties: { type: 'object', description: 'Relationship properties' } }, required: ['from_node_id', 'to_node_id', 'relationship_type'] } }, { name: 'find_path', description: 'Find paths between nodes in Neo4j graph database. Discover connections, analyze relationships, trace routes.', inputSchema: { type: 'object', properties: { start_node: { type: 'object', description: 'Starting node criteria' }, end_node: { type: 'object', description: 'Ending node criteria' }, relationship_types: { type: 'array', description: 'Allowed relationship types', items: { type: 'string' } }, max_depth: { type: 'number', description: 'Maximum path depth' } }, required: ['start_node', 'end_node'] } }, { name: 'manage_schema', description: 'Manage Neo4j database schema including indexes and constraints. Optimize queries, ensure data integrity.', inputSchema: { type: 'object', properties: { action: { type: 'string', description: 'Schema action (create_index, drop_index, create_constraint, drop_constraint)' }, label: { type: 'string', description: 'Node label or relationship type' }, properties: { type: 'array', description: 'Properties for index/constraint', items: { type: 'string' } }, constraint_type: { type: 'string', description: 'Constraint type (unique, exists, key)' } }, required: ['action', 'label', 'properties'] } } ]; // Create and run the server const server = new MockMCPServer(serverInfo, tools); server.run().catch(console.error);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/portel-dev/ncp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server