大响应分块处理服务

一个MCP服务器,用于处理和读取大响应数据的分块。

  • by ebwinters
  • Python
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 ebwinters/chunky-mcp

使用说明

矮胖的mcp

用于处理分块和读取大型响应的MCP服务器

之前:

之后:

快速安装

使用Pip

克隆

  1. git clone https://github.com/ebwinters/chunky-mcp.git
  2. cd chunky-mcp
  3. pip install -e .

用法

在工具中导入助手:

from chunky_mcp_utils import handle_large_response

@mcp.tool()
def my_tool() -> list[types.TextContent]:
    """
    Gets a list of all the employees in the system from the database
    """
    # Call might give a large JSON response
    response = requests.get("https://someblob.com")
    response_data = response.json()
    
    # Chunker handles the large response and calls following read chunk tools
    return handle_large_response(
        response_data,
        my_tool.__name__,
        _chunker
    )

添加MCP条目

"chunky": {
    "type": "stdio",
    "command": "chunky-mcp",
    "args": []
}

开发人员设置

  1. 安装 uv
  2. uv venv
  3. .\.venv\Scripts\activate
  4. uv sync