MCPSERV.CLUB
omarguzmanm

MCP Server - Vector Search

MCP Server

Fast semantic search on Neo4j using OpenAI embeddings

Stale(55)
3stars
1views
Updated Aug 31, 2025

About

A lightweight MCP server built with FastMCP that integrates Neo4j’s graph database with OpenAI embeddings for lightning‑fast vector search. It converts natural language queries into vectors, retrieves the most semantically similar graph nodes, and returns ranked results.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The MCP Server – Vector Search is a lightweight, high‑performance bridge between an AI assistant and a Neo4j graph database that adds semantic vector search to your knowledge base. By leveraging the Model Context Protocol (MCP) and FastMCP, the server exposes a single, purpose‑built tool that turns natural language queries into high‑dimensional embeddings and retrieves the most relevant graph nodes in milliseconds. This solves a common bottleneck for AI developers: turning unstructured, graph‑based knowledge into actionable context without sacrificing speed or requiring custom integration code.

At its core, the server performs three steps: (1) it receives a prompt from an MCP‑enabled client such as Claude; (2) it calls the OpenAI embedding endpoint to convert that prompt into a 1536‑dimensional vector; and (3) it queries Neo4j’s vector index—created with the APOC plugin—to return a ranked list of nodes along with similarity scores. Because Neo4j stores the embeddings directly on graph nodes, the search benefits from native graph traversal and relationship filtering, enabling complex queries that combine semantic similarity with structural constraints (e.g., “find papers linked to a specific author” or “locate projects related to a technology node”).

Key capabilities include:

  • Zero‑code integration – the MCP tool is discovered automatically by any compliant client, so no boilerplate code is needed.
  • Fast execution – FastMCP’s minimal overhead and uv‑based dependency management keep startup times low, while Neo4j’s native vector index delivers sub‑second latency even for millions of nodes.
  • Rich context delivery – results include the node’s properties and a similarity score, allowing the AI to weigh evidence when generating answers or summaries.
  • Scalable architecture – the server can run behind a load balancer, and Neo4j’s connection pooling ensures efficient resource use.

Typical use cases span a broad range of AI‑driven applications:

  • Enterprise knowledge bases – employees ask questions in plain language and receive the most relevant policy documents or code snippets.
  • Research assistants – scholars query a graph of papers, authors, and topics to surface the latest studies on a niche subject.
  • Product recommendation engines – a conversational AI recommends products by finding semantically similar items linked to user preferences.
  • Compliance monitoring – regulators query a graph of regulations and incidents, quickly locating related cases.

Integrating the server into an AI workflow is straightforward: once deployed, any MCP client can invoke the tool by passing a natural‑language prompt. The assistant can then use the returned results as context for its next response, enabling a seamless loop of query → search → answer that feels natural to end users while remaining fully grounded in the underlying graph data.