Skip to main content
Glama
Orphnet

@orphnet/d1-eloquent-mcp

by Orphnet

@orphnet/d1-eloquent-mcp

MCP 服务器,为 Claude (以及任何 Model Context Protocol–兼容的客户端) 提供对您的 d1-eloquent 项目的实时、上下文感知的访问——模型、迁移、模式、填充器、工厂和 CLI。

bunx @orphnet/d1-eloquent-mcp

它能给 Claude 带来什么

24 个工具、6 个资源、2 个提示。

内省 (只读)

  • list_models · read_model · list_migrations · read_migration · migration_status

  • inspect_schema - 查询 sqlite_master 以查看您的 D1 中实际存在的内容

  • query_d1 - 针对本地 D1 的只读 SQL (仅限 SELECT/WITH/EXPLAIN/PRAGMA)

  • list_seeders · list_factories · read_file · refresh_project

  • validate_model · validate_all - 将声明的模型形状与实际模式进行比较,报告差异

生成 (委托给 d1-eloquent CLI)

  • make_model · make_migration · make_seeder · make_factory

  • make_resource - 一次完成模型 + 迁移 + 填充器 + 工厂

  • make_pivot

执行 (委托给 d1-eloquent CLI,默认使用本地 D1)

  • run_migrate · run_rollback · run_fresh · run_seed

  • run_generate - 模式差异:编写迁移,弥补模型与实时模式之间的差距

资源 - Claude 可以将这些作为背景上下文引入

  • d1-eloquent://project/summary - 您项目中发现的状态

  • d1-eloquent://docs/api/base-model

  • d1-eloquent://docs/api/query-builder

  • d1-eloquent://docs/api/relationships

  • d1-eloquent://docs/api/transactions

  • d1-eloquent://docs/guide/quick-start

提示 - 预构建的多步骤工作流程

  • create-model - 在单次聊天中完成脚手架生成 + 迁移 + 验证

  • audit-schema - 将每个模型与实际 D1 模式进行比较,报告差异

Related MCP server: Semantic D1 MCP

安装

Claude Code

claude mcp add d1-eloquent -- bunx @orphnet/d1-eloquent-mcp

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "d1-eloquent": {
      "command": "bunx",
      "args": ["@orphnet/d1-eloquent-mcp"]
    }
  }
}

按项目 (Claude Code)

.claude/mcp.json:

{
  "mcpServers": {
    "d1-eloquent": {
      "command": "bunx",
      "args": ["@orphnet/d1-eloquent-mcp"]
    }
  }
}

要指向非当前目录的项目:

{
  "mcpServers": {
    "d1-eloquent": {
      "command": "bunx",
      "args": ["@orphnet/d1-eloquent-mcp", "--project", "/path/to/your/d1-eloquent-project"]
    }
  }
}

要求

  • Node.js ≥ 22

  • 已安装 wrangler 并完成 D1 访问认证 (bun add -D wrangler)

  • 一个已有的 @orphnet/d1-eloquent 项目 - 服务器通过扫描文件树来发现模型/迁移/填充器

安全性

  • query_d1 拒绝除 SELECT / WITH / EXPLAIN / PRAGMA 之外的任何操作,并拒绝多语句负载。

  • read_file 拒绝包含 .. 或以 / 开头的路径。

  • 生成工具会调用您现有的 d1-eloquent CLI - 它们不包含自己的写入器。

  • 执行工具 (run_migrate / run_rollback / run_fresh / run_seed) 默认仅操作本地 D1。对于远程环境,请直接通过 CLI 运行。

许可证

MIT

Install Server
A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI-assisted analysis and optimization of Cloudflare D1 databases through comprehensive schema introspection, relationship mapping, validation, and optimization recommendations. Demonstrates semantic intent patterns with hexagonal architecture for maintainable database development workflows.
    4
    2
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    A Node.js MCP server that gives Claude Code direct access to file operations, database queries, PHP execution, SFTP deployment, and over 60 specialized tools for development and debugging.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

  • The bridge from K2 agents through Wrangler to your master AI - safe, approval-gated Cloudflare ops.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Orphnet/d1-eloquent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server