π Unified MCP Tool Graph: A Neo4j-Powered API Intelligence Layer for Dynamic Tool Retrieval
Instead of dumping 100+ tools into a modelβs prompt and expecting it to choose wisely, the Unified MCP Tool Graph equips your LLM with structure, clarity, and relevance. It fixes tool confusion, prevents infinite loops, and enables modular, intelligent agent workflows.
pratikjadhav2726
README
π Unified MCP Tool Graph: A Neo4j-Powered API Intelligence Layer for Dynamic Tool Retrieval
Unified MCP Tool Graph is a research-driven project that aggregates and structures tool APIs from diverse Model Context Protocol (MCP) servers into a centralized Neo4j graph database. This graph functions as an intelligent infrastructure layer that enables large language models (LLMs) and agentic AI systems to dynamically retrieve the most relevant tools for any task β without being overwhelmed by redundant or confusing options.
π¬ This repository focuses on the creation and evolution of the Unified Tool Graph Database. Chatbot-based integration (e.g., LangChain) is treated as a modular extension of this foundational layer.
π’ Code, ingestion scripts, and sample queries coming soon! Stay tuned.
π§ Research Problem
As LLMs and autonomous agents evolve to interact with external tools and APIs, a critical bottleneck has emerged:
How can models efficiently select the right tool from an ever-expanding universe of APIs β without going into infinite loops or picking the wrong ones?
Why This Happens:
-
π Tool Confusion:
LLMs struggle when many tools offer similar functions (e.g.,create_post
,schedule_post
,post_to_social
), leading to indecision and incorrect tool calls. -
βΊ Infinite Chains:
Without a structured understanding of tool differences, LLMs often get stuck in unproductive chains, calling tools repetitively or selecting suboptimal ones. -
π§± Unstructured Access:
Most current implementations dump all available tools into the LLM's context, overwhelming it with options and increasing hallucination risks.
β Solution: The Unified MCP Tool Graph
This project proposes a structured, queryable solution: a vendor-agnostic Neo4j graph database of tools/APIs sourced from MCP servers (e.g., LinkedIn, Google, Facebook, Notion, etc.).
π Key Capabilities:
-
Centralized Tool Intelligence:
Store API descriptions, metadata, parameters, and inter-tool relationships in a graph format. -
LLM-Friendly Query Layer:
Agents can retrieve only the 3β4 most relevant tools per task using metadata and relationships, minimizing confusion. -
Semantic Differentiation:
Capture similarities and differences between tools using graph relationships (e.g.,overlaps_with
,extends
,preferred_for_task
) to guide decision-making.
π§Ή Modular Extensions
While the graph is the core, it enables powerful downstream use cases:
π Dynamic Tool Retrieval (DTR):
A modular LangChain/Autogen chatbot extension that queries the graph and surfaces a minimal, accurate toolset for any given user intent.
This prevents LLMs from blindly scanning a massive tool library and instead gives them just what they need to complete the job β nothing more, nothing less.
π§± Core Objectives
Goal | Description |
---|---|
π¦ Tool Ingestion | Fetch APIs and schemas from public/private MCP servers and normalize them |
π§½ Tool Relationship Mapping | Define graph edges like overlaps_with , requires_auth , preferred_for , belongs_to_vendor |
π LLM-Oriented Queries | Return task-specific tool bundles in real time |
π± Scalable Ecosystem | Continuously add vendors and tools without retraining or hardcoding |
π Agent-Aware Structure | Guide LLM reasoning with metadata-rich, searchable tool representations |
π Key Advantages
-
π§ Reduces Tool Confusion in LLMs
Prevents tool overload by showing only task-relevant options. Avoids infinite call loops and incorrect tool selections. -
β» Vendor-Agnostic Integration
Unifies APIs from different providers into a single intelligent system. -
π Maps Interoperability
Captures how tools relate or depend on each other, useful for chaining APIs in workflows. -
β‘ Optimized Agentic Reasoning
Empowers LLMs to reason efficiently with fewer distractions in the context window. -
π Scalable & Modular
Can be updated independently of LLM or chatbot infrastructure. Extendable across any agent stack.
π Example Use Cases
-
"I want to schedule a post on LinkedIn and share it in Slack."
β Graph returns only the relevantcreate_post
,schedule_post
, andsend_message
tools. -
Custom AI Assistants for Enterprises:
Only expose internal tools from the graph, filtered by access, scope, or function. -
Smart Recommender Agents:
Suggest best-matched tools based on tags, popularity, success rate, or dependencies.
π§ͺ Coming Soon
- β Graph Ingestion Scripts
- β Schema Blueprint + Cypher Queries
- β Tool Visualization Playground
- β LangChain DTR Chatbot Plug-in
- β How-to Tutorials & Use Cases
π Getting Started
git clone https://github.com/your-username/unified-mcp-tool-graph.git
cd unified-mcp-tool-graph
# Coming soon: ingestion pipeline, schema docs, and sample queries
π Contributing
If youβre passionate about agentic AI, graph databases, or LLM integration β weβd love your help!
- π§ Submit ideas or vendor sources
- π οΈ Open PRs for schema/design improvements
- β Star the repo to support this research
π License
MIT License β free for academic, personal, and commercial use.
π§ Summary
Instead of dumping 100+ tools into a modelβs prompt and expecting it to choose wisely, the Unified MCP Tool Graph equips your LLM with structure, clarity, and relevance.
It fixes tool confusion, prevents infinite loops, and enables modular, intelligent agent workflows.
Letβs build smarter systems β one tool graph at a time.
π Star the repo to follow the journey and make tools truly intelligent, searchable, and modular.
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.