Token导航 LogoToken导航

MCP Server · 开发工具

Swift Developer MCP Server

A Local MCP server useful for Cross Platform Swift Development

未说明官方级别未说明来源级核验工具 0
Swift调试工具ClaudeClaude DesktopCursorWindsurf

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
edgeengineer
提供方
edgeengineer

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

4

仓库热度

收录来源

2 个

MCP.so

选型结论

Swift Developer MCP Server 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude、Cursor,没有现成的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

未说明

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

Swift开发人员MCP服务器

一个全面的模型上下文协议(MCP)服务器,为macOS和Linux环境提供Swift开发工具、调试功能和项目管理功能。该服务器使AI助手能够与Swift项目、构建系统和开发工具进行交互。

特性

🔨 构建和测试工具

  • swift_build -使用配置选项(调试/发布、特定目标、详细输出)构建Swift项目
  • swift_test -使用过滤、并行执行控制和详细输出运行Swift测试
  • run_target -使用自定义参数执行特定的Swift目标

🐛 调试工具

  • debug_start -启动Swift目标的调试会话
  • debug_set_breakpoint -使用可选条件设置断点
  • debug_step -遍历代码(over、into、out)
  • debug_continue -继续执行,直到下一个断点
  • debug_inspect_variable -检查变量并计算表达式

📦 Swift包管理

  • get_package_info -获取全面的Swift包信息和依赖关系
  • print_dependency_public_api -提取并显示任何依赖项的公共API

🔧 快速工具链管理

  • swiftly_install -从不同渠道安装Swift工具链
  • swiftly_list -列出已安装的Swift工具链
  • swiftly_list_available -列出要安装的可用Swift版本
  • swiftly_use -在全球或每个项目之间切换Swift版本
  • swiftly_run -使用特定Swift版本运行命令
  • swiftly_uninstall -删除Swift工具链

📊 资源

  • swift://project/info -当前项目信息和结构
  • swift://build/status -构建状态和历史
  • swift://debug/sessions -活动调试会话和断点

💡 鼓励

  • swift_debug_session -指导调试会话设置,并提供针对特定目标的建议
  • swift_build_analysis -智能构建错误分析和解决方案建议

安装

先决条件

  1. 迅速的:安装Swift 5.9+或使用 迅速地 用于版本管理
  2. macOS或Linux:此服务器支持macOS和Linux环境
  3. 制造:用于使用方便的构建目标

快速设置

  1. 克隆存储库:
   git clone https://github.com/edgeengineer/swift-developer-mcp-server.git
   cd swift-developer-mcp-server
  1. 构建并获取路径 (自动复制到剪贴板):
   make path

这将:

- ✅ 以发布模式构建服务器 - ✅ 显示可执行文件路径 - ✅ 将路径复制到剪贴板 - ✅ 显示流行AI客户端的配置示例

其他目标

make build    # Build the server in release mode
make clean    # Clean build artifacts
make install  # Install to /usr/local/bin
make help     # Show all available targets

AI客户端的配置

光标

添加到光标设置(.cursor-settings/settings.json):

{
  "mcp": {
    "servers": {
      "swift-developer": {
        "command": "PASTE_PATH_FROM_CLIPBOARD_HERE",
        "args": [],
        "env": {}
      }
    }
  }
}

帆板运动

添加到您的Windsurf配置(.windsurf/mcp_servers.json):

{
  "servers": {
    "swift-developer": {
      "command": "PASTE_PATH_FROM_CLIPBOARD_HERE",
      "args": [],
      "env": {}
    }
  }
}

克劳德桌面

添加到您的Claude Desktop配置中:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "swift-developer": {
      "command": "PASTE_PATH_FROM_CLIPBOARD_HERE",
      "args": [],
      "env": {}
    }
  }
}

克劳德代码(终端应用程序)

添加到您的Claude Code配置中(在终端应用程序中):

claude mcp add swift-developer PASTE_PATH_FROM_CLIPBOARD_HERE

克劳德代码(VS代码扩展)

添加到您的VS代码设置(.vscode/settings.json):

{
  "claude-dev.mcpServers": {
    "swift-developer": {
      "command": "PASTE_PATH_FROM_CLIPBOARD_HERE",
      "args": [],
      "env": {}
    }
  }
}
💡 专业提示:运行 make path 准备为每个客户端复制配置示例!

使用示例

构建Swift项目

Use the swift_build tool to build the current project in release mode with verbose output.

运行测试

Use the swift_test tool to run all tests in parallel with verbose output.

启动调试会话

Use the swift_debug_session prompt to set up debugging for the "MyApp" target, focusing on the "ViewController.swift" file.

管理Swift版本

Use swiftly_list to see installed Swift versions, then swiftly_use to switch to Swift 5.9.

提取依赖API

Use print_dependency_public_api with dependency_name "Alamofire" to see the public API of the Alamofire dependency.

获取项目信息

Access the swift://project/info resource to see the current project structure and Package.swift contents.

发展

项目结构

swift-developer-mcp-server/
├── Package.swift                 # Swift Package Manager configuration
├── Makefile                     # Build automation and convenience targets
├── Sources/
│   ├── main.swift               # Server entry point and MCP handler setup
│   ├── Utilities.swift          # Common types and helper functions
│   ├── BuildTestTools.swift     # Swift build and test tools
│   ├── DebugTools.swift         # Debug session management and tools
│   ├── PackageInfoTools.swift   # Swift package information tools
│   ├── SwiftlyTools.swift       # Swiftly toolchain management
│   ├── Resources.swift          # MCP resources (project info, build status, etc.)
│   └── Prompts.swift            # MCP prompts (debug session, build analysis)
└── README.md                    # This file

添加新工具

  1. 在相应的模块文件中定义工具结构:

- BuildTestTools.swift 用于构建和测试功能 - DebugTools.swift 用于调试功能 - PackageInfoTools.swift 用于包管理 - SwiftlyTools.swift 用于工具链管理 - 如果需要,为其他类别创建一个新模块

  1. 将工具添加到 ListTools 处理程序在 main.swift
  2. 将工具的句柄方法添加到 CallTool switch语句
  3. 重建服务器

测试

您可以通过运行服务器并发送JSON-RPC消息来手动测试服务器:

swift run SwiftDeveloperMCPServer

然后通过stdin发送初始化和工具调用消息。

需求

  • macOS 13.0+ 或 Linux (Ubuntu 20.04+,其他支持Swift的发行版)
  • Swift 5.9+
  • 制造 (用于构建目标)
  • Xcode命令行工具 (仅限macOS)

贡献

  1. 分叉存储库
  2. 创建要素分支
  3. 进行更改
  4. 如果适用,添加测试
  5. 提交拉取请求

许可证

此项目根据Apache 2.0许可证获得许可。有关详细信息,请参阅LICENSE文件。

故障排除

常见问题

  1. “找不到命令”:

- 跑 make path 重建并获得正确的路径 - 确保AI客户端配置中的路径与输出匹配

  1. “权限被拒绝”:确保可执行文件具有适当的权限:
   chmod +x .build/release/SwiftDeveloperMCPServer
   # Or simply run 'make path' which handles this automatically
  1. Swift版本冲突:使用 swiftly 如果你有多个安装,可以管理Swift版本。
  1. 构建失败:

- 确保您拥有最新的Xcode命令行工具(macOS):

     xcode-select --install

- 这 make path 命令将显示详细的构建错误(如果发生)

  1. 配置问题:The make path 该命令为所有受支持的AI客户端提供了可复制的配置示例。

调试服务器

要调试服务器本身,您可以将日志记录添加到 main.swift 文件或使用详细的Swift输出运行它:

swift run -v SwiftDeveloperMCPServer

使用ExampleLib进行测试

存储库包括 ExampleLib/,一个完整的Swift包,带有异步斐波那契计算,非常适合测试MCP服务器的调试能力。

构建和运行ExampleLib

导航到ExampleLib目录并使用标准Swift命令:

cd ExampleLib

# Build the library and executable
swift build

# Run the demo application
swift run ExampleApp

# Run tests
swift test

使用MCP服务器调试工具进行测试

ExampleLib项目为MCP服务器的调试功能提供了一个很好的测试平台。以下是如何测试完整的调试工作流程:

1.基本构建和测试

使用MCP服务器工具构建和测试:

Use swift_build tool with:
- target: "ExampleApp" 
- project_path: "/path/to/swift-developer-mcp-server/ExampleLib"
- configuration: "debug"
- verbose: true

Use swift_test tool with:
- project_path: "/path/to/swift-developer-mcp-server/ExampleLib"
- verbose: true
2.调试会话设置

启动ExampleApp的调试会话:

Use debug_start tool with:
- target: "ExampleApp"
- project_path: "/path/to/swift-developer-mcp-server/ExampleLib"
- arguments: [] (optional)

这将:

  • 构建ExampleApp目标
  • 启动LLDB会话
  • 加载可执行文件进行调试
3.设置断点

设置策略断点以检查斐波那契计算:

Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Sources/ExampleApp/main.swift"
- line_number: 89 (in performanceTest function)
- session_id: "your_session_id"

Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Sources/ExampleLib/FibonacciCalculator.swift" 
- line_number: 37 (inside calculate method)
- session_id: "your_session_id"
4.运行和遍历代码
# Start execution
Use debug_continue tool with:
- session_id: "your_session_id"

# Step through code when breakpoint hits
Use debug_step tool with:
- session_id: "your_session_id"
- step_type: "over" (or "into", "out")
5.检查变量和参与者状态

FibonacciCalculator是一个actor,非常适合测试异步调试:

# Inspect the calculator actor
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- variable_name: "calculator"

# Inspect specific values
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- variable_name: "result"

# Evaluate expressions
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- expression: "await calculator.getCalculationCount()"
6.测试并发操作

ExampleLib包含并发斐波那契计算,非常适合测试异步操作的调试:

# Set breakpoint in concurrent calculation method
Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Sources/ExampleLib/FibonacciCalculator.swift"
- line_number: 57 (in calculateMultiple method)
- session_id: "your_session_id"

# Inspect concurrent task state
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- variable_name: "tasks"
7.缓存行为分析

在异步执行器中测试调试缓存行为:

# Set conditional breakpoint for cache hits
Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Sources/ExampleLib/FibonacciCalculator.swift"
- line_number: 19 (cache hit check)
- condition: "cached != nil"
- session_id: "your_session_id"

# Inspect cache state
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- expression: "await calculator.getCacheState()"
8.测试Swift测试框架

ExampleLib使用Swift测试框架。测试调试测试执行:

# Build and run tests with debugging
Use debug_start tool with:
- target: "ExampleLibTests"
- project_path: "/path/to/ExampleLib"

# Set breakpoints in test methods
Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Tests/ExampleLibTests/FibonacciCalculatorTests.swift"
- line_number: 15 (in testBasicCalculations)
- session_id: "your_session_id"
9.调试中的性能测试

通过调试测试性能测试功能:

# Set breakpoint in performance test
Use debug_set_breakpoint tool with:
- file_path: "/path/to/ExampleLib/Sources/ExampleApp/main.swift"
- line_number: 95 (inside performanceTest)
- session_id: "your_session_id"

# Inspect timing variables
Use debug_inspect_variable tool with:
- session_id: "your_session_id"
- variable_name: "totalTime"
10.会话清理

完成后始终清理调试会话:

Use debug_terminate tool with:
- session_id: "your_session_id"

预期的调试场景

ExampleLib提供了以下调试场景:

  1. 演员状态检查:调试异步参与者状态和并发访问
  2. 缓存行为:实时查看缓存命中/未命中
  3. 递归计算:逐步完成递归斐波那契计算
  4. 并行操作:调试多个同时进行的计算
  5. 错误处理:错误条件的测试调试
  6. 性能瓶颈:识别慢速计算路径
  7. 测试执行:调试Swift测试框架测试

调试输出示例

调试ExampleLib时,您应该看到:

Debug session started successfully.
Session ID: debug_12345678-1234-1234-1234-123456789abc
Target: ExampleApp
Executable: /path/to/ExampleLib/.build/debug/ExampleApp

Breakpoint set successfully.
File: /path/to/ExampleLib/Sources/ExampleApp/main.swift
Line: 89

Debug execution continued.
Session: debug_12345678-1234-1234-1234-123456789abc
Command: process launch
Running: true

Variable inspection results.
Session: debug_12345678-1234-1234-1234-123456789abc
Target: calculator

这种全面的测试方法验证了:

  • 真正的LLDB集成
  • Swift actor调试
  • 并发代码调试
  • 断点管理
  • 计量检验
  • 会话生命周期管理

支持

对于问题和功能请求,请在GitHub存储库上打开问题。

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

developer-toolsSwift本地部署Swift开发调试工具项目管理AI集成构建系统

支持客户端

Claude DesktopClaudeCursorWindsurf

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Swift Developer MCP Server

MCP.so · 本页

0未说明未标注2 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Swift Developer MCP Server 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Swift Developer MCP Server 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Swift Developer MCP Server 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Swift Developer MCP Server 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Swift Developer MCP Server 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude、Cursor、Windsurf;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP