Skip to main content

mcp-agensgraph-common

Shared core for the AgensGraph MCP servers (cypher, memory, data-modeling). It exists so the three servers don't each re-implement (and drift on) the same plumbing.

What's in it

Module Responsibility
config Merge CLI args + env vars → config dicts (connection_config, transport_config, read_controls). Standardized env var names.
connection DSN building, AsyncConnectionPool lifecycle, ensure_graph, and run_query with database-side read-only enforcement and identifier-quoted graph_path. (needs the db extra)
safety quote_identifiers / quote_label (AgensGraph case-sensitivity; safe rel-type quoting) and a comment-aware is_write_query.
results Parse AgensGraph vertex/edge result strings → JSON (record_to_dict), value_sanitize, truncate_to_tokens.
transport One run_server for stdio / Streamable HTTP / SSE with CORS + TrustedHost middleware.

Read-only enforcement

run_query(..., read_only=True) runs the statement in a READ ONLY transaction, so AgensGraph rejects any Cypher write at the database level — independent of (and stronger than) the client-side is_write_query keyword check, which only exists to return a friendly error.

Install

The DB-backed servers depend on mcp-agensgraph-common[db]; the DB-less data-modeling server depends on mcp-agensgraph-common (no psycopg).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_agensgraph_common-0.2.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_agensgraph_common-0.2.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_agensgraph_common-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_agensgraph_common-0.2.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for mcp_agensgraph_common-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1b5cb394283f154f74be418484f6b0acf0c52d3460a5d38710dbc961861a6ca3
MD5 81a616f62bc4573fe5f2f71a7a702311
BLAKE2b-256 8c069ba7297775fbccf374831b4337078563d24ca170c63e4c4e6f0a0818c409

See more details on using hashes here.

File details

Details for the file mcp_agensgraph_common-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_agensgraph_common-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76f2bc709af843c8e888d7b18ec0287c3b443a8b7efe226c48708c579afb32a7
MD5 065c07971f7567d08883292136404cc4
BLAKE2b-256 5334a9db4e85b59aaf3a995330c89dd9f4332b8770699e498b800abd0e3594dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page