使用说明
Azure TableStore MCP服务器
一个基于TypeScript的MCP服务器,可以直接通过Cline与Azure表存储进行交互。此工具允许您查询和管理Azure存储表中的数据。
特性
- 使用OData筛选器支持查询Azure存储表
- 获取表模式以理解数据结构
- 列出存储帐户中的所有表
- 详细的错误处理和响应信息
- 通过连接字符串进行简单配置
安装
地方发展设置
- 克隆存储库:
git clone https://github.com/dkmaker/mcp-azure-tablestorage.git
cd mcp-azure-tablestorage
- 安装依赖项:
npm install
- 构建服务器:
npm run build
NPM安装
您可以通过npm全局安装该包:
npm install -g dkmaker-mcp-server-tablestore
或者直接用npx运行它:
npx dkmaker-mcp-server-tablestore
注意:使用npx或全局安装时,您仍然需要配置AZURE_STORAGE_CONNECION_STRING环境变量。
在Cline中安装
要将Azure TableStore服务器与Cline一起使用,您需要将其添加到MCP设置配置中。配置文件位于:
窗户: %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存储帐户连接字符串
临床应用
⚠️ 重要安全注意事项: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 table
Cline将使用get_table_schema工具:
{
"tableName": "Orders"
}
- 列表表:
List all tables in the storage account
Cline将使用list_tables工具:
{}
项目结构
src/index.ts:具有Azure表存储交互逻辑的主服务器实现build/:编译的JavaScript输出package.json:项目依赖关系和脚本
依赖项
- @azure/数据表:azure表存储客户端库
- @modelcontextprotocol/sdk:MCP服务器实现工具包
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。这意味着您可以自由使用、修改、分发和再许可代码,前提是您包含原始版权声明和许可条款。