MCP bridge for OpenGraphMemory
Project description
ogm-agent-bridge
MCP stdio bridge from Claude Code, OpenCode, and Hermes to one OpenGraphMemory project.
Bridge uses authenticated OpenGraphMemory REST APIs only. It is stateless: no local database, session mapping, direct PostgreSQL, Neo4j, or object-store access.
Status
Alpha. PyPI releases are published from GitHub Actions on v* tags. Source install is also supported for development.
Tools
ogm_healthogm_list_datasetsogm_search_entitiesogm_get_entityogm_get_neighborsogm_find_pathogm_get_subgraphogm_get_graphogm_get_evidenceogm_get_relation_evidenceogm_upload_document
Read tools inspect PostgreSQL-authoritative graph data and evidence. ogm_upload_document is only write tool. No delete, update, admin, project-create, relation-review, analytics-refresh, memory, or semantic-retrieval tools exist.
Install
Install from PyPI with uv:
uv tool install ogm-agent-bridge
Or run without installing:
uvx ogm-agent-bridge --version
pipx also works:
pipx install ogm-agent-bridge
For source development:
git clone https://github.com/ardiannurcahya/ogm-agent-bridge.git "$HOME/src/ogm-agent-bridge"
cd "$HOME/src/ogm-agent-bridge"
uv sync --locked
Configure
Set these environment variables before starting your MCP client:
OGM_BASE_URL=http://localhost:8000
OGM_API_KEY=<project-api-key>
OGM_PROJECT_ID=<project-uuid>
OGM_PERMISSION_PROFILE=read-only
Use OGM_PERMISSION_PROFILE=read-only for graph search only. Use OGM_PERMISSION_PROFILE=personal-safe only when reviewed document uploads are needed.
Optional upload roots:
OGM_UPLOAD_ROOTS=/absolute/path/to/allowed/docs
More options: Configuration.
MCP Client Setup
Claude Code
Add MCP server config to project .mcp.json:
{
"mcpServers": {
"ogm": {
"command": "uvx",
"args": ["ogm-agent-bridge"],
"env": {
"OGM_BASE_URL": "${OGM_BASE_URL}",
"OGM_API_KEY": "${OGM_API_KEY}",
"OGM_PROJECT_ID": "${OGM_PROJECT_ID}",
"OGM_PERMISSION_PROFILE": "${OGM_PERMISSION_PROFILE}"
}
}
}
}
Verify:
claude mcp list
OpenCode
Add MCP server config to opencode.json or opencode.jsonc:
{
"mcp": {
"ogm": {
"type": "local",
"command": ["uvx", "ogm-agent-bridge"],
"environment": {
"OGM_BASE_URL": "{env:OGM_BASE_URL}",
"OGM_API_KEY": "{env:OGM_API_KEY}",
"OGM_PROJECT_ID": "{env:OGM_PROJECT_ID}",
"OGM_PERMISSION_PROFILE": "{env:OGM_PERMISSION_PROFILE}"
},
"enabled": true
}
}
}
Restart OpenCode after editing config.
Hermes
Add server under mcp_servers:
mcp_servers:
ogm:
command: "uvx"
args:
- "ogm-agent-bridge"
env:
OGM_BASE_URL: "${OGM_BASE_URL}"
OGM_API_KEY: "${OGM_API_KEY}"
OGM_PROJECT_ID: "${OGM_PROJECT_ID}"
OGM_PERMISSION_PROFILE: "${OGM_PERMISSION_PROFILE}"
enabled: true
Verify:
hermes mcp test ogm
For source development, replace uvx ogm-agent-bridge with:
uv run --project /absolute/path/ogm-agent-bridge ogm-agent-bridge
MCP uses stdio. Diagnostics go to stderr.
Use
After MCP server is connected, ask your agent to use OGM tools. Start with health and dataset discovery:
Call ogm_health, then ogm_list_datasets.
Search entities in one dataset:
{"dataset_id":"dataset-id","q":"OpenGraphMemory","limit":10}
Inspect graph context with ogm_get_entity, ogm_get_neighbors, ogm_get_subgraph, ogm_get_graph, or ogm_find_path. Use ogm_get_relation_evidence or ogm_get_evidence before making evidence-backed claims.
Upload documents only when profile is personal-safe and file path is under OGM_UPLOAD_ROOTS:
Call ogm_upload_document with an approved local file path and dataset/project context.
More Docs
Validation
uv sync --dev --locked
uv run ruff format --check .
uv run ruff check .
uv run mypy src
uv run pytest -q
uv build
Security
Use project-scoped keys. Keep .env and keys outside upload roots. Start read-only; use personal-safe only for reviewed document uploads. See security.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ogm_agent_bridge-0.1.6.tar.gz.
File metadata
- Download URL: ogm_agent_bridge-0.1.6.tar.gz
- Upload date:
- Size: 81.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e48d5184ee0d44321258e66e21a026a1adef0536ba2beac8fb11e6f336f1a216
|
|
| MD5 |
4ba63d516f63bf0aaa5f25c94693bf59
|
|
| BLAKE2b-256 |
49b56c237c9ee1d3ebf81807bf35ca91f05541c054e704d1ff5f3a13b5ff0691
|
File details
Details for the file ogm_agent_bridge-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ogm_agent_bridge-0.1.6-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8a94f63560969c7511273b47603ae911e33f204093b6d9f8cb549618945861
|
|
| MD5 |
646dac70ff8b01ec6c0c6c9d2371be70
|
|
| BLAKE2b-256 |
e02c80d1c33b96ca6373dcb3cc798c3e7d5b33c869a12396a01569e99c5f6ce1
|