Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 2.39 KB

File metadata and controls

76 lines (55 loc) · 2.39 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a Neo4j read-only MCP (Model Context Protocol) server built with Spring Boot 3.5.0 and Spring AI 1.0.0. The server provides AI assistants with tools to query and explore Neo4j graph databases through standardized MCP protocol.

Build and Development Commands

# Build the project
./mvnw clean compile

# Run tests
./mvnw test

# Run the application
./mvnw spring-boot:run

# Package the application
./mvnw clean package

# Run a single test class
./mvnw test -Dtest=Neo4jmcpApplicationTests

# Run with specific profile
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev

Architecture

Core Components

  • Neo4jmcpApplication: Main Spring Boot application class
  • MCP Server: Auto-configured by Spring AI MCP starter
  • Tool Components: Service classes annotated with @Tool for Neo4j operations

Technology Stack

  • Java 21
  • Spring Boot 3.5.0
  • Spring AI 1.0.0 with MCP Server starter
  • Maven for build management

MCP Integration

The project uses Spring AI's MCP server starter which auto-configures:

  • Tool registration for methods annotated with @Tool
  • STDIO transport for command-line integration
  • SSE transport for web-based clients

Configuration

Application Properties

  • spring.application.name=neo4jmcp - Application identifier
  • Additional MCP server configuration should be added with spring.ai.mcp.server.* prefix

Development Profiles

Use Spring profiles to manage different environments (dev, test, prod) with corresponding application-{profile}.properties files.

Development Guidelines

Tool Development

  • Create service classes with @Tool annotated methods for Neo4j operations
  • Focus on read-only operations (queries, schema exploration, data visualization)
  • Use proper parameter validation and error handling
  • Follow the patterns established in Java_MCP_Server_Development_Guide.md

Neo4j Integration

  • Add Neo4j driver dependencies when implementing
  • Implement connection pooling and proper resource management
  • Provide tools for Cypher query execution, graph traversal, and schema inspection
  • Ensure all operations are read-only for security

Testing Strategy

  • Unit tests for tool logic
  • Integration tests for MCP protocol compliance
  • Neo4j test containers for database integration testing