Thinkic MCP服务器
A生产质量 模型上下文协议 (MCP)服务器 思考 REST管理API和GraphQL API。让人工智能助手(Claude、GPT等)直接与您的Thinkific网站交互——管理课程、学生、注册、订单、优惠券、社区等。
特性
- 108个MCP工具 涵盖整个Thinkific API表面-77个REST工具和31个GraphQL工具
- 完整的REST覆盖 --课程、用户、注册、订单、产品、捆绑包、优惠券、组、讲师、评论、促销、类别、网站脚本、外部订单、发布请求等
- GraphQL支持 --通过以下方式查询和修改社区、帖子、课程、作业和高级数据访问
https://api.thinkific.com/stable/graphql - 3 MCP资源 获取快速站点概览数据
- 双重认证 -API密钥或OAuth承载令牌
- 分页 在每个列表端点上(页面+限制参数)
- 限速意识 --对429个响应进行指数回退的自动重试
- 结构化错误处理 --人为可读错误,永远不会导致服务器崩溃
- TypeScript --全类型,严格模式,JSDoc贯穿始终
快速开始
1.安装
# Clone or copy the project
cd ~/Documents/thinkific-mcp
# Install dependencies
npm install
# Build
npm run build
2.配置身份验证
你需要 一 在两种身份验证方法中:
选项A:API密钥(单个站点)
在Thinkific管理员中查找您的API密钥: 设置→ 代码和分析→ API.
export THINKIFIC_API_KEY="your-api-key"
export THINKIFIC_SUBDOMAIN="your-site-subdomain"
选项B:OAuth令牌(多站点应用程序)
export THINKIFIC_OAUTH_TOKEN="your-oauth-bearer-token"
3.跑步
# Direct
node dist/index.js
# Or via npm
npm start
使用Claude Desktop
添加到您的Claude Desktop MCP配置(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"thinkific": {
"command": "node",
"args": ["/path/to/thinkific-mcp/dist/index.js"],
"env": {
"THINKIFIC_API_KEY": "your-api-key",
"THINKIFIC_SUBDOMAIN": "your-subdomain"
}
}
}
}
使用OpenClaw/mcporter
# Register the server
mcporter add thinkific -- node /path/to/thinkific-mcp/dist/index.js
# Set env vars
mcporter env thinkific THINKIFIC_API_KEY=your-api-key
mcporter env thinkific THINKIFIC_SUBDOMAIN=your-subdomain
# Verify tools are visible
mcporter tools thinkific
REST工具参考
用户
| 工具 | 说明 | 关键参数 |
|---|
list_users | 列出所有用户/学生 | page, limit |
get_user | 按ID获取用户详细信息 | user_id |
create_user | 创建新用户 | first_name, last_name, email, password?, roles?, company?, send_welcome_email? |
search_users | 按电子邮件/姓名搜索用户 | query, page, limit |
update_user | 更新用户详细信息 | user_id,要更新的字段 |
delete_user | 删除用户 | user_id |
注册人数
| 工具 | 说明 | 关键参数 |
|---|
list_enrollments | 列出注册(可过滤) | page, limit, query_user_id?, query_course_id?, query_email? |
create_enrollment | 为用户注册课程 | course_id, user_id, activated_at?, expiry_date? |
get_enrollment | 按ID获取注册详细信息 | enrollment_id |
update_enrollment | 更新注册 | enrollment_id,要更新的字段 |
课程
| 工具 | 说明 | 关键参数 |
|---|
list_courses | 列出所有带页码的课程 | page, limit |
get_course | 按ID获取单门课程 | course_id |
章节
| 工具 | 说明 | 关键参数 |
|---|
list_chapters | 列出课程中的章节 | course_id, page, limit |
get_chapter | 按ID获取章节详细信息 | chapter_id |
目录
| 工具 | 说明 | 关键参数 |
|---|
list_contents | 在一章中列出课程 | chapter_id, page, limit |
get_content | 按ID获取内容/课程详细信息 | content_id |
订单
| 工具 | 说明 | 关键参数 |
|---|
list_orders | 列出订单(可过滤) | page, limit, query_user_id?, query_email? |
get_order | 按ID获取订单详细信息 | order_id |
产品
| 工具 | 说明 | 关键参数 |
|---|
list_products | 列出所有产品 | page, limit |
get_product | 按ID获取产品详细信息 | product_id |
list_related_products | 列出相关产品 | product_id, page, limit |
捆绑包
| 工具 | 说明 | 关键参数 |
|---|
list_bundles | 列出课程包 | page, limit |
get_bundle | 按ID获取捆绑包详细信息 | bundle_id |
list_bundle_courses | 在捆绑包中列出课程 | bundle_id, page, limit |
list_bundle_enrollments | 列出捆绑注册 | bundle_id, page, limit |
create_bundle_enrollment | 将用户注册到捆绑包中 | bundle_id, user_id |
update_bundle_enrollment | 更新捆绑包注册 | bundle_id, enrollment_id,要更新的字段 |
群组
| 工具 | 说明 | 关键参数 |
|---|
list_groups | 列出所有组 | page, limit |
get_group | 按ID获取组详细信息 | group_id |
create_group | 创建新组 | name |
delete_group | 删除组 | group_id |
集团分析师
| 工具 | 说明 | 关键参数 |
|---|
list_group_analysts | 列出某个组的分析师 | group_id, page, limit |
add_group_analyst | 将分析师添加到组中 | group_id, user_id |
remove_group_analyst | 从组中删除分析师 | group_id, user_id |
组的用户
| 工具 | 说明 | 关键参数 |
|---|
add_user_to_group | 将用户添加到组 | group_id, user_id |
优惠券
| 工具 | 说明 | 关键参数 |
|---|
list_coupons | 列出所有优惠券 | page, limit |
create_coupon | 创建折扣码 | code, discount_type, discount_amount, note?, quantity?, product_ids?, expires_at? |
get_coupon | 通过ID获取优惠券详细信息 | coupon_id |
update_coupon | 更新优惠券 | coupon_id,要更新的字段 |
delete_coupon | 删除优惠券 | coupon_id |
bulk_create_coupons | 批量创建优惠券 | count,优惠券参数 |
促销
| 工具 | 说明 | 关键参数 |
|---|
list_promotions | 列出促销活动 | page, limit |
create_promotion | 创建促销 | name, discount_type, discount_amount,促销参数 |
get_promotion | 按ID获取促销详情 | promotion_id |
update_promotion | 更新促销活动 | promotion_id,要更新的字段 |
delete_promotion | 删除促销 | promotion_id |
get_promotion_by_coupon | 获取优惠券代码的促销 | coupon_code |
分类
| 工具 | 说明 | 关键参数 |
|---|
list_categories | 列出类别 | page, limit |
create_category | 创建新类别 | name |
get_category | 按ID获取类别详细信息 | category_id |
update_category | 更新类别 | category_id,要更新的字段 |
delete_category | 删除类别 | category_id |
list_category_products | 按类别列出产品 | category_id, page, limit |
add_products_to_category | 将产品添加到类别 | category_id, product_ids |
remove_products_from_category | 从类别中删除产品 | category_id, product_ids |
课程评价
| 工具 | 说明 | 关键参数 |
|---|
list_course_reviews | 列出评论(可过滤) | course_id?, page, limit |
create_course_review | 创建课程复习 | course_id, user_id, rating, title?, review? |
get_course_review | 按ID获取审核详细信息 | review_id |
导师
| 工具 | 说明 | 关键参数 |
|---|
list_instructors | 列出讲师 | page, limit |
create_instructor | 创建讲师简介 | user_id,讲师字段 |
get_instructor | 按ID获取讲师详细信息 | instructor_id |
update_instructor | 更新讲师简介 | instructor_id,要更新的字段 |
delete_instructor | 删除讲师个人资料 | instructor_id |
自定义配置文件字段
| 工具 | 说明 | 关键参数 |
|---|
list_custom_profile_fields | 列出所有自定义配置文件字段 | _(无)_ |
外部订单
| 工具 | 说明 | 关键参数 |
|---|
create_external_order | 创建外部订单 | user_id, product_id,订单参数 |
refund_external_order | 退还外部订单 | order_id |
purchase_external_order | 处理外部订单采购 | order_id |
产品发布请求
| 工具 | 说明 | 关键参数 |
|---|
list_publish_requests | 列出产品发布请求 | page, limit |
get_publish_request | 按ID获取发布请求 | request_id |
approve_publish_request | 批准发布请求 | request_id |
deny_publish_request | 拒绝发布请求 | request_id |
网站脚本
| 工具 | 说明 | 关键参数 |
|---|
list_site_scripts | 列出所有站点脚本 | page, limit |
create_site_script | 创建网站脚本 | name, src, load_method?, location? |
get_site_script | 按ID获取站点脚本详细信息 | script_id |
update_site_script | 更新网站脚本 | script_id,要更新的字段 |
delete_site_script | 删除网站脚本 | script_id |
网站
| 工具 | 说明 | 关键参数 |
|---|
get_site_info | 站点概述(计数和设置) | _(无)_ |
GraphQL工具参考
GraphQL工具使用ThinkificGraphQL端点: https://api.thinkific.com/stable/graphql
查询
| 工具 | 说明 | 关键参数 |
|---|
gql_site | 通过GraphQL获取站点详细信息 | _(无)_ |
gql_me | 获取当前经过身份验证的用户 | _(无)_ |
gql_course | 按ID获取课程详细信息 | id |
gql_course_by_slug | 通过slug获取课程详情 | slug |
gql_user | 按ID获取用户详细信息 | id |
gql_user_by_email | 通过电子邮件获取用户详细信息 | email |
gql_bundle | 按ID获取捆绑包详细信息 | id |
gql_category | 按ID获取类别详细信息 | id |
gql_chapter | 按ID获取章节详细信息 | id |
gql_lesson | 按ID获取课程详细信息 | id |
gql_group | 按ID获取组详细信息 | id |
gql_product | 按ID获取产品详细信息 | id |
gql_community | 按ID获取社区详细信息 | id |
gql_community_user | 获取社区用户详细信息 | community_id, user_id |
gql_post | 通过ID获取社区帖子 | id |
gql_space | 按ID获取社区空间 | id |
突变
| 工具 | 说明 | 关键参数 |
|---|
gql_create_post | 创建社区帖子 | space_id, content, title? |
gql_reply_to_post | 回复社区帖子 | post_id, content |
gql_update_post | 更新社区帖子 | post_id, content?, title? |
gql_follow_post | 关注社区帖子 | post_id |
gql_unfollow_post | 取消关注社区帖子 | post_id |
gql_pin_post | 固定社区帖子 | post_id |
gql_unpin_post | 取消社区帖子的订阅 | post_id |
gql_move_post | 将帖子移动到另一个空间 | post_id, space_id |
gql_react_to_post | 对社区帖子做出反应 | post_id, reaction |
gql_bulk_add_users_to_groups | 批量将用户添加到组 | user_ids, group_ids |
gql_bulk_remove_users_from_groups | 从组中批量删除用户 | user_ids, group_ids |
gql_mark_lesson_incomplete | 为用户将课程标记为不完整 | lesson_id, user_id |
gql_view_lesson | 将课程标记为用户已查看/已完成 | lesson_id, user_id |
gql_update_assignment_submission | 更新作业提交 | submission_id,要更新的字段 |
gql_update_product | 通过GraphQL更新产品 | id,要更新的字段 |
资源
| 资源URI | 描述 |
|---|
thinkific://courses | 所有课程的JSON列表(前100名) |
thinkific://users | 所有用户的JSON列表(前100个) |
thinkific://site | JSON概述与总计数 |
环境变量
| 变量 | 必填 | 描述 |
|---|
THINKIFIC_API_KEY | 是(API密钥授权) | 来自设置的Thinkific API密钥→ 代码和分析→ API |
THINKIFIC_SUBDOMAIN | 是(API密钥授权) | 您的Thinkific网站子域(例如。 my-school 从 my-school.thinkific.com) |
THINKIFIC_OAUTH_TOKEN | 是(OAuth-auth) | OAuth2承载令牌(API密钥身份验证的替代方案) |
注: 如果 THINKIFIC_OAUTH_TOKEN 设置,则它优先于API密钥身份验证。
项目结构
thinkific-mcp/
├── src/
│ ├── index.ts # Entry point — server bootstrap
│ ├── client.ts # Thinkific API client (auth, pagination, retry)
│ ├── tools.ts # MCP tool definitions and handlers (REST)
│ ├── gql-tools.ts # MCP tool definitions and handlers (GraphQL)
│ ├── resources.ts # MCP resource definitions
│ ├── types.ts # TypeScript interfaces for API responses
│ └── test.ts # Validation test script
├── dist/ # Compiled JavaScript (after build)
├── package.json
├── tsconfig.json
├── README.md
├── LICENSE
└── .gitignore
发展
# Build
npm run build
# Watch mode
npm run dev
# Type-check only
npm run lint
# Run tests (after build)
npm test
故障排除
“未配置特定身份验证”
设置所需的环境变量。您需要:
THINKIFIC_API_KEY 和 THINKIFIC_SUBDOMAIN,或THINKIFIC_OAUTH_TOKEN
401身份验证错误
- 验证您的API密钥未被旋转(重置后密钥只显示一次)
- 确认您的Thinkific计划支持API访问(Grow/Pro+Growth或以上)
- 检查子域名是否完全匹配(例如。
my-school,不 my-school.thinkific.com)
429速率限制
服务器以指数回退方式自动重试(最多重试3次)。如果您一直达到速率限制,请降低请求频率或添加页面大小较小的分页。
空结果
- 检查您是否连接到正确的站点(验证子域)
- 一些端点要求数据首先存在(例如,没有课程和用户就没有注册)
服务器无法启动
- 确保已安装Node.js 18+:
node --version - 跑
npm run build 首先,服务器从 dist/ - 检查stderr是否有错误消息(stdout是为MCP协议保留的)
API 文档
许可证
麻省理工学院——见 许可证.