LangChain's Neo4jGraph stops because Neo4j cannot run APOC
Your error
ValueError: Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration1 more line it can showFix it fast
Most common cause, 1 of 3The APOC plugin is not installed on this Neo4j server
On a server, move the APOC jar from labs to plugins and restart Neo4j.
mv $NEO4J_HOME/labs/apoc-*.jar $NEO4J_HOME/plugins/
neo4j restart
# Docker, development only
docker run -p 7474:7474 -p 7687:7687 -e NEO4J_PLUGINS='["apoc"]' neo4j # pin the image tag you runShort answer
ValueError: Could not use APOC procedures comes from langchain_neo4j's Neo4jGraph, which loads the graph schema with APOC as it connects. Neo4j answered ProcedureNotFound: the APOC plugin is not installed, its jar does not match the server's year and month, or dbms.security.procedures.allowlist leaves apoc.meta out. Install the matching APOC and restart. Applies to langchain-neo4j 0.11 with Neo4j 2026.10 or 5.26.
Which cause do you have?
Ask the database which APOC meta procedures it has loaded, from Neo4j Browser or cypher-shell connected to the same server as your code. No rows means APOC is absent (first cause) or was refused at startup (second cause); rows that lack apoc.meta.data while other APOC procedures appear point to an allowlist (third cause).
SHOW PROCEDURES YIELD name
WHERE name STARTS WITH 'apoc'
RETURN nameThen find the line you see in this list and open its fix:
- 1The APOC plugin is not installed on this Neo4j server
The SHOW PROCEDURES query returns no apoc rows at all, and the plugins folder (or the container) has no apoc jar - 2The APOC jar does not match the Neo4j version
An apoc jar sits in plugins, yet no APOC procedures are listed, and neo4j.log has a warning about APOC at startup - 3dbms.security.procedures.allowlist does not include apoc.meta
Some apoc procedures are listed but apoc.meta.data is not, and neo4j.conf (or a NEO4J_dbms_security_procedures_allowlist variable) sets an allowlist
What does the error look like?
ValueError: Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configurationNeo.ClientError.Procedure.ProcedureNotFound
Cause 1 of 3
The APOC plugin is not installed on this Neo4j server
You seeThe SHOW PROCEDURES query returns no apoc rows at all, and the plugins folder (or the container) has no apoc jar
Check
Neo4jGraph refreshes its schema when it is created and turns Neo4j's ProcedureNotFound answer into Could not use APOC procedures. A plain Neo4j install ships the APOC Core jar in the labs folder, not in plugins, so the procedures do not exist until someone moves it; a Docker container gets APOC only when asked for it.
ls $NEO4J_HOME/plugins $NEO4J_HOME/labs | grep -i apoc
# Debian or RPM install: /var/lib/neo4j/plugins and /var/lib/neo4j/labsFix
On a server, move the APOC jar from labs to plugins and restart Neo4j. With Docker, set NEO4J_PLUGINS for a development container; for production, download the matching jar and mount it at /plugins instead. In Neo4j Desktop, install APOC from the database's Plugins tab.
mv $NEO4J_HOME/labs/apoc-*.jar $NEO4J_HOME/plugins/
neo4j restart
# Docker, development only
docker run -p 7474:7474 -p 7687:7687 -e NEO4J_PLUGINS='["apoc"]' neo4j # pin the image tag you runVerify
The SHOW PROCEDURES query now lists apoc.meta.data, and Neo4jGraph(...) connects without the ValueError.
python -c "from langchain_neo4j import Neo4jGraph; g = Neo4jGraph(url='bolt://localhost:7687', username='neo4j', password='your-password'); print(g.schema[:200])"Confirmed by neo4j.com
Cause 2 of 3
The APOC jar does not match the Neo4j version
You seeAn apoc jar sits in plugins, yet no APOC procedures are listed, and neo4j.log has a warning about APOC at startup
Check
APOC is versioned by calendar, and its year and month must match those of the Neo4j server; only the patch number may differ, so APOC 2026.10.2 suits Neo4j 2026.10.0. After a server upgrade, a leftover jar from the old version only earns a warning in neo4j.log, its procedures are not available, and Neo4jGraph reports the same APOC error.
ls $NEO4J_HOME/plugins | grep -i apoc
grep -i apoc $NEO4J_HOME/logs/neo4j.log | tail -n 20
# Debian or RPM: journalctl --unit=neo4j Docker: docker logs <container>Fix
Replace the jar with the APOC release whose year and month equal the server's (the 5.26 line for Neo4j 5.26 LTS), then restart.
rm $NEO4J_HOME/plugins/apoc-*.jar
cp ~/Downloads/apoc-2026.10.2*.jar $NEO4J_HOME/plugins/ # the release matching your server
neo4j restartVerify
neo4j.log no longer warns about APOC, and SHOW PROCEDURES lists the apoc procedures.
grep -i apoc $NEO4J_HOME/logs/neo4j.log | tail -n 5Confirmed by neo4j.com
Cause 3 of 3
dbms.security.procedures.allowlist does not include apoc.meta
You seeSome apoc procedures are listed but apoc.meta.data is not, and neo4j.conf (or a NEO4J_dbms_security_procedures_allowlist variable) sets an allowlist
Check
By default Neo4j loads every procedure and function it finds. Once dbms.security.procedures.allowlist is set, only the listed names load, so an allowlist written for a few APOC helpers drops the apoc.meta procedures that the LangChain schema query needs, and the call fails as if APOC were missing.
grep -n "dbms.security.procedures" $NEO4J_HOME/conf/neo4j.confFix
Add apoc.meta.* to the existing allowlist and restart. In Docker, the same setting is written as an environment variable with the NEO4J_ prefix and underscores in place of dots.
# conf/neo4j.conf
dbms.security.procedures.allowlist=apoc.coll.*,apoc.meta.*
# Docker
-e NEO4J_dbms_security_procedures_allowlist='apoc.coll.*,apoc.meta.*'Verify
After the restart, the SHOW PROCEDURES query returns apoc.meta.data.
SHOW PROCEDURES YIELD name
WHERE name = 'apoc.meta.data'
RETURN nameConfirmed by neo4j.com
How do I stop it coming back?
- Upgrade the APOC jar in the same change as the Neo4j server, and keep the two version numbers side by side in your deployment notes.
- Mount a pinned APOC jar into production containers instead of relying on NEO4J_PLUGINS, which Neo4j does not recommend for production.
- Start the app with a health check that runs the SHOW PROCEDURES query for apoc.meta.data, so a missing plugin fails the deploy rather than the first user request.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: stegnor.com, Menulo, ShopGo.