SwiftPieces
A free library of 85 designed SwiftUI components for iOS. You can install them with its hosted MCP server, so your agent searches the pieces, reads their source and adds them to your project.
View on GitHub ↗- Stars
- ★ 331
- Last commit
- 2 Dec 2026
- Maintenance
- Active
- Licence
- Other
- Category
- MCP Servers
- GitHub
- Saivion/
SwiftPieces
Overview
SwiftPieces is a library of designed SwiftUI interactions, such as swipe decks, glass menus, floating docks and scrubbable charts. Each piece is a single Swift file with a preview. It's built only on Apple frameworks, and the motion, haptics and states are already done. You copy a piece into your project and it's yours to keep.
One way to install the pieces is through SwiftPieces' hosted MCP server. Claude Code, Cursor or any other MCP client can search the free library, read a piece's source and install it into your project, so your agent adds the real piece instead of inventing a lookalike. You can also copy pieces from the website or add them with the npm CLI.
SwiftPieces is source-available under MIT plus the Commons Clause. You can use the components in any app, including commercial ones, but you can't sell or redistribute the components themselves.
Features
- A free, public MCP server that needs no account. It has six tools:
- search_pieces searches the free library by keyword, category or minimum iOS version.
- search_blocks searches patterns (also called blocks), which are whole sections of a screen from SwiftPieces Pro.
- get_piece returns a piece's or a free block's full source, any shaders and a link to its docs.
- install_piece returns the files to write into your project, plus the matching CLI command.
- list_categories lists the free piece and block categories, with counts.
- get_liquid_glass_guide gives the rules for writing correct Liquid Glass code, with iOS 26 API names.
- 85 free pieces in 14 categories: text, backgrounds, Liquid Glass, buttons and controls, inputs and forms, cards, lists, navigation, sheets, feedback, motion, data and charts, AI, and media.
- Apple frameworks only, with no third-party dependencies. When a piece uses a shader, a Metal file comes with it.
- Liquid Glass pieces only run on iOS 26 and fall back to Material on older systems.
- Built to support Reduce Motion, Reduce Transparency, Dynamic Type and semantic colours.
- llms.txt and llms-full.txt files for agents at the root of the site.
- An npm CLI that works with both the free and Pro libraries.
- SwiftPieces Pro is paid, and it has its own MCP server that needs a licence key. Patterns, screens, flows, app templates and the Build Kit are only in Pro.
Requirements
- An MCP client that supports remote HTTP servers, such as Claude Code or Cursor.
- iOS 17 and Xcode 16 for standard pieces. Liquid Glass pieces need the iOS 26 SDK to compile, and older devices get the Material fallback. To judge how Metal shader pieces perform, run them on a real device.
- Node.js 18.17 or later, if you use the CLI. That's optional.
- SwiftPieces Pro needs a paid licence key.
Install
Claude Code. Run this in your project folder:
claude mcp add --transport http swiftpieces https://swiftpieces.com/api/mcpAdd --scope project to write an .mcp.json file you can commit.
Cursor and other clients. Add a server called swiftpieces with the URL https://swiftpieces.com/api/mcp to .cursor/mcp.json or to your client's MCP settings.
{ "mcpServers": { "swiftpieces": { "url": "https://swiftpieces.com/api/mcp" } } }Without MCP. Copy pieces from swiftpieces.com/components, or run npx swiftpieces add AssistantOrb.
Xcode 16 picks up the new files automatically when you use synchronised folders. In older projects, add the folder to your target once.
Example
Start a new agent session in your project and ask:
"Add the SwiftPieces "Assistant Orb" piece to my app"
Every piece's page has a prompt like this, ready to copy, under Install.
Works with
Listed in
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.
More in this category
Mobile MCP
Drives native mobile apps on simulators, emulators and real devices over MCP, for iOS and Android alike.
MobileBuildMCP
Sentry's MCP server and CLI for building, testing, running and debugging iOS and macOS projects from an agent. Formerly XcodeBuildMCP.
agent-device
Lets coding agents see and drive apps on iOS simulators and real devices (Android too) through accessibility snapshots, taps, typing and screenshots. Comes as a CLI, MCP server and Node API.
SwiftAgents