Fossil
The code quality toolkit for the agentic AI era. Find dead code, clones, and scaffolding across 15 languages. MCP server + CLI.
What is Fossil?
Fossil is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to code quality toolkit for the agentic ai era. find dead code, clones, and scaffolding across 15 languages. mcp server + cli.
The code quality toolkit for the agentic AI era. Find dead code, clones, and scaffolding across 15 languages. MCP server + CLI.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- The code quality toolkit for the agentic AI era. Find dead c
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx fossilConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Fossil
Fossil is a code quality MCP server and CLI toolkit built in Rust that detects dead code, code clones (Types 1, 2, and 3), and scaffolding artifacts across 16 programming languages using AST-based static analysis. It integrates directly with AI coding agents through its MCP server interface, providing tools like scan_all, analyze_dead_code, detect_clones, fossil_inspect, fossil_trace, and fossil_detect_scaffolding so that assistants can assess blast radius, trace call graphs, and identify cleanup opportunities in large codebases. Fossil is zero-configuration by default — it works out of the box with an optional fossil.toml for fine-tuning thresholds and exclusions.
Prerequisites
- Rust toolchain installed (for cargo installation) OR curl/PowerShell for the binary installer
- A codebase in one of the 16 supported languages (Python, JavaScript, TypeScript, Rust, Go, Java, C#, C/C++, Ruby, PHP, Swift, Kotlin, Scala, Bash, R)
- Claude Desktop, Claude Code, or another MCP-compatible AI assistant
- Cargo or cargo-binstall for Rust-based installation (optional)
Install Fossil
Install the fossil-mcp binary using the installer script, cargo, or by building from source. The installer script is the fastest method for macOS and Linux.
# macOS/Linux (recommended)
curl -fsSL fossil-mcp.com/install.sh | sh
# Windows PowerShell
irm fossil-mcp.com/install.ps1 | iex
# Via Cargo
cargo install fossil-mcp
# Via cargo-binstall (faster)
cargo binstall fossil-mcpVerify installation
Confirm fossil-mcp is installed and accessible in your PATH by checking the version.
fossil-mcp --versionCreate an optional configuration file (fossil.toml)
For projects where you want to customize detection thresholds or exclude generated code, create a fossil.toml in your project root. This file is optional — Fossil works with zero configuration.
[dead_code]
min_confidence = "high"
exclude_patterns = ["generated/**", "vendor/**"]
[clones]
min_lines = 6
similarity_threshold = 0.8Register Fossil as an MCP server in Claude Desktop
Add the fossil-mcp server entry to your claude_desktop_config.json, specifying the project directory to analyze as an argument.
{
"mcpServers": {
"fossil": {
"command": "fossil-mcp",
"args": ["serve", "/path/to/your/project"]
}
}
}Run a standalone scan from the CLI
Use the CLI for one-off analysis or CI/CD integration. The scan command runs all analyses (dead code, clones, scaffolding) and reports results.
# Full scan of current directory
fossil-mcp scan .
# Dead code only, high confidence
fossil-mcp dead-code . --min-confidence high
# Clone detection with custom thresholds
fossil-mcp clones . --min-lines 10 --similarity 0.9
# CI gate: fail if more than 10 dead code items
fossil-mcp check --max-dead-code 10 --diff origin/main --format sarifFossil Examples
Client configuration
Claude Desktop configuration entry for Fossil MCP server, enabling Claude to analyze your project for dead code, clones, and scaffolding.
{
"mcpServers": {
"fossil": {
"command": "fossil-mcp",
"args": ["serve", "/path/to/your/project"],
"env": {
"FOSSIL_MIN_CONFIDENCE": "medium",
"FOSSIL_OUTPUT_FORMAT": "json"
}
}
}
}Prompts to try
Use these prompts to explore code quality issues in your codebase through Claude with the Fossil MCP server.
- "Scan my project for dead code and show me the highest-confidence findings"
- "Find all Type 3 code clones in the src/ directory with similarity above 85%"
- "Trace the call graph for the processPayment function and show its blast radius"
- "Detect any scaffolding artifacts or TODO-phase comments left in the codebase"
- "Run a full scan and summarize the top 10 cleanup opportunities by impact"Troubleshooting Fossil
fossil-mcp command not found after installation
The installer adds fossil-mcp to ~/.local/bin or ~/.cargo/bin. Ensure this directory is in your PATH: add 'export PATH="$HOME/.cargo/bin:$PATH"' to your ~/.zshrc or ~/.bashrc and restart your shell. For Claude Desktop, use the absolute path (e.g. /Users/yourname/.cargo/bin/fossil-mcp) in the config.
Dead code detection reports too many false positives
Increase the minimum confidence threshold by setting FOSSIL_MIN_CONFIDENCE=high or adding min_confidence = "high" to your fossil.toml [dead_code] section. Also add exclude_patterns for generated directories like vendor/, generated/, or dist/.
Clone detection is slow on large codebases
Increase FOSSIL_MIN_LINES to filter out short duplicates (e.g. FOSSIL_MIN_LINES=15). Use the --diff flag to limit analysis to changed files: 'fossil-mcp clones . --diff origin/main'. This is especially useful in CI pipelines.
Frequently Asked Questions about Fossil
What is Fossil?
Fossil is a Model Context Protocol (MCP) server that code quality toolkit for the agentic ai era. find dead code, clones, and scaffolding across 15 languages. mcp server + cli. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Fossil?
Follow the installation instructions on the Fossil GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Fossil?
Fossil works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Fossil free to use?
Yes, Fossil is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Fossil Alternatives — Similar Developer Tools Servers
Looking for alternatives to Fossil? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Fossil in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Fossil?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.