Skip to main content
Glama
rsutana

rocks-db

by rsutana

设置指南:Fullscale Rocks MCP 服务器

本指南介绍了如何安装、配置和启动 fullscale-rocks 数据库的 MCP 服务器。

1. 安装

如果尚未安装,请安装依赖项:

cd rocks-mcp
npm install

2. 配置

服务器需要数据库凭据和 OAuth 公钥。

数据库设置

创建或编辑 rocks-mcp/.env

MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_DATABASE=employee
MYSQL_USER=employee
MYSQL_PASSWORD=thisisapassword

PG_HOST=127.0.0.1
PG_PORT=5432
PG_DATABASE=employee
PG_USER=employee
PG_PASSWORD=thisisapassword

SSE_PORT=3001

身份验证

服务器会自动在以下位置查找 OAuth 公钥: /home/ryscript/fullscale-rocks/rocks-api/storage/oauth-public.key

请确保该文件存在,因为它用于验证来自 rocks-api 的 JWT 令牌。

3. 运行服务器

开发模式

使用 tsx 运行服务器(文件更改时自动重载):

npm run dev

生产模式

构建 TypeScript 代码并启动构建版本:

npm run build
npm start

4. 连接到 AI 应用程序

Claude Desktop

将此配置添加到你的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "rocks-db": {
      "command": "node",
      "args": ["/home/ryscript/fullscale-rocks/rocks-mcp/build/index.js"]
    }
  }
}

通用 MCP 客户端 (SSE)

服务器还支持用于远程或基于 Web 的客户端的服务器发送事件 (SSE)。

  • SSE URL: http://localhost:3001/sse

  • Post Message URL: http://localhost:3001/message

你可以将其与 MCP Inspector 或其他兼容 SSE 的客户端一起使用。

5. 工具参考

服务器公开了以下工具:

工具

用途

要求

execute_read

运行 SELECT 查询

auth_token, db_type

execute_write

运行 INSERT/UPDATE/DELETE

auth_token (仅限管理员), db_type

list_tables

列出所有表

auth_token, db_type

describe_table

显示表的列信息

auth_token, db_type, table_name


注意auth_token 应为从 rocks-api 登录过程中获得的有效 Bearer 令牌。

F
license - not found
-
quality - not tested
-
maintenance - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/rsutana/rocks-db-mcp'

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