swift-lsp — Claude Code plugin: what it does, how to install
Connects SourceKit-LSP to Claude Code for Swift code intelligence. It helps the agent parse symbols and navigate .swift files.
/plugin install swift-lsp@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-officialWhat swift-lsp does
The plugin integrates the SourceKit-LSP language server into Claude Code. This gives the assistant structural code intelligence when inspecting files with the .swift extension.
The language server ships inside the Swift toolchain. On macOS, you obtain it through Xcode or via brew install swift. On Linux, the toolchain is downloaded directly from swift.org.
Without sourcekit-lsp available in your system PATH, the plugin cannot run. Make sure the Swift toolchain is installed before enabling it.
What it helps with
- enable SourceKit-LSP code intelligence for
.swiftfiles - improve symbol navigation across Swift projects
- provide accurate type information to Claude Code
Example prompts for the agent
- Find the definition of this struct across our Swift project
- Check the method signatures in
AppDelegate.swift - Locate where this protocol is declared in the
.swiftcode
How to install swift-lsp
Plugin marketplace
/plugin install swift-lsp@claude-plugins-official/plugin marketplace add anthropics/claude-plugins-officialStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about swift-lsp
How to install swift-lsp in Claude Code?
First, register the official catalog by running /plugin marketplace add anthropics/claude-plugins-official. Then install the plugin using /plugin install swift-lsp@claude-plugins-official.
What does swift-lsp do?
It provides Swift language intelligence to Claude Code via SourceKit-LSP, handling files with the .swift extension.
What prerequisites are required for swift-lsp?
The binary sourcekit-lsp must be present in your PATH. Obtain it via Xcode or brew install swift on macOS, or download the toolchain from swift.org on Linux.
Source text
swift-lsp · Apache-2.0
# swift-lsp Swift language server (SourceKit-LSP) for Claude Code, providing code intelligence for Swift projects. ## Supported Extensions `.swift` ## Installation SourceKit-LSP is included with the Swift toolchain. ### macOS Install Xcode from the App Store, or install Swift via: ```bash brew install swift ``` ### Linux Download and install Swift from [swift.org](https://www.swift.org/download/). After installation, `sourcekit-lsp` should be available in your PATH. ## More Information - [SourceKit-LSP GitHub](https://github.com/apple/sourcekit-lsp) - [Swift.org](https://www.swift.org/)
© Anthropic · Apache-2.0 · anthropics/claude-plugins-official