
Apache AGE MCP Server
Apache AGE MCP Server
An MCP server for querying Apache AGE graphs in PostgreSQL.
Version 0.3.0 makes read-only operation the secure default, adds asynchronous connection pooling, safe Cypher parameters and bounded cursor pagination, and returns MCP structured content from every tool.
Enable AGE in the target database:
CREATE EXTENSION IF NOT EXISTS age CASCADE;With uv:
uv init your_project
cd your_project
uv add age_mcp_serverWith a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install age_mcp_serverWith Homebrew:
brew install rioriost/tap/age_mcp_serverAvoid placing a database password in command-line arguments. Supply a connection
string through PG_CONNECTION_STRING and use one of libpq's credential mechanisms,
such as PGPASSWORD or a protected PostgreSQL password file.
{
"mcpServers": {
"age_manager": {
"command": "age_mcp_server",
"env": {
"PG_CONNECTION_STRING": "host=db.example port=5432 dbname=postgres user=age_reader sslmode=require",
"PGPASSWORD": "replace-with-a-secret"
}
}
}
}Treat the MCP client configuration as a secret if it contains PGPASSWORD. A
PostgreSQL password file or the client's secret store is preferable.
The connection string can still be supplied explicitly when necessary:
age_mcp_server --pg-con-str "host=db.example dbname=postgres user=age_reader sslmode=require"For Microsoft Entra authentication to Azure Database for PostgreSQL, first sign in with the Azure CLI, then opt in to token acquisition:
age_mcp_server \
--pg-con-str "host=server.postgres.database.azure.com dbname=postgres user=identity sslmode=require" \
--azure-identityRead-only mode is the default:
| Tool | Purpose |
|---|---|
read-age-cypher | Run a validated, parameterized, paginated read-only Cypher query |
list-age-graphs | List Apache AGE graphs |
get-age-schema | Inspect counts, directions, and sampled property types |
Write tools are only advertised and accepted when the server starts with
--allow-write:
| Tool | Purpose |
|---|---|
write-age-cypher | Run Cypher containing a mutating clause |
create-age-graph | Create a graph |
drop-age-graph | Permanently drop a graph |
age_mcp_server --allow-writeUse a separate, least-privileged database role for write mode. Enabling the flag does not grant PostgreSQL privileges that the configured role does not already have.
CALL is considered side-effecting and requires write mode.$parameters are accepted only when placeholder names exactly match a
JSON parameter object. The object is capped at 100,000 bytes and passed to AGE
through a prepared statement.RETURN
clause per query branch.Change the timeout when needed:
age_mcp_server --statement-timeout-ms 60000The timeout must be between 1 millisecond and 1 hour.
Tune the asynchronous connection pool or load the AGE library for every newly opened pooled connection:
age_mcp_server --pool-min-size 2 --pool-max-size 8 --load-ageThe pool must satisfy 1 <= min <= max <= 64. RETURN * remains unsupported;
list return values explicitly so Apache AGE's SQL result types can be declared.
Example tool input with parameters and pagination:
{
"graph_name": "people",
"query": "MATCH (n:Person) WHERE n.age >= $minimum RETURN n.name AS name ORDER BY name",
"parameters": {"minimum": 18},
"page_size": 25
}Pass the returned nextCursor as cursor to fetch the next page.
Install the optional exporter dependencies and enable OTLP export:
python3 -m pip install "age_mcp_server[telemetry]"
age_mcp_server --enable-telemetry --otel-service-name age-productionThe exporter follows standard OTEL_EXPORTER_OTLP_* environment variables.
Traces and metrics record operation latency, counts, and failures. Connection
details, Cypher text, parameter values, and raw database errors are excluded.
Install all development dependencies and run the release gate:
make sync
make checkmake check runs Ruff, the 80% coverage gate, Bandit, the locked dependency audit,
and package builds. The test suite includes a live Apache AGE integration test:
AGE_TEST_CONNECTION_STRING="host=127.0.0.1 dbname=postgres user=postgres password=postgres" \
make integrationCI runs this test against the official Apache AGE PostgreSQL container. See the 0.3.0 review for the completed security and feature review.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add age_manager -- age_mcp_server{
"mcpServers": {
"age_manager": {
"env": {
"PGPASSWORD": "",
"PG_CONNECTION_STRING": ""
},
"command": "age_mcp_server"
}
}
}code --add-mcp '{"name":"age_manager","env":{"PGPASSWORD":"","PG_CONNECTION_STRING":""},"command":"age_mcp_server"}'[mcp_servers.age_manager]
command = "age_mcp_server"Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/age-mcp-server to learn what the "AGE MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
This server runs locally, so we can't read its tool list over the web yet.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/age-mcp-server)Nothing comparable is listed yet.
0.3.0Release 0.3.0Release notes0.2.50Release 0.2.50Release notes0.2.49Release 0.2.49Release notes0.2.48Release 0.2.48Release notes0.2.47Release 0.2.47Release notes0.2.46Release 0.2.46Release notes0.2.45Release 0.2.45Release notes0.2.44Release 0.2.44Release notes0.2.43Release 0.2.43Release notes0.2.42Release notes0.2.41Release notes0.2.40Release notes0.2.39Release notes0.2.38Release notes0.2.37Release notes0.2.36Release notes0.2.35Release notes0.2.34Release notes0.2.33Release notes0.2.32Release notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "age-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.