This guide walks you from a fresh Python environment to a running Neocarta MCP server backed by a real semantic graph. You will install the library, point it at a Neo4j instance, ingest the bundled CSV e-commerce sample dataset (no cloud account required), optionally generate embeddings, and start the MCP server. At the end you will be able to runDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/neocarta/llms.txt
Use this file to discover all available pages before exploring further.
neocarta tool list-schemas and see your data’s schema returned as structured JSON.
Install Neocarta
Install the core library. Add the Neocarta requires Python 3.10 or higher.
[cli] extra to get the neocarta command-line tool, which you will use to query the graph in step 6.- pip
- uv
- pipx (CLI only)
Set up Neo4j and create your .env file
Neocarta reads connection details from environment variables. Create a If you are using Neo4j AuraDB, your URI will look like
.env file in your project root — it is loaded automatically by python-dotenv at runtime.Create the
.env file at the root of your project directory. Neocarta’s CLI and Python connectors both call load_dotenv() on startup, so the file is picked up without any extra configuration..env
neo4j+s://xxxxxxxx.databases.neo4j.io. You can find it on the AuraDB console after creating a free instance.If you prefer to run Neo4j locally with Docker:Ingest your first dataset
The repository ships a complete e-commerce sample dataset in To ingest from BigQuery instead, run:
datasets/csv/ — four tables (orders, customers, products, order_items) with columns, foreign keys, sample values, and query history — so you can try Neocarta without a cloud account.- CLI
- Python
Generate embeddings (optional)
Embeddings are not required for the catalog and full-text tools, but they unlock semantic similarity search — the most powerful retrieval mode. Add your OpenAI key (or any LiteLLM-supported provider) to Then generate embeddings:The MCP server auto-detects at startup which indexes are present and registers the highest-fidelity retrieval tool available for each node type: business-term-bridged hybrid → hybrid → vector or full-text → catalog only.
.env first:.env
- CLI
- Python
Start the MCP server
Install the To connect the server to Claude Desktop, add the following to your
[mcp] extra and start the server. It reads the same NEO4J_* variables from your .env file.claude_desktop_config.json:Query the graph
With the CLI installed you can run the MCP tools directly from the shell — useful for verifying the graph before wiring up an agent.A successful Your semantic graph is live. Connect any MCP-compatible agent framework (LangGraph, Claude Desktop, LlamaIndex, etc.) to
- CLI
- Python (MCP client)
list-schemas call returns something like:neocarta-mcp plus a query-execution tool for your database and the agent can discover tables, follow foreign keys, and generate accurate SQL.