Apache AGE MCP

We need to translate the given text from English to Thai. The text describes an MCP server for Apache AGE graph databases on PostgreSQL. It lists features: 21 MCP tools, F#/.NET, production-grade, open source, documentation. We must preserve product names, protocol names, URLs, numbers, technical terms. No extra commentary. Translate only the text inside <text>. Do not include the name "Apache AGE MCP" unless it appears in source. The source text does include "Apache AGE" and "Apache AGE MCP server" but the instruction says "Do not include the name unless it appears in the source text." The name "Apache AGE MCP" appears in the source? Actually the source says "MCP server for Apache AGE graph databases" and later "Apache AGE MCP server". So "Apache AGE" appears, but the exact name "Apache AGE MCP" as a product name? The instruction says "Name to preserve: Apache AGE MCP" but then says "Do not include the name unless it appears in the source text." The source

เอกสาร

age-mcp

MCP server for Apache AGE graph databases. Lets AI assistants (Claude, ChatGPT, Copilot, etc.) query and mutate graph data via the Model Context Protocol.

Built with F# on .NET 10 -- 1,300 lines, 21 tools, zero Python dependencies.

Quick Start

# 1. Start the database
docker compose up -d

# 2. Install the tool
dotnet tool install --global AgeMcp

# 3. Run
AGE_CONNECTION_STRING="Host=localhost;Port=5435;Database=agemcp;Username=agemcp;Password=agemcp" age-mcp

Claude Desktop / Claude Code

{
  "mcpServers": {
    "age-mcp": {
      "type": "stdio",
      "command": "age-mcp",
      "env": {
        "AGE_CONNECTION_STRING": "Host=localhost;Port=5435;Database=agemcp;Username=agemcp;Password=agemcp",
        "TENANT_ID": "default"
      }
    }
  }
}

Tools (21)

Graph Management

ToolDescription
get_or_create_graphGet or create a graph by name
list_graphsList all graphs (tenant-scoped)
drop_graphsDrop one or more graphs

Vertices & Edges

ToolDescription
upsert_vertexInsert or update a vertex (merge on ident)
upsert_edgeInsert or update a directed edge
upsert_graphBatch upsert vertices + edges (transactional)
drop_vertexRemove a vertex and all its edges
drop_edgeRemove an edge by ident

Query

ToolDescription
cypher_queryExecute a read Cypher query
cypher_writeExecute a write Cypher query, returns affected count
search_verticesSearch by label and/or property
search_edgesSearch edges by label
get_neighborsN-hop traversal (1-5 hops, directional)
get_schemaAll node labels and counts

Export / Import

ToolDescription
export_graphExport graph as JSON
import_graphImport from JSON (creates graph if needed)

Visualization & Search

ToolDescription
generate_visualizationInteractive vis.js HTML graph
semantic_searchVector similarity search (pgvector)
graph_contextGraph RAG: semantic seeds + N-hop expansion

OpenBrain Bridge

ToolDescription
sync_to_openbrainExport vertices as OpenBrain memories
import_from_openbrainBuild graph from OpenBrain memories

Configuration

VariableRequiredDefaultDescription
AGE_CONNECTION_STRINGyeslocalhost test DBNpgsql connection string
TENANT_IDnodefaultTenant prefix for graph names
EMBEDDING_API_URLno--OpenAI-compatible embedding API
EMBEDDING_API_KEYno--API key for embeddings
EMBEDDING_MODELnotext-embedding-3-smallEmbedding model name
EMBEDDING_DIMENSIONSno384Vector dimensions

Docker

The included Docker setup runs PostgreSQL 17 + Apache AGE 1.6.0 + pgvector:

docker compose up -d

Versions and credentials are configurable via .env (see .env.example):

PG_MAJOR=17  AGE_VERSION=1.6.0  DB_PORT=5435  docker compose up -d

Data Compatibility

Designed as a drop-in replacement for agemcp (Python). Same tenant prefix (t_{TENANT_ID}__), same vertex ident property, same edge start_ident/end_ident properties. Existing data works without migration.

Performance

BenchmarkDotNet on Apple M1 Pro, .NET 10.0.5:

OperationLatencyAllocated
list_graphs62 ns216 B
get_schema117 ns344 B
cypher_query (1 vertex)1.0 ms58 KB
search_vertices1.0 ms36 KB
get_neighbors (depth=1)92 ms233 KB
export_graph (40 entities)71 ms472 KB

Building from Source

git clone https://github.com/Neftedollar/age-mcp.git
cd age-mcp
dotnet build

# Run directly
dotnet run

# Or install as tool
dotnet pack -c Release
dotnet tool install --global AgeMcp

Dependencies (FsMcp.Core, FsMcp.Server, Fyper) are restored from NuGet automatically.

License

MIT