Azure TableStore MCP 服务器
基于 TypeScript 的 MCP 服务器,支持通过 Cline 直接与 Azure 表存储交互。此工具允许您查询和管理 Azure 存储表中的数据。
特征
使用 OData 过滤器支持查询 Azure 存储表
获取表模式以了解数据结构
列出存储帐户中的所有表
详细的错误处理和响应信息
通过连接字符串进行简单配置
Related MCP server: Cloudinary MCP Server
安装
本地开发设置
克隆存储库:
git clone https://github.com/dkmaker/mcp-azure-tablestorage.git
cd mcp-azure-tablestorage安装依赖项:
npm install构建服务器:
npm run buildNPM 安装
您可以通过 npm 全局安装该包:
npm install -g dkmaker-mcp-server-tablestore或者直接用 npx 运行:
npx dkmaker-mcp-server-tablestore注意:使用 npx 或全局安装时,您仍然需要配置 AZURE_STORAGE_CONNECTION_STRING 环境变量。
在 Cline 中安装
要将 Azure TableStore 服务器与 Cline 一起使用,您需要将其添加到 MCP 设置配置中。配置文件位于:
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
将以下内容添加到您的配置中:
{
"mcpServers": {
"tablestore": {
"command": "node",
"args": ["C:/path/to/your/mcp-azure-tablestorage/build/index.js"],
"env": {
"AZURE_STORAGE_CONNECTION_STRING": "your_connection_string_here" // Required: Your Azure Storage connection string
}
}
}
}将C:/path/to/your/mcp-azure-tablestorage替换为您克隆存储库的实际路径。
配置
服务器需要以下环境变量:
AZURE_STORAGE_CONNECTION_STRING:您的 Azure 存储帐户连接字符串
在 Cline 中的用法
⚠️重要安全提示:query_table 工具会返回有限的结果子集(默认值:5 个),以保护 LLM 的上下文窗口。除非用户明确确认,否则请勿增加此限制,因为较大的结果集可能会使上下文窗口不堪重负。
安装完成后,您可以通过 Cline 使用 Azure TableStore 服务器。以下是一些示例:
查询表:
Query the Users table where PartitionKey is 'ACTIVE'Cline 将使用 query_table 工具:
{
"tableName": "Users",
"filter": "PartitionKey eq 'ACTIVE'",
"limit": 5 // Optional: Defaults to 5 items. WARNING: Do not increase without user confirmation
}答复将包括:
符合查询条件的项目总数(无限制)
为确保 LLM 安全处理,项目子集有限(默认为 5)
应用极限值
例如:
{
"totalItems": 25,
"limit": 5,
"items": [
// First 5 matching items
]
}这种设计使 LLM 能够在处理可管理的子集的同时理解数据的全部范围。默认限制为 5 个条目,可以防止 LLM 的上下文窗口过载——只有在用户明确确认的情况下才应增加此限制。
获取表模式:
Show me the schema for the Orders tableCline 将使用 get_table_schema 工具:
{
"tableName": "Orders"
}列出表格:
List all tables in the storage accountCline 将使用 list_tables 工具来执行以下操作:
{}项目结构
src/index.ts:具有 Azure 表存储交互逻辑的主服务器实现build/:编译后的 JavaScript 输出package.json:项目依赖项和脚本
依赖项
@azure/data-tables:Azure 表存储客户端库
@modelcontextprotocol/sdk:MCP 服务器实现工具包
执照
本项目采用 MIT 许可证 - 详情请参阅LICENSE文件。这意味着您可以自由使用、修改、分发和再授权代码,前提是您包含原始版权声明和许可条款。