swift-developer
A Local MCP server useful for Cross Platform Swift Development
claude mcp add --transport stdio edgeengineer-swift-developer-mcp-server PASTE_PATH_FROM_CLIPBOARD_HERE
How to use
The Swift Developer MCP Server exposes a suite of Swift development tools that let an AI assistant interact with Swift projects, manage builds, run tests, debug code, and inspect package information. Tools include swift_build and swift_test for compiling and testing with configurable targets and verbosity, run_target to execute specific Swift targets, and swiftly_* commands to manage multiple Swift toolchains. For debugging, you can start sessions, set breakpoints with conditions, step through code, continue execution, and inspect variables. Package management tools like get_package_info and print_dependency_public_api help you understand your project’s dependencies and exposed APIs. The server also provides resources to view project structure, build status, and active debug sessions, and offers a guided debugging prompt swift_debug_session plus a build analysis tool swift_build_analysis to diagnose and propose fixes for build errors.
How to install
Prerequisites:
- Swift 5.9+ installed (or use Swiftly for version management)
- macOS 13+ or Linux (Ubuntu 20.04+)
- Make for build targets
Quick setup:
-
Clone the repository: git clone https://github.com/edgeengineer/swift-developer-mcp-server.git cd swift-developer-mcp-server
-
Build the server (release mode) and get the executable path via the Makefile: make path
-
Run the server locally (example): swift run SwiftDeveloperMCPServer
Then send initialization and tool-call messages to stdin as per MCP protocol
-
Optional targets:
- 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
Hosting/Deployment:
- Use the produced executable path in your MCP client configuration (Cursor, Windsurf, Claude, etc.).
- If deploying as a service, point a process manager at the compiled binary and ensure necessary permissions.
Additional notes
Tips and common issues:
- If you see a "Command not found" error, run make path to rebuild and obtain the correct executable path, then update your MCP client configuration to point at it.
- For "Permission denied" errors, ensure the executable has execute permissions (e.g., chmod +x .build/release/SwiftDeveloperMCPServer) or rely on make path to set permissions automatically.
- Manage Swift versions with swiftly if you have multiple Swift toolchains installed; use swiftly_use to switch versions per project.
- If you hit build failures, verify Xcode Command Line Tools are up to date (macOS): xcode-select --install, and review make path output for the exact error context.
- The README mentions clipboard-based path sharing for quick client setup; use your OS clipboard after running make path to populate the command in AI clients.
Related MCP Servers
swift-sdk
The official Swift SDK for Model Context Protocol servers and clients.
memory
A Model Context Protocol server that provides knowledge graph management capabilities.
Claude-Project-Coordinator
Claude Project Coordinator is a Swift-powered MCP (Model Context Protocol) server designed to streamline multi-project Xcode development. It lets you track project status, auto-detect frameworks, search code patterns, and maintain a structured development knowledge base — all locally, with Claude Desktop as your assistant.
shortcuts
Shortcuts + MCP = ♥️
macPilotCli
MacPilot CLI is a mcp server, It provides a collection of system tools that allow AI assistants to perform various operations on macOS systems.
riffmcp
Native macOS MCP server that lets LLMs compose and play music