Apache AGE MCP Server is a tool that enables PostgreSQL Graph database capabilities in Azure Database for PostgreSQL. This server implements the Model Context Protocol (MCP), allowing AI assistants like Claude and Visual Studio Code to interact with graph databases through natural language.
Before installing the AGE MCP Server, you'll need:
To enable the AGE extension in your PostgreSQL database:
CREATE EXTENSION IF NOT EXISTS age CASCADE;
brew tap rioriost/age-mcp-server
brew install age-mcp-server
uv init your_project
cd your_project
uv venv
source .venv/bin/activate
uv add age-mcp-server
mkdir your_project
cd your_project
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install age-mcp-server
mkdir your_project
cd your_project
python -m venv venv
.\venv\Scripts\activate
python -m pip install age-mcp-server
Edit the claude_desktop_config.json file located in ~/Library/Application Support/Claude/:
{
"mcpServers": {
"age-manager": {
"command": "age-mcp-server",
"args": [
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"
]
}
}
}
Create a new claude_desktop_config.json file in %APPDATA%\Claude:
{
"mcpServers": {
"age-manager": {
"command": "C:\\Users\\USER\\.local\\bin\\uv.exe",
"args": [
"--directory",
"C:\\path\\to\\your_project",
"run",
"age-mcp-server",
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"
]
}
}
}
For macOS (example with UV):
{
"mcpServers": {
"age-manager": {
"command": "/Users/your_username/.local/bin/uv",
"args": [
"--directory",
"/path/to/your_project",
"run",
"age-mcp-server",
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"
]
}
}
}
To avoid exposing passwords in your configuration, you can omit the password:
{
"mcpServers": {
"age-manager": {
"command": "age-mcp-server",
"args": [
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username"
]
}
}
}
Then either:
PGPASSWORD environment variable, orAfter installation, configure VS Code:
{
"mcp": {
"inputs": [],
"servers": {
"age-manager": {
"command": "/Users/your_user_name/.local/bin/uv",
"args": [
"--directory",
"/path/to/your_project",
"run",
"age-mcp-server",
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password",
"--debug"
]
}
}
}
}
By default, AGE-MCP-Server prohibits write operations for safety. To enable them, add the --allow-write flag:
{
"mcpServers": {
"age-manager": {
"command": "age-mcp-server",
"args": [
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password",
"--allow-write"
]
}
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "age-manager" '{"command":"age-mcp-server","args":["--pg-con-str","host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"age-manager": {
"command": "age-mcp-server",
"args": [
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"age-manager": {
"command": "age-mcp-server",
"args": [
"--pg-con-str",
"host=your_server.postgres.database.azure.com port=5432 dbname=postgres user=your_username password=your_password"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect