Boxtalk Data MCP Server

Boxtalk Data MCP Server

An MCP server for interacting with SQL Server databases that enables schema inspection, record counting, and paginated data retrieval. It provides tools to explore table structures and fetch specific records while enforcing safety limits on data volume.

Category
访问服务器

README

Boxtalk Data MCP Server

A Model Context Protocol (MCP) server that provides SQL Server database operations with pagination, table structure inspection, and record counting capabilities.

Features

  • Get Table Data: Retrieve paginated data from any SQL Server table
  • Get Record Count: Get the total number of records in a table
  • Get Table Structure: View table schema including columns, data types, primary keys, and foreign keys
  • Configurable Connection: Easy database configuration via JSON file
  • Enforced Pagination: Prevents large data dumps with configurable page sizes (max 1000 records per page)

Prerequisites

  • Node.js (v16 or higher)
  • SQL Server database (local or remote)
  • Database credentials with read access

Installation

  1. Clone or navigate to this directory

  2. Install dependencies:

npm install
  1. Create your configuration file:
cp config.example.json config.json
  1. Edit config.json with your database credentials:
{
  "database": {
    "user": "your_username",
    "password": "your_password",
    "server": "localhost",
    "database": "your_database_name",
    "options": {
      "encrypt": true,
      "trustServerCertificate": false,
      "enableArithAbort": true
    },
    "pool": {
      "max": 10,
      "min": 0,
      "idleTimeoutMillis": 30000
    }
  }
}

Configuration Options

  • user: SQL Server username
  • password: SQL Server password
  • server: SQL Server hostname or IP address
  • database: Database name
  • options.encrypt: Enable encryption (recommended for production)
  • options.trustServerCertificate: Set to true for local development with self-signed certificates
  • pool.max: Maximum number of connections in the pool
  • pool.min: Minimum number of connections in the pool
  • pool.idleTimeoutMillis: Time before idle connections are closed

Alternative Configuration

You can also specify a custom configuration file path using the DB_CONFIG_PATH environment variable:

DB_CONFIG_PATH=/path/to/custom/config.json node index.js

Usage with Claude Desktop

To use this MCP server with Claude Desktop, add it to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "boxtalk-data": {
      "command": "node",
      "args": ["/path/to/boxtalk-data-mcp/index.js"],
      "env": {
        "DB_CONFIG_PATH": "/path/to/boxtalk-data-mcp/config.json"
      }
    }
  }
}

After adding the configuration, restart Claude Desktop.

Available Tools

1. get_table_data

Retrieve paginated data from a SQL Server table.

Parameters:

  • table (required): Table name (e.g., "Users" or "dbo.Users")
  • page (optional): Page number, defaults to 1
  • pageSize (optional): Records per page (1-1000), defaults to 100
  • orderBy (optional): Column to order by, defaults to first column

Example:

Get the first 50 records from the Users table, ordered by UserId

2. get_table_count

Get the total count of records in a table.

Parameters:

  • table (required): Table name (e.g., "Users" or "dbo.Users")

Example:

How many records are in the Orders table?

3. get_table_structure

Get the structure/schema of a table including columns, data types, and constraints.

Parameters:

  • table (required): Table name (e.g., "Users" or "dbo.Users")

Example:

Show me the structure of the Products table

Testing

You can test the server using the MCP inspector:

npm install -g @modelcontextprotocol/inspector
mcp-inspector node index.js

Security Considerations

  • Never commit config.json to version control
  • Use strong database passwords
  • Grant only necessary permissions to the database user
  • Enable encryption for production environments
  • Consider using environment variables for sensitive credentials

Troubleshooting

Connection Errors

If you encounter connection errors:

  1. Verify SQL Server is running and accessible
  2. Check firewall settings allow connection on SQL Server port (default 1433)
  3. Confirm credentials are correct
  4. For local development with self-signed certificates, set trustServerCertificate: true

Authentication Issues

For Windows Authentication, modify config.json:

{
  "database": {
    "server": "localhost",
    "database": "your_database_name",
    "options": {
      "trustedConnection": true,
      "encrypt": true,
      "trustServerCertificate": true
    }
  }
}

Table Not Found

Ensure you specify the correct schema (e.g., "dbo.TableName" instead of just "TableName").

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选