Graphify MCP Server: Functionality and Exposed Tools Explained
The Graphify MCP (Model Compute Process) server is a lightweight HTTP service that exposes four core REST endpoints—/api/ingest, /api/query, /api/export, and /health—to manage knowledge graph data with pluggable SQLite or PostgreSQL backends.
The Graphify MCP server acts as the central ingestion and query gateway for the Graphify knowledge graph platform. Designed for containerized deployment, it provides a stateless REST API that handles document ingestion, graph queries, and data exports while supporting multiple storage backends via environment variables. Understanding how this server functions and which tools it exposes is essential for developers integrating Graphify into their data pipelines.
What Is the Graphify MCP Server?
The Graphify MCP server is a Docker-friendly HTTP service that manages the entire lifecycle of knowledge graph data. According to the source documentation in docs/docker-mcp-sqlite.md, the server runs as a standalone process that listens on port 8000 by default and delegates persistence to either SQLite or PostgreSQL based on runtime configuration.
The architecture follows a thin-handler pattern: HTTP requests are received by the server layer, validated, and forwarded to Graphify's core graph-processing engine. This engine handles document indexing, symbol resolution, and query execution independently of the transport protocol, keeping the HTTP API focused strictly on data marshalling and request routing.
Core Architecture and Configuration
Pluggable Storage Backend
At startup, the server inspects the STORAGE_BACKEND environment variable to initialize the appropriate persistence layer. As documented in docs/mcp-api.md, the supported values are:
sqlite(default): Uses a local file specified bySQLITE_DB_PATH(defaults to/data/graphify.db)postgres: Connects to a remote database using the connection string provided inPOSTGRES_CONNECTION_URL
This design allows the same Docker image to be used in development environments (SQLite) and production deployments (PostgreSQL) without modifying application code or rebuilding containers.
Environment-Based Configuration
The server behavior is controlled entirely through environment variables or an optional mounted configuration file. Key variables include:
STORAGE_BACKEND: Selects the database driver (sqliteorpostgres)SQLITE_DB_PATH: File system path for SQLite database filesPOSTGRES_CONNECTION_URL: Full PostgreSQL connection string including credentialsMCP_LOG_LEVEL: Controls verbosity (debug,info,warn,error)
For advanced use cases, you can mount a custom mcp.yaml file to configure indexing options, custom tokenizers, and resource limits (CPU/memory) as noted in docs/docker-mcp-sqlite.md.
Exposed Tools and HTTP Endpoints
The MCP server exposes four primary tools via its HTTP API, each designed for a specific graph management operation.
Ingest Tool (POST /api/ingest)
The /api/ingest endpoint accepts JSON payloads containing document batches to be indexed into the knowledge graph. Each document must include an id, title, and content field, with an optional metadata object for custom attributes like author and tags.
curl -X POST http://localhost:8000/api/ingest \
-H "Content-Type: application/json" \
-d '[{
"id": "doc1",
"title": "Introduction to Graphify",
"content": "Graphify is a knowledge graph platform...",
"metadata": {
"author": "Jane Doe",
"tags": ["graph", "database"]
}
}]'
On success, the server returns a confirmation object indicating the number of documents ingested: { "status": "success", "ingested": 1 }.
Query Tool (POST /api/query)
The /api/query endpoint executes read operations against the stored graph using either GraphQL syntax or Graphify's custom domain-specific language (DSL). Requests must include a query field and optionally a variables object for parameterized queries.
curl -X POST http://localhost:8000/api/query \
-H "Content-Type: application/json" \
-d '{
"query": "{ documents { id title } }",
"variables": {}
}'
The response contains the query results formatted according to the requested schema, allowing clients to retrieve specific node properties and relationships without fetching the entire graph.
Export Tool (GET /api/export)
The /api/export endpoint provides a complete data dump of the knowledge graph in JSON or CSV format. This tool is useful for backups, migrations, or offline analysis.
curl http://localhost:8000/api/export > graph_export.json
Unlike the ingest and query endpoints, the export tool uses HTTP GET and returns the raw data directly in the response body without requiring a request payload.
Health Check Endpoint (GET /health)
The /health endpoint provides a simple liveness probe that returns { "status": "ok" } when the server is operational and connected to its storage backend.
curl http://localhost:8000/health
This endpoint is typically used by container orchestrators (Kubernetes, Docker Compose) to verify service readiness before routing traffic to the instance.
Deployment and Configuration Examples
To run the Graphify MCP server with SQLite storage using Docker, execute the following command from the project root:
docker run -d \
--name graphify-mcp \
-p 8000:8000 \
-e STORAGE_BACKEND=sqlite \
-e SQLITE_DB_PATH=/data/graphify.db \
-e MCP_LOG_LEVEL=info \
-v $(pwd)/data:/data \
graphify/mcp:latest
For PostgreSQL deployments, replace the SQLite variables with the appropriate connection string:
docker run -d \
--name graphify-mcp \
-p 8000:8000 \
-e STORAGE_BACKEND=postgres \
-e POSTGRES_CONNECTION_URL="postgresql://user:password@db-host:5432/graphify" \
graphify/mcp:latest
To use a custom configuration file, mount the mcp.yaml into the container's /app/config/ directory:
docker run -d \
--name graphify-mcp \
-p 8000:8000 \
-v $(pwd)/config/mcp.yaml:/app/config/mcp.yaml \
-v $(pwd)/data:/data \
graphify/mcp:latest
Summary
- The Graphify MCP server is a stateless HTTP service that manages knowledge graph operations via REST endpoints.
- It supports two storage backends (SQLite and PostgreSQL) selected via the
STORAGE_BACKENDenvironment variable. - The server exposes four core tools: Ingest (
/api/ingest), Query (/api/query), Export (/api/export), and Health Check (/health). - Configuration is handled through environment variables or an optional
mcp.yamlfile, making it ideal for containerized deployments. - Full API specifications are documented in
docs/mcp-api.mdanddocs/docker-mcp-sqlite.mdwithin the Graphify repository.
Frequently Asked Questions
What does MCP stand for in Graphify?
MCP stands for Model Compute Process. It refers to the server's role as a computational layer that processes model operations (ingestion, querying, and export) on top of the knowledge graph storage backend.
Can I run the Graphify MCP server without Docker?
While the documentation in docs/docker-mcp-sqlite.md focuses on Docker deployment, the server is designed as a standard HTTP service that can run directly on any system with Python and the required dependencies installed. You would need to set the same environment variables (STORAGE_BACKEND, SQLITE_DB_PATH, etc.) in your host environment.
How do I switch from SQLite to PostgreSQL?
Set the STORAGE_BACKEND environment variable to postgres and provide a valid connection string in POSTGRES_CONNECTION_URL. No code changes are required; the server automatically initializes the appropriate database driver on startup according to the configuration in docs/mcp-api.md.
What query languages does the Query tool support?
The /api/query endpoint supports both GraphQL syntax and Graphify's custom domain-specific language (DSL). You specify the query language in the query field of the JSON payload, and the server parses and executes it against the underlying graph engine.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →