类型mcp
用于Typeform API的MCP服务器。将Typeform操作作为MCP工具公开,可从支持模型上下文协议的任何客户端使用。
需求
- Python 3.12+
- 紫外线 已安装(
pip install uv 或 brew install uv) - A字体 个人访问令牌
快速安装
在不克隆仓库的情况下使用服务器的最简单方法:
TYPEFORM_TOKEN=tfp_... uvx --from git+https://github.com/dscovr/typeform-mcp typeform-mcp
MCP配置
复制 .mcp.json.example 到 .mcp.json 在项目的根目录中,填写您的令牌:
{
"mcpServers": {
"typeform": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/dscovr/typeform-mcp",
"typeform-mcp"
],
"env": {
"TYPEFORM_TOKEN": "tfp_YOUR_PERSONAL_TOKEN"
}
}
}
}
注: .mcp.json 列在 .gitignore 因为它以纯文本形式包含您的令牌。永远不要承诺。
本地开发
# Clone the repo
git clone https://github.com/dscovr/typeform-mcp
cd typeform-mcp
# Install dependencies
uv sync --group dev
# Run tests
uv run pytest
# Start the server locally
TYPEFORM_TOKEN=tfp_... uv run python -m typeform.server
要将本地版本用作MCP服务器,请更新 .mcp.json:
{
"mcpServers": {
"typeform": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "/absolute/path/to/typeform-mcp", "typeform-mcp"],
"env": {
"TYPEFORM_TOKEN": "tfp_YOUR_PERSONAL_TOKEN"
}
}
}
}
可用工具
表单
| 工具 | 说明 |
|---|
typeform_list_forms | 列出帐户中的所有表单 |
typeform_get_form | 按ID获取表格 |
typeform_create_form | 创建新表单 |
typeform_update_form | 替换表单(PUT) |
typeform_patch_form | 部分更新表格(PATCH) |
typeform_delete_form | 删除表单 |
typeform_duplicate_form | 复制现有表单 |
typeform_get_messages | 获取表单的自定义消息 |
typeform_update_messages | 更新表单的自定义消息 |
回复
| 工具 | 说明 |
|---|
typeform_list_responses | 列出表单的响应 |
typeform_export_responses_csv | 将所有响应导出为CSV |
typeform_delete_responses | 删除特定回复 |
typeform_download_file | 下载响应所附的文件 |
网络钩子
| 工具 | 说明 |
|---|
typeform_list_webhooks | 列出表单的webhooks |
typeform_get_webhook | 获取特定的webhook |
typeform_upsert_webhook | 创建或更新webhook |
typeform_delete_webhook | 删除webhook |
主题
| 工具 | 说明 |
|---|
typeform_list_themes | 列出可用主题 |
typeform_get_theme | 按ID获取主题 |
typeform_create_theme | 创建新主题 |
typeform_update_theme | 替换主题(PUT) |
typeform_patch_theme | 部分更新主题(PATCH) |
typeform_delete_theme | 删除主题 |
图像
| 工具 | 说明 |
|---|
typeform_list_images | 列出上传的图像 |
typeform_get_image | 按ID获取图像 |
typeform_create_image | 上传新图像(base64) |
typeform_delete_image | 删除图像 |
工作区
| 工具 | 说明 |
|---|
typeform_list_workspaces | 列出工作区 |
typeform_get_workspace | 按ID获取工作区 |
typeform_create_workspace | 创建新工作区 |
typeform_update_workspace | 重命名工作区 |
typeform_delete_workspace | 删除工作区 |
翻译
| 工具 | 说明 |
|---|
typeform_list_translations | 列出表单的翻译 |
typeform_get_translation_statuses | 获取翻译状态 |
typeform_update_translation | 更新翻译 |
typeform_delete_translation | 删除翻译 |
typeform_auto_translate | 触发自动翻译 |
账户
| 工具 | 说明 |
|---|
typeform_get_account | 获取当前帐户配置文件 |
项目结构
src/typeform/
__init__.py # Public type exports
models.py # Pydantic models for forms, fields, logic, etc.
client.py # HTTP client for the Typeform API
server.py # MCP server entry point
tests/
test_client.py # Unit tests for the client
test_models.py # Unit tests for the models
许可证
麻省理工学院