Get the FREE Ultimate OpenClaw Setup Guide →

swift-developer

A Local MCP server useful for Cross Platform Swift Development

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository: git clone https://github.com/edgeengineer/swift-developer-mcp-server.git cd swift-developer-mcp-server

  2. Build the server (release mode) and get the executable path via the Makefile: make path

  3. Run the server locally (example): swift run SwiftDeveloperMCPServer

    Then send initialization and tool-call messages to stdin as per MCP protocol

  4. 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

Sponsor this space

Reach thousands of developers