0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Neo4j / Gemini-CLI

0
Last updated at Posted at 2026-01-25

動機

(日記) AI-Agentを使うとき、もっと長期記憶が欲しい。
簡単に使えるRAG的なものはないものか...

環境

  • Windows 11
  • gemini-cli 0.29.5 (npm -i -g @google/gemini-cli)
  • uxv 0.9.26 (mise use -g uv)

導入

Neo4j Desktop 2.1.3

Windows Neo4j Desktop
1. [Neo4j Desktop 2.1.1](https://neo4j.com/docs/desktop/current/) インストール
2. Neo4j Desktop起動 ➜ Local Instance ➜ Create Instance 
3. instanceName/password入力(e.g.: slop/xxxxxxxx) ➜ Create 

Windows Service

pwsh


Ubuntu
Ubuntu package
sudo apt update
sudo apt install -y wget curl gnupg
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/neo4j.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable latest" | sudo tee /etc/apt/sources.list.d/neo4j.list
sudo apt update
sudo apt install -y neo4j

sudo systemctl enable neo4j
sudo systemctl start neo4j

# 初期パスワードの設定(初回起動時)
# サービスが起動している状態で以下を実行:
cypher-shell -u neo4j -p neo4j "ALTER USER neo4j SET PASSWORD '新しいパスワード'"
# または、サービス停止中に管理ツールで設定:
sudo systemctl stop neo4j
sudo neo4j-admin dbms set-initial-password '新しいパスワード'
sudo systemctl start neo4j
/etc/neo4j/neo4j.conf - 外部アクセスの許可(必要に応じて)
server.default_listen_address=0.0.0.0    # 127.0.0.1 から 0.0.0.0 に変更

サービスを再起動 sudo systemctl restart neo4j

利用

  1. Browserでhttp://127.0.0.1:7474/browser/ 開く
  2. password 入力し[Connect]
  3. Query実行し動作検証(略)

MCP

➜mcp-neo4j

Gemini設定 - LocalのNeo4jの場合
$password = "xxxxxxxx"
gemini mcp add -s user neo4j-cypher uvx mcp-neo4j-cypher --env NEO4J_URI=neo4j://localhost:7687 --env NEO4J_USERNAME=neo4j --env NEO4J_DATABASE=neo4j --env NEO4J_PASSWORD=$password
     
# 以下とりあえずなくても使える
gemini mcp add -s user neo4j-memory uvx mcp-neo4j-memory --env NEO4J_URI=neo4j://localhost:7687 --env NEO4J_USERNAME=neo4j --env NEO4J_DATABASE=neo4j --env NEO4J_PASSWORD=$password
gemini mcp add -s user neo4j-data-modeling uvx mcp-neo4j-data-modeling

拡張

Neo4j Desktop へ Plugin導入方法

  1. Neo4j Desktopを起動
  2. プラグインを導入したいDBをSTOP
  3. メニュー ➜ Plugins ➜ APOC(例) ➜ Install
  4. DBをSTART

Plugins:

  • AOPC: JSON, XML, CSV入力、Web API(!)やCloud Storage参照、グラフ関等
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?