TUNC.AI / Tunc SRC 指南

不用学 git,也能给 AI 智能体配上源代码管理

把 Claude、ChatGPT、Cursor 或你自己的代码接到 Tunc SRC:智能体用大白话保管你的项目和每一个保存下来的版本。

更新于

一个跨很多次对话和你一起做网站或工具的智能体,需要一个放文件的地方,也需要在改坏的时候有路可退。源代码管理正是做这个的,但它通常要你有本地副本、会用命令行,还要懂 commit、branch 这类词。Tunc SRC 是为智能体打造的源代码管理:五个工具,每个只要一次调用,用的都是大白话。项目里放的是你的文件,一个版本就是一次保存,而保存这件事由智能体来做。

1. 通过 MCP 连接你的 AI 应用

把你的助手接到 https://mcp.tuncsrc.com/mcp,在浏览器里用你的 Tunc 账号登录。在 Tunc Hub 里,同样的五个工具是内置的。

客户端步骤
claude.ai, Claude Desktop and Claude mobileCustomize → Connectors → Add custom connector → 名称填 Tunc SRC,URL 填 https://mcp.tuncsrc.com/mcp → Add → Connect。免费版只允许一个自定义连接器;Team 和 Enterprise 由 Owner 在 Organization settings → Connectors 里添加。这个链接会打开对话框,名称和 URL 已经填好:
https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Tunc%20SRC&connectorUrl=https%3A%2F%2Fmcp.tuncsrc.com%2Fmcp
Claude Code先添加服务器,然后运行 /mcp,选择 tunc-src,再 Authenticate。
claude mcp add --transport http tunc-src https://mcp.tuncsrc.com/mcp
ChatGPTSettings → Apps & Connectors → Advanced → 打开 Developer mode → Create → 名称填 Tunc SRC,URL 填 https://mcp.tuncsrc.com/mcp,Authentication 选 OAuth → Create → Connect。
Cursor加到 ~/.cursor/mcp.json,然后 Settings → MCP:会显示“Needs login” → Login。
{
  "mcpServers": {
    "tunc-src": {
      "url": "https://mcp.tuncsrc.com/mcp"
    }
  }
}
VS Code (Copilot)命令面板 → MCP: Add Server → HTTP → https://mcp.tuncsrc.com/mcp → 名称 tunc-src → 允许登录提示。
Gemini CLI加到 settings.json,然后运行 /mcp auth tunc-src。
{
  "mcpServers": {
    "tunc-src": {
      "httpUrl": "https://mcp.tuncsrc.com/mcp"
    }
  }
}
Copilot StudioTools → Add a tool → New tool → Model Context Protocol → URL 填 https://mcp.tuncsrc.com/mcp → Authentication 选 OAuth 2.0,Dynamic discovery。

2. 用大白话提要求

  • “把这个网站放进 Tunc SRC,每次改动后保存一个版本。”智能体用 src_repo 创建项目,用 src_write 保存:改动过的文件,加一句说明改了什么的话。
  • “从昨天到现在改了什么?”智能体用 src_read 列出版本:每个版本是谁保存的、什么时候保存的,以及那句说明。
  • “最后一次改动弄坏了,回退一个版本。”智能体用 src_write 把更早的版本恢复回来。它会被保存为一个新版本,所以什么都不会丢。

3. 多个智能体,同一个项目

每次保存都要指明它是从哪个版本开始的。如果期间有别的智能体保存过,这次保存会被拒绝并返回 version_conflict,智能体重新读取、再把改动重做一遍,所以两个智能体不会悄悄覆盖彼此。src_events 说明某个位置之后项目里发生了什么,智能体可以在动手之前先跟上进度。

在你自己的代码里,通过 REST 或 A2A

智能体通过 MCP 与 A2A 原生使用 Tunc SRC。脚本和你自己的软件,可以在 https://tunchub.com/account/keys/new 创建一个 API 密钥,然后带上工具名和参数调用 https://api.tuncsrc.com/v1/tool:

# Your projects, each with its latest version
curl -s https://api.tuncsrc.com/v1/tool \
  -H "Authorization: Bearer $TUNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"src_repo","arguments":{"operation":"list"}}'

# Create a project, then save two files as its first version
curl -s https://api.tuncsrc.com/v1/tool \
  -H "Authorization: Bearer $TUNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"src_repo","arguments":{"operation":"create","project":"my-site"}}'
curl -s https://api.tuncsrc.com/v1/tool \
  -H "Authorization: Bearer $TUNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"src_write","arguments":{"project":"my-site",
       "summary":"First version of the home page.",
       "changes":[{"path":"index.html","content":"<h1>Hello</h1>"},
                  {"path":"css/site.css","content":"h1 { color: teal; }"}]}}'

# Every later save names the version it started from (if_version);
# a stale one is refused with version_conflict: read again and redo the change
curl -s https://api.tuncsrc.com/v1/tool \
  -H "Authorization: Bearer $TUNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"src_write","arguments":{"project":"my-site",
       "summary":"Say hello to visitors by name.","if_version":"<version>",
       "changes":[{"path":"index.html","content":"<h1>Hello, visitor</h1>"}]}}'

# The saved versions, newest first
curl -s https://api.tuncsrc.com/v1/tool \
  -H "Authorization: Bearer $TUNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"src_read","arguments":{"project":"my-site","operation":"versions"}}'

或者调用 A2A 1.0 智能体:

curl -s https://a2a.tuncsrc.com -H "Authorization: Bearer $TUNC_API_KEY" -H 'A2A-Version: 1.0' \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{
        "messageId":"m-1","role":"ROLE_USER",
        "parts":[{"data":{"skill":"src_repo","arguments":{"operation":"list"}},"mediaType":"application/json"}]}}}'
# → {"jsonrpc":"2.0","id":1,"result":{"message":{"role":"ROLE_AGENT",
#      "parts":[{"data":{…the tool's result…},"mediaType":"application/json"}],…}}}

始终由你掌控

每个已连接的应用和 API 密钥都列在账号的 Agents & keys 里(https://tunchub.com/account?tab=agents)。随时可以把某个智能体收窄为只读,或者断开它;被断开的智能体会在一分钟内被拒绝。

免费版:Tunc Hub、Tunc Art、Tunc Doc、Tunc Orb 和 Tunc SRC 共用 1 GB 存储。