Token导航 LogoToken导航TokenDH.com
bidur (Ogulcanakca) logo
AI代理stdio官方级别未说明来源级核验

bidur (Ogulcanakca)

MCP Server

@modelcontextprotocol/inspector

bidur是一个通过模型上下文协议(MCP)为AI代理动态生成表单的服务,适用于需要从用户收集特定数据的场景。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
PythonClaudeAI代理Claude DesktopClaudeCursorVS Code

安装说明

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

作者 / 组织

ogulcanakca

提供方

ogulcanakca

最后核验

2026/5/17 20:20

运行时

Node.js

快速接入

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

命令预览

npx @modelcontextprotocol/inspector

详细介绍

投标人

毕,有些信息不见了!让我生成UI来收集缺失的部分。

通过模型上下文协议(MCP)为AI代理生成动态表单。

现场演示

试用bidur演示→

它做什么

Agent: "I need api_key, project_name from the user"
       ↓
MCP Server creates a form → User fills it in browser → Data returns to agent

快速开始

选项1:远程SSE(建议用于测试)

from agents import Agent, Runner
from agents.mcp import MCPServerSse

async def main():
    async with MCPServerSse(
        params={
            "url": "https://gen-ui-mcp-server.onrender.com/sse",
            "headers": {"X-OpenAI-API-Key": "sk-..."},
        },
        client_session_timeout_seconds=300,
    ) as mcp_server:
        
        agent = Agent(
            name="My Agent",
            instructions="Use collect_user_input to gather info from user.",
            mcp_servers=[mcp_server],
        )
        
        result = await Runner.run(agent, "Collect user's name and email")

选项2:Docker(本地开发)

cd docker
docker-compose up -d

# MCP Server: http://localhost:8080
# Form Server: http://localhost:9110

然后用MCP检查员进行测试:

npx @modelcontextprotocol/inspector

将URL设置为 http://localhost:8080/sse 浏览器用户界面。添加一个名为X-OpenAI-API-Key的新自定义标头。在值字段中输入您的OpenAI API键。

选项3:带MCP检查器的远程SSE

npx @modelcontextprotocol/inspector sse https://gen-ui-mcp-server.onrender.com/sse --header "X-OpenAI-API-Key: sk-..."

然后在浏览器UI中:

  1. 将URL设置为: https://gen-ui-mcp-server.onrender.com/sse
  2. 首选 工具 标签
  3. collect_user_input 带有测试输入
  4. 检查 服务器通知 表单URL

测试

python examples/mcp_sse_example.py

安装

git clone https://github.com/ogulcanakca/bidur.git
cd bidur
pip install -r requirements.txt

export OPENAI_API_KEY=sk-...

可用工具

collect_user_input

参数类型说明
missing_fieldslist[str]要收集的字段名称(例如。, ["username", "email"])
contextstr可选上下文,可更好地生成表单
timeout_secondsint最大等待时间(默认值:300)

退货:

{
  "form_url": "https://...",
  "message": "User successfully submitted the form",
  "data": {"username": "john", "email": "john@example.com"}
}

建筑

┌─────────────┐     SSE      ┌─────────────┐     HTTP     ┌─────────────┐
│   Agent     │◄────────────►│ MCP Server  │◄────────────►│ Form Server │
│ (Your App)  │              │  Port 8080  │              │  Port 9110  │
└─────────────┘              └─────────────┘              └─────────────┘
                                    │                            │
                              Tool Handler                  HTML/JS Form
                              API Key Mgmt                  Schema Gen

项目结构

gen-ui-mcp/
├── src/gen_ui/
│   ├── mcp_server/          # MCP Server implementation
│   │   ├── server.py        # SSE transport, tool routing
│   │   └── tools.py         # collect_user_input tool
│   ├── agents/              # Form schema generation
│   └── tools/               # Standalone tool (non-MCP)
├── ui/html/
│   ├── server.py            # Form Server HTTP API
│   └── index.html           # Form UI
├── docker/
│   ├── Dockerfile.mcp
│   ├── Dockerfile.form
│   └── docker-compose.yml
├── examples/
│   └── mcp_sse_example.py   # SSE connection example
└── run_mcp_server.py        # Entry point (stdio/sse)

备注

客户端限制

正在进行的研究: VS Code、Cursor和Claude Desktop客户端在工具执行期间当前不显示日志通知。这意味着表单URL在表单提交后才可见。正在调查替代方法。

OpenAI代理SDK功能

内置护栏:

护栏类型说明
safety_guardrail输入验证字段名称,检查注射模式
llm_field_validation_guardrail输入对可疑字段名进行基于LLM的语义验证
schema_format_guardrail输出验证JSON模式结构和属性定义

目录标签

目录标签

PythonClaudeAI代理动态表单本地部署数据收集MCP协议

支持客户端

Claude DesktopClaudeCursorVS Code

接入字段

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

stdio

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

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@modelcontextprotocol/inspector

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdioapi-key部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP