Token导航 LogoToken导航TokenDH.com
itch (J Redeker) logo
开发工具stdio官方级别未说明来源级核验

itch (J Redeker)

MCP Server

Itch是一个CLI工具和OpenCode插件,用于通过引导式提问帮助AI代理与用户互动探索主题。

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
命令行工具PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

JRedeker

提供方

JRedeker

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run itch demo learning

详细介绍

用于苏格拉底式提问的CLI工具和OpenCode插件-帮助人工智能代理通过引导式查询与用户交互式地探索主题。

特性

  • 交互式终端用户界面,用于回答问题(通过 问卷)
  • 多种问题类型:选择(多选)、确认(是/否)、文本(自由格式)、比例(1-5级)、复选框(多选)
  • 选择/复选框问题的可选自定义“其他”答案
  • 用于AI代理消费的结构化JSON响应
  • 与无缝集成 OpenCode

安装

OpenCode插件

OpenCode插件提供了与 OpenCode.

步骤1:克隆并安装

git clone https://github.com/JRedeker/itch.git
cd itch
uv sync

步骤2:添加到opencode.json

{
  "plugins": ["/path/to/itch/plugin"]
}

配置(可选):

环境变量默认值描述
ITCH_PATH(自动检测)itch可执行文件的显式路径
ITCH_TIMEOUT300000 (5分钟)子进程超时(毫秒)
ITCH_DEBUGfalse启用调试日志记录

插件/README.md 了解更多详情。

用法

CLI演示

尝试交互式演示,看看它是如何工作的:

uv run itch demo learning
uv run itch demo "machine learning" --max 5

问题类型

Itch支持五种问题类型,以实现多样化的苏格拉底式探索:

类型描述必填项
select多选(默认)是(2+)
confirm是/否布尔值
text自由形式文本输入
scale1-5级,可选标签
checkbox多选是(1+)

itch 工具

itch 该工具接受一个主题和预先生成的问题,然后以交互方式呈现给用户。

重要:AI代理在调用工具之前必须生成问题。该工具不生成问题,它只呈现问题并收集答案。

示例工具调用

{
  "topic": "machine learning",
  "questions": [
    {
      "text": "What interests you most about ML?",
      "type": "select",
      "choices": [
        {"label": "Practical applications", "value": "practical"},
        {"label": "Theoretical foundations", "value": "theory"},
        {"label": "Career opportunities", "value": "career"}
      ]
    },
    {
      "text": "Would you like to explore this topic further?",
      "type": "confirm"
    },
    {
      "text": "What specific questions do you have?",
      "type": "text"
    },
    {
      "text": "How confident are you with the basics?",
      "type": "scale",
      "scale_labels": ["Not at all", "Very confident"]
    },
    {
      "text": "Which learning resources do you prefer?",
      "type": "checkbox",
      "choices": [
        {"label": "Online courses", "value": "courses"},
        {"label": "Books", "value": "books"},
        {"label": "Hands-on projects", "value": "projects"},
        {"label": "Tutorials", "value": "tutorials"}
      ]
    }
  ]
}

问题模式

字段类型必填描述
textstring要显示的问题
typestring问题类型: select (默认), confirm, text, scale, checkbox
choicesarray条件必需 select (2+)和 checkbox (1+)
idint问题ID(如果未提供,则自动分配)
allows_custombool显示自定义答案的“其他”选项(默认值:true,仅选择/复选框)
scale_labels\[string,string\]刻度端点的标签,例如。, ["Low", "High"]

选择模式

字段类型必填描述
labelstring显示显示给用户的文本
valuestring选择时返回标识符

响应架构

{
  "status": "complete",
  "topic": "machine learning",
  "questions": [...],
  "answers": [
    {"question_id": 1, "selected_value": "practical", "is_custom": false},
    {"question_id": 2, "selected_value": "true", "is_custom": false},
    {"question_id": 3, "selected_value": "How do neural networks work?", "is_custom": false},
    {"question_id": 4, "selected_value": "3", "is_custom": false},
    {"question_id": 5, "selected_value": "courses,projects", "is_custom": false}
  ]
}
字段类型描述
status字符串"complete", "cancelled",或 "error"
topicstring所探讨的主题
questionsarray被问到的问题(回应)
answersarray用户对每个问题的答案
error弦?错误消息(仅当状态为 "error")

按类型列出的答案值格式:

  • select:所选选项的 value
  • confirm: "true""false"
  • text:输入的文本字符串
  • scale: "1" 通过 "5"
  • checkbox:逗号分隔的值,例如。, "a,b,c"

验证规则

  • 主题:必填,非空字符串
  • 问题:需要1-20个问题
  • 选择问题:必须至少有2个选项
  • 复选框问题:必须至少有一个选择
  • 每一个选择:必须具有非空标签和值
  • 刻度标签:如果提供,必须恰好是2个元素

从MCP服务器迁移

如果您使用的是MCP服务器(itch-server)在0.2.0之前的版本中,您需要迁移到OpenCode插件:

  1. 删除MCP服务器配置 从您的Claude Desktop或其他MCP客户端配置
  2. 安装OpenCode插件 通过将插件路径添加到您的 opencode.json:
   {
     "plugins": ["/path/to/itch/plugin"]
   }
  1. 更新您的依赖关系:运行 uv sync 删除未使用的 mcp 依赖

itch 工具功能保持不变,只是集成方法发生了变化。

发展

先决条件

  • Python 3.11+
  • 紫外线 用于Python依赖管理
  • Node.js 22+(用于插件开发)

设置

# Clone the repository
git clone https://github.com/JRedeker/itch.git
cd itch

# Install Python dependencies
uv sync

# Install plugin dependencies (optional)
cd plugin && npm install

运行测试

# Python tests
uv run pytest

# All quality checks
uv run ruff check src/ tests/ && uv run ty check src/ && uv run pytest

# TypeScript checks (in plugin/)
cd plugin && npm run check

许可证

麻省理工学院

仓库

https://github.com/JRedeker/itch

目录标签

目录标签

命令行工具PythonClaude问答工具本地部署AI交互引导式提问CLI工具OpenCode插件

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP