尧图精选

SAP ABAP MCP Server 官方支持版图:TaoToken 统一 Key 接入 ADT 与 VS Code 的配置骨架

🕒 发布时间:2026/9/28 4:06:57 📁 来源:尧图网络
1. 先厘清一个容易踩坑的问题ABAP MCP Server 到底指什么如果你最近在搜「SAP ABAP MCP Server」大概率会看到两类结果混在一起一类是 SAP 官方文档和 Marketplace 页面另一类是 GitHub 上一堆mcp-abap-adt、mcp-abap-abap-adt-api之类的社区项目。这两类东西名字很像但支持级别完全不同。把问题限定在「SAP 官方支持」和「ABAP 开发」两个条件上当前能明确归入官方 ABAP MCP Server 的只有一类ADT MCP Server。它不是从 npm 或 GitHub 单独下载的独立服务也不是 Eclipse ADT 里额外装的插件而是内置在 SAP 官方发布的ABAP Development Tools for VS Code扩展里。SAP Help Portal 有专门页面讲如何启用它SAP-samples 的 RAP130 练习材料也把它当作 agentic ABAP 开发的技术底座。这件事对使用 ADT 和 VS Code 的开发者意味着什么简单说你不需要先去 GitHub 搜一堆第三方 MCP 项目而是应该先确认自己装的 ADT for VS Code 版本里有没有内置这个 local HTTP server。它默认跑在本地端口 2236通过 Model Context Protocol 把 ABAP 开发能力暴露成工具比如abap_activate-objects、abap_creation-create_object、abap_run_unit_tests、abap_transport-create这些。AI agent 通过这些工具能真正触达 ABAP Repository、RAP generator、ABAP Unit、transport 这些开发链路而不只是给你补一段语法。但这里有个关键边界SAP-samples 材料明确写了 ADT MCP Server 是experimental feature可能随时变化且不 intended for productive use。所以「官方支持」要分两层看——工具来源层面它是 SAP SE 发布的官方扩展生产治理层面它还不能直接开放到生产系统核心开发权限。这篇就围绕这个边界给出 TaoToken 统一 Key 接入 ADT 与 VS Code 的配置骨架并演示怎么验证连通性。2. TaoToken 前置统一 Key 与 API 通道准备在动 settings.json 和 config.toml 之前先把 TaoToken 这边的入口理清楚。TaoToken 在这里的角色是统一 Key/API 通道让你在 VS Code 的 MCP 配置和 ADT 相关调用里用同一套凭据不用每个工具单独配一遍。你需要先拿到 API Key。访问控制台创建控制台入口https://taotoken.net/console?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentconsoleAPI Keys 管理https://taotoken.net/api-keys?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentapi-keys创建完 Key 之后记住两个地址用途地址官网https://taotoken.net/?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentAPI 基址https://taotoken.net/apiAPI 基址不加 UTM 参数直接用于配置里的 base_url。Key 的格式通常是sk-开头的一串字符复制后先存到安全的地方后面 settings.json 和 config.toml 都要用。注意不要把 Key 直接提交到 Git 仓库。建议用环境变量或者 VS Code 的 secrets 机制配置骨架里我会用占位符表示。如果你还没决定用哪种接入方式可以先看下模型对话和 Coding Plan 的定位模型对话验证模型是否通https://taotoken.net/model-chat?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentmodel-chatCoding Plan长期编码/Agent 场景https://taotoken.net/coding-plan?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentcoding-plan接入文档在https://taotoken.net/doc?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentdoc3. 可复制配置骨架settings.json 与 config.toml这一节是核心操作部分。ADT MCP Server 本身是 VS Code 扩展内置的但你要让 coding agent 通过 TaoToken 的统一通道去调用模型同时让 MCP Server 的本地服务被正确识别需要两份配置配合。3.1 VS Code settings.json 配置在 VS Code 里按CtrlShiftP输入Preferences: Open User Settings (JSON)打开 settings.json。加入下面这段骨架{ mcp.servers: { adt-mcp-server: { type: http, url: http://127.0.0.1:2236, description: SAP ADT MCP Server (built-in in ADT for VS Code) } }, taotoken.apiBaseUrl: https://taotoken.net/api, taotoken.apiKey: ${env:TAOTOKEN_API_KEY}, taotoken.defaultModel: claude-sonnet-4-20250514, github.copilot.chat.mcp.enabled: true, abap.adt.mcpServer.enabled: true, abap.adt.mcpServer.port: 2236 }几个关键点说明mcp.servers里注册的是 ADT MCP Server 的本地 HTTP 地址。端口 2236 是 SAP-samples 材料里提到的默认端口如果你在 ADT for VS Code 设置里改过这里要同步。taotoken.apiKey用${env:TAOTOKEN_API_KEY}引用环境变量避免明文写 Key。你需要在系统环境变量里设置TAOTOKEN_API_KEY或者在 VS Code 的terminal.integrated.env里注入。abap.adt.mcpServer.enabled这个键名是示意性的实际键名以你安装的 ADT for VS Code 版本为准。可以在扩展设置里搜mcp确认。3.2 config.toml 配置用于 CLI 侧或 agent 侧如果你用的是支持 config.toml 的 coding agent比如某些 CLI 工具或 Claude Code 风格的配置骨架如下[api] base_url https://taotoken.net/api api_key ${TAOTOKEN_API_KEY} default_model claude-sonnet-4-20250514 timeout_seconds 120 [mcp.servers.adt] type http url http://127.0.0.1:2236 enabled true description SAP ADT MCP Server [mcp.servers.adt.tools] allow [ abap_activate-objects, abap_creation-create_object, abap_generators-list_generators, abap_generators-get_schema, abap_generators-generate_objects, abap_run_unit_tests, abap_transport-create, abap_transport-get ] deny []allow列表里列的是 SAP-samples RAP130 材料里提到的工具名。你可以按需裁剪比如在 sandbox 阶段只允许list_generators和get_schema这类只读工具等流程稳定再放开create_object和activate-objects。注意config.toml 的[mcp.servers.adt.tools]结构不是所有 agent 都支持具体以你用的工具文档为准。这里给的是通用骨架方便你对照修改。3.3 环境变量注入在终端里设置export TAOTOKEN_API_KEYsk-your-key-hereWindows PowerShell$env:TAOTOKEN_API_KEYsk-your-key-here如果你希望持久化Linux/macOS 写进~/.bashrc或~/.zshrcWindows 用setx TAOTOKEN_API_KEY sk-...。4. 验证请求与成功结果连通性检查与 ADT 调用配置写完接下来要验证两件事TaoToken 通道是否通ADT MCP Server 是否被 agent 正确识别。4.1 验证 TaoToken API 通道先用 curl 测一下 API 基址是否可达curl -s -o /dev/null -w %{http_code} \ -H Authorization: Bearer $TAOTOKEN_API_KEY \ https://taotoken.net/api/models如果返回200说明 Key 和网络通道没问题。返回401检查 Key 是否复制完整返回403检查 Key 权限返回超时检查网络。4.2 验证 ADT MCP Server 本地服务在 VS Code 里打开命令面板运行ADT: Show MCP Server Status具体命令名以扩展为准。或者在终端里直接探测端口curl -s http://127.0.0.1:2236/health如果返回类似{status:ok,server:adt-mcp-server}的 JSON说明本地服务已启动。如果连接被拒绝检查 ADT for VS Code 是否已连接 ABAP backend以及 MCP Server 是否在扩展设置里启用。4.3 在 VS Code 中验证 MCP 工具列表打开 GitHub Copilot Chat切换到 Agent 模式输入列出当前可用的 MCP 工具如果配置正确你应该能看到abap_generators-list_generators、abap_run_unit_tests这些工具出现在列表里。这一步很关键它证明 agent 已经通过 MCP 协议发现了 ADT MCP Server 暴露的工具。4.4 实际调用一次 ADT 工具让 agent 执行一个只读操作调用 abap_generators-list_generators列出当前系统可用的 ABAP generator成功的话agent 会返回一个 generator 列表比如 RAP business object generator、CDS view generator 等。这一步验证的是完整链路TaoToken 通道 → coding agent → MCP 协议 → ADT MCP Server → ABAP backend。如果这一步失败先看 agent 的日志输出确认是 MCP 连接问题还是 ABAP backend 权限问题。5. 本篇常见错排查5.1 端口 2236 被占用ADT MCP Server 默认端口 2236如果被其他进程占用服务起不来。检查lsof -i :2236Windowsnetstat -ano | findstr :2236如果被占用在 ADT for VS Code 设置里改端口同时更新 settings.json 和 config.toml 里的 url。5.2 MCP Server 未出现在工具列表最常见原因是 ADT for VS Code 没有连接到 ABAP backend。MCP Server 是扩展的一部分但工具能力依赖 backend 连接。先在 VS Code 里确认 ADT 连接状态再重启扩展。另一个原因是github.copilot.chat.mcp.enabled没开或者你的 Copilot 版本不支持 MCP。检查 VS Code 和 Copilot 扩展是否更新到支持 MCP 的版本。5.3 TaoToken Key 报 401检查环境变量是否在当前 shell 会话里生效。VS Code 从 GUI 启动时可能读不到你刚 export 的变量需要重启 VS Code或者在 settings.json 里改用 secrets 存储。5.4 工具调用返回权限错误ADT MCP Server 的工具最终以你的 ABAP 用户权限执行。如果abap_creation-create_object报权限不足检查你的 ABAP 用户是否有对应 package 的创建权限、transport 权限。sandbox 系统一般权限较宽生产系统会严格很多。5.5 误把社区 MCP Server 当官方如果你在 GitHub 上看到mcp-abap-adt这类项目它们通过 ADT REST API 桥接 ABAP 系统但发布者、维护者、支持渠道都不是 SAP 官方。企业接入要按第三方工具审查处理。官方路径只有 ADT for VS Code 内置的 ADT MCP Server。6. 下一步怎么走按场景选入口验证通过之后根据你的实际场景选后续路径。如果你只是想确认模型通道和 MCP 工具是否通用模型对话快速验证https://taotoken.net/model-chat?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentmodel-chat如果你准备长期用 coding agent 做 ABAP 开发包括 RAP 骨架生成、ABAP Unit 草稿、activation error 解释这些走 Coding Planhttps://taotoken.net/coding-plan?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentcoding-plan如果你在配置过程中遇到接入问题先查接入文档https://taotoken.net/doc?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentdoc需要新建或管理 Key去 API Keys 页面https://taotoken.net/api-keys?utm_sourcetaotoken_aicg_blog_endutm_mediumcsdnutm_campaignrewriteutm_contentapi-keys最后提醒一句ADT MCP Server 目前是 experimental建议先在 sandbox 或 developer tenant 里跑通流程确认工具调用边界、transport 策略、ATC 规则都能被团队掌控再考虑进入更严肃的开发环境。生产系统的核心开发权限不要因为「官方」两个字就直接放开给 agent 自动执行。
上一篇/下一篇内容由系统自动关联 返回资讯列表 →