Periphery MCP Server
This is a Swift code audit server based on the Model Context Protocol. It helps AI assistants detect unused code in iOS/macOS projects by integrating the Periphery tool.
rating : 2 points
downloads : 6.2K
What is Periphery MCP Server?
Periphery MCP Server is a bridge that connects AI assistants (such as Claude) with the Periphery code analysis tool. It allows AI to check unused code, redundant declarations, and optimizable parts in Swift projects just like developers. Imagine you have an iOS or macOS project. Over time, it may accumulate many classes, functions, or imported libraries that are no longer used. This tool can help you discover this 'code junk' and keep the project clean and efficient.How to use Periphery MCP Server?
The usage process is very simple: 1. Install the Periphery tool and this MCP server. 2. Configure the server in an AI assistant (such as Claude Desktop). 3. Let the AI analyze the code through natural language. For example, you can directly ask the AI: 'Help me check if there is any unused code in the ~/Projects/MyApp project?' The AI will use this tool to analyze and give a detailed report.Use cases
This tool is particularly suitable for the following situations: • Cleaning up obsolete code in legacy projects. • Understanding dependencies before refactoring a large Swift codebase. • Checking for duplicate or redundant public interfaces in team projects. • Optimizing the size of Swift Package Manager packages. • Quickly understanding the code usage when taking over a new project.Main features
7 intelligent analysis tools
Provides a complete code analysis toolbox, including basic scanning, configuration scanning, import analysis, public declaration checking, etc., to meet different analysis needs.
Natural language interaction
There is no need to memorize complex commands. Simply tell the AI assistant what you want to analyze in natural language, and it will automatically call the appropriate tool.
Structured JSON output
The analysis results are returned in a clear JSON format. The AI assistant can easily parse and give meaningful suggestions, rather than a raw technical report.
Support for multiple project types
Compatible with Xcode projects (.xcodeproj) and Swift Package Manager projects (Package.swift), covering mainstream Swift development scenarios.
Flexible scanning options
Can analyze specific schemes and targets, or use custom configuration files to meet different levels of analysis needs.
CLI integration architecture
Adopts a stable command-line interface integration method to ensure compatibility with the Periphery tool version. Users can independently update the underlying tool.
Advantages
AI assistant integration: Makes complex code analysis as simple as a conversation.
Saves time: Automatically discovers unused code, avoiding manual review.
Improves code quality: Helps keep the codebase clean and maintainable.
Friendly for learning: New developers can also understand code optimization through AI suggestions.
Flexible configuration: Supports multiple scanning options and custom configuration files.
Limitations
Requires the Periphery tool: The Periphery CLI tool must be installed first.
macOS limitation: Currently mainly supports the macOS system.
Scanning time for large projects: Very large projects may take a long time to analyze.
Requires project compilation: The project must be successfully compiled before analysis.
Limited dynamic code detection: May not accurately identify code dynamically called at runtime.
How to use
Install the Periphery tool
First, you need to install the underlying Periphery code analysis tool. This is a dependency of the server.
Install the MCP server
Choose a way to install the Periphery MCP Server. It is recommended to use the Homebrew method.
Configure the AI assistant
Add the server configuration in an AI assistant that supports MCP, such as Claude Desktop. You need to edit the configuration file and restart the application.
Start using
Restart the AI assistant, create a new conversation, and you can start using natural language to let the AI analyze the code.
Usage examples
Clean up a legacy project
Take over an old project and want to clean up the obsolete code accumulated over the years
Optimize a Swift package
Develop a Swift Package and want to ensure there are no redundant dependencies and public interfaces
Analysis before refactoring
Before planning to refactor a large module, first understand the current code usage
Frequently Asked Questions
What should I do if I can't see the Periphery tool in the AI assistant after installation?
The scanning result shows 'No unused code', but I think there should be. What's the matter?
Does it support the Windows or Linux system?
What should I do if the scanning of a large project times out?
In addition to Claude Desktop, does it support other AI assistants?
Related resources
Periphery official documentation
Detailed documentation and usage guide for the underlying code analysis tool
Model Context Protocol official website
Official description of the MCP protocol, understand the principle of AI assistant extension
GitHub repository
Project source code, issue feedback, and contribution guide
MCP Registry
Official MCP server registry, discover more AI tools
Homebrew Tap
Channel for installation and update through Homebrew

Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
30.8K
5 points

Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
59.9K
4.3 points

Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
20.0K
4.3 points

Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
18.2K
4.5 points

Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
56.1K
4.5 points

Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
26.3K
5 points

Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
40.2K
4.8 points

Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
18.1K
4.5 points
