Skip to main content
plugin official · Anthropic

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.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install swift-lsp@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-official
Open on GitHub

What 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 .swift files
  • 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 .swift code

How to install swift-lsp

Plugin marketplace

/plugin install swift-lsp@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-official

Step 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

Similar plugins

All plugins for Programming languages →

From the same set123

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor