Gel Database MCP Server
by MCP-Mirror
A TypeScript-based Model Context Protocol (MCP) server designed to streamline Gel database operations with EdgeQL queries. It provides tools for LLM Agents to automate learning about your schema, and writing, validating, and executing database queries.
Last updated: N/A
What is Gel Database MCP Server?
The Gel Database MCP Server is a TypeScript-based server that enables LLM agents to interact with Gel databases using EdgeQL queries via the Model Context Protocol. It provides tools for schema discovery, query validation, execution, and documentation search, allowing for natural language interaction with your Gel database.
How to use Gel Database MCP Server?
- Install dependencies using
yarn install. 2. Copy yourdbschemafolder. 3. Initialize a Gel project usingnpx gel project init. 4. Generate EdgeQL JavaScript query builder files usingnpx @gel/generate edgeql-js. 5. Update connection settings insrc/index_gel.ts. 6. Build the project usingyarn build. 7. Run the server usingnode build/index.jsor with the inspectornpx @modelcontextprotocol/inspector node build/index.js. 8. (Recommended) Include thegel_llm.txtdocumentation file. Connect the MCP Server in Cursor by adding a new server with type 'Command' and enteringnode your/full/path/to/build/index.js.
Key features of Gel Database MCP Server
Schema Discovery (describe-schema)
EdgeQL Query Validation (validate-query)
EdgeQL Query Execution (execute-edgeql)
Gel Documentation Search (search-gel-docs)
Typescript Query Execution (execute-typescript)
Use cases of Gel Database MCP Server
Automating database interactions with LLM agents.
Generating and validating EdgeQL queries using natural language.
Integrating Gel databases with LLM-powered applications.
Providing LLM agents with access to database schema and documentation.
FAQ from Gel Database MCP Server
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
The Model Context Protocol is a standard that enables LLMs to interact with tools and services, allowing them to perform tasks such as database querying and code execution.
How do I provide Gel documentation to the LLM agent?
How do I provide Gel documentation to the LLM agent?
Include the gel_llm.txt file in your project root and use the search-gel-docs tool for targeted queries. This hybrid approach provides both direct file access and targeted search capabilities.
What LLMs are compatible with this server?
What LLMs are compatible with this server?
While primarily tested with Cursor's agent using Claude-3.7-sonnet-thinking, it should work with other agents and LLMs that support the Model Context Protocol.
How do I handle JavaScript syntax errors when using execute-typescript?
How do I handle JavaScript syntax errors when using execute-typescript?
General JavaScript syntax errors can crash the server. If the connection appears closed, refresh the crashed server in Cursor MCP settings or restart the server.
What are the best practices for using execute-typescript?
What are the best practices for using execute-typescript?
Use await gelClient.query() with console.log to display results. Use ORDER BY with THEN, not commas (e.g., ORDER BY .field1 THEN .field2). Keep code simple and focused on a single operation.