Back to MCP directory
publicPublicdnsLocal runtime

Unstructured API

Unstructured API MCP服务器实现,提供与Unstructured API交互的工具,包括管理数据源、工作流和任务的创建、更新、删除等操作。

article

README

🚀 未结构化项目

本项目主要围绕未结构化数据处理相关工具展开,提供了环境变量设置、调试工具使用、客户端功能扩展等功能,方便用户进行数据处理和调试工作。

🚀 快速开始

环境变量设置

  • LOG_LEVEL="ERROR":设置此环境变量可抑制调试输出,仅向用户显示清晰的消息。
  • CONFIRM_TOOL_USE='false':禁用工具使用前的确认提示。⚠️ 重要提示:请谨慎使用此设置,特别是在开发阶段,因为大语言模型(LLM)可能会执行昂贵的工作流程或删除数据。

调试工具使用

Anthropic提供了MCP Inspector工具来调试/测试你的MCP服务器。运行以下命令启动一个调试UI:

mcp dev uns_mcp/server.py

从此处,您可以在左侧窗格中添加环境变量(指向您的本地环境),并在那里包含您的个人API密钥作为环境变量。转到tools,您可以测试添加到MCP服务器的功能。

若需要记录UnstructuredClient调用参数,请设置环境变量DEBUG_API_REQUESTS=false。日志将保存为格式为unstructured-client-{date}.log的文件,可查看该文件以调试UnstructuredClient函数的调用参数。

将终端访问添加到最小客户端

我们将使用@wonderwhy-er/desktop-commander将终端访问权限添加到最小客户端,该工具基于MCP文件系统服务器构建。请注意,客户端(也包括LLM)现在有权访问私人文件

执行以下命令安装该包:

npx @wonderwhy-er/desktop-commander setup

然后使用额外参数启动客户端:

uv run python minimal_client/client.py "http://127.0.0.1:8080/sse" "@wonderwhy-er/desktop-commander"
# 或者
make sse-client-terminal

使用工具的子集

如果你的客户端只支持使用工具的一部分,需要注意以下事项:

  • update_workflow工具需要与create_workflow工具一起加载到上下文中,因为它包含有关如何创建和配置自定义节点的详细描述。

🔧 技术细节

已知问题

  • update_workflow - 需要将工作流的配置(由用户提供或通过调用get_workflow_info工具获得)包含在上下文中,因为此工具不会像patch一样应用更改,而是完全替换工作流配置。

📄 变更日志

任何新开发的功能/修复/增强都将添加到CHANGELOG.md中。在稳定版本之前,优先使用0.x.x-dev预发布格式。

🛠️ 故障排除

  • 若遇到Error: spawn <command> ENOENT错误,意味着<command>未安装或不在PATH中:
    • 确保已安装它并在你的PATH中。
    • 或者在命令字段中提供该命令的绝对路径。例如,在配置中将python替换为/opt/miniconda3/bin/python
READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
Environment variableslockValues stay in this browser tab and are not uploaded or saved
Claude Desktop
{
  "mcpServers": {
    "uns_mcp": {
      "command": "uvx",
      "args": [
        "uns_mcp"
      ],
      "env": {
        "UNSTRUCTURED_API_KEY": "<UNSTRUCTURED_API_KEY>"
      }
    }
  }
}
Save toclaude_desktop_config.json
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client