TT

typedb/typedb-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

13 stars 10 forks 质量 67 趋势 23NOASSERTION

TypeDB MCP 服务器

概览

一个MCP(模式上下文协议)服务器,使AI助手能够与TypeDB数据库交互. 这允许LLMs执行TypeQL查询,管理数据库,并通过自然语言管理用户. 在 Docker 枢纽上可用 : https://hub.docker.com/repository/docker/typedb/typedb-mcp - 运行 TypeQL 读取、写入和计程查询 - : 列表、创建和删除数据库 - : 列表、创建和删除用户 如果您正在本地主机上运行 TypeDB 服务器 : - 替换为 [[T1] 而不是 [[T2] - 在 Linux 上, 添加 -- add- host=host.docker. 内部: host-gateway 3. 添加服务器配置. 在您的工程中创建或编辑. cursor/ mcp.json : 4. 重新启动光标或刷新 MCP 连接 5. 开始聊天!

概述(AI 翻译)

一个MCP(模式上下文协议)服务器,使AI助手能够与TypeDB数据库交互. 这允许LLMs执行TypeQL查询,管理数据库,并通过自然语言管理用户.

在 Docker 枢纽上可用 : https://hub.docker.com/repository/docker/typedb/typedb-mcp

□ 特性

  • 查询执行**:运行类型QL读取、写取和计划查询
  • 数据库管理:列出、创建和删除数据库
  • 用户管理: 列出、创建和删除用户

□ 运行服务器

如果您正在运行 [[T1] 上的 TypeDB 服务器 :

  • 将[[T2]改为[T3],而不是[T4]]
  • 在Linux上,添加--add-host=host.docker.internal:host-gateway

□ 使用光标 IDE

  1. 启动 MCP 服务器(见上文)

  2. 开放光标设置 MCP

  3. 添加服务器配置. 在您的工程中创建或编辑 [[T6] :

  4. 重新启动光标或刷新 MCP 连接

  5. 开始聊天! 您现在可以要求光标 :

  • “列出所有数据库”
  • “创建一个名为’mydb’的数据库”
  • 在数据库“ mydb” 中用属性“ name” 为实体“ person” 进行定义
  • “让一个叫"爱丽丝"的人进来”
  • “查询数据库中的所有人”

本页由 AI 翻译,技术细节请以原文为准。

README

TypeDB MCP Server

An MCP (Model Context Protocol) server that enables AI assistants to interact with TypeDB databases. This allows LLMs to execute TypeQL queries, manage databases, and manage users through natural language.

Available on Docker Hub: https://hub.docker.com/repository/docker/typedb/typedb-mcp

Features

  • Query Execution: Run TypeQL read, write, and schema queries
  • Database Management: List, create, and delete databases
  • User Management: List, create, and delete users

Running the Server

docker run -p 8001:8001 typedb/typedb-mcp: \
  --typedb-address  \
  --typedb-username  \
  --typedb-password 

If you’re running TypeDB server on localhost:

  • replace `` with http://host.docker.internal:8000 instead of http://localhost:8000
  • on Linux, add --add-host=host.docker.internal:host-gateway

Using with Cursor IDE

  1. Start the MCP server (see above)

  2. Open Cursor Settings → MCP

  3. Add the server configuration. Create or edit .cursor/mcp.json in your project:

{
  "mcpServers": {
    "typedb": {
      "url": "http://localhost:8001/mcp"
    }
  }
}
  1. Restart Cursor or refresh MCP connections

  2. Start chatting! You can now ask Cursor to:

    • “List all databases”
    • “Create a database called ‘mydb’”
    • “Define an entity ‘person’ with attribute ‘name’ in database ‘mydb’”
    • “Insert a person with name ‘Alice’”
    • “Query all persons in the database”

Building from Source

Use podman or Docker to create a Docker image and push it to DockerHub:

podman login docker.io

VERSION=
podman build -t typedb/typedb-mcp:$VERSION .
podman push typedb/typedb-mcp:$VERSION
在 GitHub 查看完整 README

安装

docker run -p 8001:8001 typedb/typedb-mcp:<version> \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "typedb": { "url": "http://localhost:8001/mcp" } } }