Back to Home
rioriost icon

homebrew-age-mcp-server

by rioriost

Overview

This server provides a tool interface for Large Language Models (LLMs) to interact with and manage graph data stored in Apache AGE on Azure Database for PostgreSQL through Cypher queries, enabling natural language data exploration and manipulation.

Installation

Run Command
age-mcp-server --pg-con-str "host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"

Environment Variables

  • PG_CONNECTION_STRING
  • PGPASSWORD

Security Notes

The server is vulnerable to SQL injection through the 'graph_name' parameter in multiple tools (e.g., 'create-age-graph', 'drop-age-graph', 'get-age-schema', 'read-age-cypher', and 'write-age-cypher'). The 'graph_name' argument, which originates from user/LLM input, is directly inserted into SQL queries using f-strings or string formatting (e.g., `SELECT create_graph('{}')` or `cypher('{graph_name}', $$...$$)`) without proper sanitization or parameterized queries for this specific argument. This allows a malicious input for 'graph_name' (e.g., `my_graph'); DROP TABLE important_data; --`) to execute arbitrary SQL commands, potentially leading to data loss, unauthorized access, or database corruption. While the server includes checks for Cypher-level write operations and parameterized Cypher queries, these do not mitigate the SQL injection vulnerability associated with the 'graph_name' argument. The use of `subprocess.check_output` for Azure CLI token retrieval is a legitimate pattern but executing external commands always carries a minimal inherent risk.

Similar Servers

Stats

Interest Score33
Security Score3
Cost ClassMedium
Avg Tokens750
Stars3
Forks5
Last Update2026-01-18

Tags

Graph DatabaseApache AGEPostgreSQLAI AgentLLM Tooling