
Periphery Code Audit
io.github.zyntx-labPublished by GitHub account zyntx-labv1.0.0Updated Oct 24, 2026
Swift code analysis with Periphery - detect unused code and improve code quality
The publisher's own server: audit.domains - Domain Valuation
Overview
A local MCP server that wraps the Periphery CLI so an assistant can audit Swift projects for unused code, imports and over-public declarations.
- What you can do
- Check that the Periphery CLI is installed and report its version and path, so setup problems surface early. Run a basic scan of an Xcode project or Swift package and return structured JSON results with unused declarations and a summary. Run scans from a YAML configuration file, or with advanced flags such as retaining public or @objc declarations, disabling unused-import analysis, a custom index store path and verbose output. Focus on specific checks: unused imports, and public declarations that could be made internal.
- When to use it
- Useful when cleaning up an iOS or macOS codebase and you want an assistant to find dead code, unused imports or unnecessarily public API in an Xcode project or Swift package, and to explain the findings in conversation.
- Requirements
- Runs as a local binary on macOS 13.0 or later with Swift 6.0 or later. The Periphery CLI must be installed separately and on the path. Projects must be built first so an index store exists, and schemes should be shared. Installed via Homebrew, a GitHub release binary, building from source, or the MCP registry; configured in the client's MCP config file.
Installation
In SourceWeft
- Open Periphery Code Audit in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Periphery MCP Server
A Model Context Protocol (MCP) server that wraps the Periphery tool, enabling AI assistants to perform Swift code audits and detect unused code in iOS/macOS projects.
Features
- 7 MCP Tools for comprehensive code analysis
- CLI Integration - Uses Periphery CLI for stability and version flexibility
- JSON Output - Structured, parseable results perfect for AI interpretation
- Flexible Scanning - Support for Xcode projects and Swift Packages
- Advanced Options - Full control over Periphery scan configurations
Quick Start
Using Homebrew (Recommended):
From Source:
Prerequisites
- macOS 13.0 or later
- Swift 6.0 or later
- Periphery installed
Installing Periphery
Or download from Periphery releases.
Installation
Option 1: Homebrew (Recommended)
Option 2: Download from GitHub Releases
Download the latest binary from Releases:
Option 3: Build from Source
Option 4: Install from MCP Registry
The server is also available on the MCP Registry. Use your MCP-compatible client to install it directly.
Configuration
Claude Desktop
Step 1: Locate Your Config File
The config file is at: ~/Library/Application Support/Claude/claude_desktop_config.json
Step 2: Edit the Configuration
If you installed via Homebrew:
If you installed to /usr/local/bin:
If you're using the build directory directly:
If you already have other MCP servers configured:
Step 3: Restart Claude Desktop
Important: You must completely quit and restart Claude Desktop for changes to take effect.
- Quit Claude Desktop: Press
Cmd+Qor use Claude Desktop → Quit - Wait a few seconds
- Reopen Claude Desktop
Step 4: Verify It's Working
Open a new conversation in Claude Desktop and try:
If configured correctly, Claude will use the check_periphery_installed tool and respond with installation status.
Testing with MCP Inspector
Before configuring Claude Desktop, you can test the server with the MCP Inspector:
The Inspector will open in your browser where you can test all tools interactively.
Other Editors
VS Code
Add to .vscode/mcp.json:
Cursor
Add to .cursor/mcp.json:
Available Tools
1. check_periphery_installed
Verify that Periphery CLI is installed and accessible.
Parameters: None
Example Response:
2. get_periphery_version
Get the installed version of Periphery.
Parameters: None
Example Response:
3. scan_project
Run a basic Periphery scan on a project.
Parameters:
project_path(required): Path to .xcodeproj or Package.swiftschemes(optional): Build schemes to scan (Xcode only)targets(optional): Specific targets to analyzeformat(optional): Output format: json, xcode, csv, checkstyle (default: json)
Example Response:
4. scan_with_config
Run Periphery scan using a YAML configuration file.
Parameters:
config_path(required): Path to .periphery.yml config file
5. analyze_unused_imports
Focus specifically on detecting unused imports.
Parameters:
project_path(required): Path to .xcodeproj or Package.swiftschemes(optional): Build schemes to scantargets(optional): Specific targets to analyze
6. find_redundant_public
Identify public declarations that could be internal.
Parameters:
project_path(required): Path to .xcodeproj or Package.swiftschemes(optional): Build schemes to scantargets(optional): Specific targets to analyze
7. scan_with_options
Advanced scanning with custom Periphery flags.
Parameters:
project_path(required): Path to .xcodeproj or Package.swiftschemes(optional): Build schemes to scantargets(optional): Specific targets to analyzeformat(optional): Output formatretain_public(optional): Retain all public declarationsretain_objc_accessible(optional): Retain @objc declarationsdisable_unused_import_analysis(optional): Disable unused import analysisindex_store_path(optional): Custom index store locationverbose(optional): Enable verbose output
Usage Examples
With Claude Desktop
Once configured, you can have natural conversations with Claude about your code:
Check Installation:
Scan a Project:
Find Redundant Public:
Analyze Unused Imports:
With Custom Configuration
Create .periphery.yml in your project:
Then use scan_with_config:
Troubleshooting
Server Not Appearing in Claude Desktop
Symptoms: Claude doesn't recognize Periphery tools after configuration
Solutions:
-
Verify config file syntax:
-
Check the binary path is correct:
-
Completely restart Claude Desktop:
- Press
Cmd+Qto quit (not just close the window) - Wait 5 seconds
- Reopen Claude Desktop
- Start a new conversation (old conversations won't see new servers)
- Press
-
Check Claude Desktop logs:
Periphery Not Found
If you get "Periphery is not installed":
- Install Periphery:
brew install peripheryapp/periphery/periphery - Verify installation:
which periphery - Restart Claude Desktop/VS Code/Cursor
- Try the
check_periphery_installedtool again
MCP Inspector Connection Errors
If the Inspector can't connect to the server:
-
Verify the server runs:
-
Check for errors:
-
Use the absolute path:
Scan Timeout
Default timeout is 5 minutes. For large projects:
- Use
scan_with_configwith a focused configuration - Scan specific targets instead of the entire project
- Use
--index-store-pathto reuse build artifacts - Build your project in Xcode first to generate the index
No Results or Empty Scan
Periphery requires a compiled project with an index store:
- Build your project first in Xcode (Cmd+B)
- Ensure schemes are shared:
- Xcode → Product → Scheme → Manage Schemes
- Check the "Shared" checkbox for your scheme
- Verify the project path:
- Check Periphery can access the project:
Permission Denied
If you get "Permission denied" when running the server:
Architecture
This server uses the CLI approach rather than importing Periphery as a library for maximum stability:
- ✅ CLI interface is Periphery's public API contract
- ✅ Survives internal Periphery refactorings
- ✅ Users can update Periphery independently
- ✅ Simpler dependency management
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
License
MIT License - see LICENSE file for details.
Related Projects
- Periphery - The underlying code analysis tool
- Model Context Protocol - The protocol specification
- MCP Swift SDK - Official Swift SDK for MCP
- MCP Registry - Official MCP server registry
- MCP Community Servers - Collection of community MCP servers
Distribution Channels
This server is available through multiple channels:
- MCP Registry: registry.modelcontextprotocol.io
- Homebrew Tap: github.com/zyntx-lab/homebrew-tap
- GitHub Releases: github.com/zyntx-lab/periphery-mcp-server/releases
- Community Servers: Listed in modelcontextprotocol/servers
Support
- Issues: GitHub Issues
- Periphery Docs: Periphery Guide
- MCP Docs: MCP Specification
Source: README.md at commit cbb2a2f
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Audit integrations
audit.domains - Domain Valuation
domains.auditOfficial publisher
Deterministic domain-name valuation: fair-value intervals, comparable recorded sales, availability checks, and a verified for-sale listing market.
Revenue Agent — OpenAPI Audit & Change Detection
news.prhOfficial publisher
A remote MCP endpoint that audits OpenAPI specifications and detects API changes, charging $0.10 USDC per analysis via x402 on Base.

SEO Audit & Broken Link Checker
Published by GitHub account prometheus-maker
An Apify-hosted MCP server that audits a website's pages for SEO metadata and finds broken links and images, returning per-page scores.

FinePrint AI Legal Risk & Contract Audit MCP Server
Published by GitHub account RitualDev-Lab
Local in-memory scanner that grades legal contracts, NDAs and leases for risk and drafts redline amendments for coding agents.

Mcp Supply Audit
Published by GitHub account kimmawla
Audits MCP servers as supply-chain artifacts — registry entries, PyPI/npm packages, client configs and tool definitions — using read-only static checks.