Fillout.io MCP 服务器借助 Fillout.io API,实现表单管理、响应处理和分析等功能,为用户提供便捷的表单操作体验。
fo_live_ 开头。fo_test_ 开头,且仅适用于测试表单。FILLOUT_API_KEY=你的 Fillout.io API 密钥
# 安装依赖
npm install
# 运行开发模式
npm run dev
# 构建生产版本
npm run build
# 构建镜像
docker build -t mcp/fillout .
# 运行容器
docker run -e FILLOUT_API_KEY=你的密钥 mcp/fillout
const form = await client.createForm({
name: "客户反馈",
description: "请分享您的体验",
questions: [
{
type: "ShortAnswer",
name: "您最喜欢的部分是什么?",
required: true
},
{
type: "MultipleChoice",
name: "您会推荐我们吗?",
required: true,
choices: ["是", "否", "可能"]
}
]
});
const response = await client.submitFormResponse(formId, {
responses: [
{
questionId: "q1",
value: "出色的客户服务!"
},
{
questionId: "q2",
value: "是"
}
]
});
以下是常见问题及其解决方案:
服务器提供详细的错误消息以帮助诊断问题:
try {
const forms = await client.listForms();
} catch (error) {
if (error instanceof AuthenticationError) {
// 处理无效 API 密钥
} else if (error instanceof FilloutError) {
// 处理 API 特定错误
} else {
// 处理意外错误
}
}
本项目采用 MIT 许可证。有关详细信息,请参阅 LICENSE 文件。