
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
skim-mcp-server
Advanced tools
MCP Server for Skim - Intelligent code compression for LLM context optimization
🚀 Production-ready Model Context Protocol server for Skim code transformation
Intelligently compress code for LLM context windows with built-in security, monitoring, and production features.
In Simple Terms:
If you're using Claude Code (an AI coding assistant), you may encounter "context too long" limitations when analyzing large code projects.
What Skim MCP Server Does:
Prerequisites:
Not sure if you need this? If you frequently use Claude Code to analyze large codebases, this tool will be very helpful!
# Install both MCP server and Skim CLI
npm install -g skim-mcp-server
# Or install skim CLI separately
npm install -g rskim
# In your project directory
npm install skim-mcp-server
git clone https://github.com/luw2007/skim-mcp-server.git
cd skim-mcp-server
npm install
npm run build
The server automatically installs Skim CLI if not found:
# During npm install (postinstall hook)
npm install skim-mcp-server
# Or manually
npm run install-skim
After installation, verify it was successful:
# Check if skim-mcp-server is available
skim-mcp-server --version
# Check Node.js version
node --version # Should be >= 18.0.0
If skim-mcp-server shows "command not found":
# Check globally installed packages
npm list -g skim-mcp-server
# Check npm global path
npm config get prefix
You may need to add the npm global path to your system PATH.
Locate and edit your Claude Code configuration file (depending on your operating system):
macOS / Linux:
~/.claude/config.json (recommended, try this first)~/.config/claude-code/config.jsonWindows:
C:\Users\YourUsername\.claude\config.jsonC:\Users\YourUsername\AppData\Roaming\claude-code\config.jsonIf the file doesn't exist, create it.
Add the following configuration:
{
"mcpServers": {
"skim": {
"command": "skim-mcp-server"
}
}
}
⚠️ Important: You must completely quit and restart Claude Code for the changes to take effect.
# Logging level
export LOG_LEVEL=info # debug, info, warn, error
# Allowed base paths (comma-separated)
export SKIM_ALLOWED_PATHS=/workspace,/home/user/projects
# Rate limiting
export SKIM_MAX_REQUESTS_PER_MINUTE=10
# Input size limit
export SKIM_MAX_INPUT_SIZE=10485760 # 10MB in bytes
After configuring and restarting Claude Code, test it:
Help me analyze this project's code structure
mcp__skim__skim_analyze toolSuccess indicators:
skim_file / skim_analyze calls in the tool invocation logsIf it doesn't work:
Once configured, the tools are automatically available in Claude Code:
skim_transform - Transform Source CodeTransform code from a string:
// Claude Code automatically uses this when analyzing code
mcp__skim__skim_transform({
source: 'function add(a, b) { return a + b; }',
language: 'javascript',
mode: 'structure',
show_stats: true
})
// Returns:
// function add(a, b) { /* ... */ }
//
// 📊 Token Reduction Statistics:
// [skim] 24 tokens → 9 tokens (62.5% reduction)
skim_file - Transform FilesTransform file or directory:
mcp__skim__skim_file({
path: '/workspace/src',
mode: 'structure',
show_stats: true
})
// Returns compressed code with statistics
skim_analyze - Architecture AnalysisAnalyze code architecture:
mcp__skim__skim_analyze({
path: '/workspace/src',
mode: 'structure'
})
// Returns:
// 1. Compressed code
// 2. Token statistics
// 3. Analysis framework to guide Claude
Scenario 1: Analyzing Project Architecture
You: "Help me analyze the code architecture in src/ directory"
Claude Code:
→ Automatically calls mcp__skim__skim_analyze
→ Compresses code (65% token reduction)
→ Quickly analyzes architecture and provides suggestions
Result: Complete architecture analysis report
Scenario 2: Code Review
You: "Review the code quality of src/auth.ts"
Claude Code:
→ Automatically calls mcp__skim__skim_file
→ Extracts function signatures and key logic
→ Provides detailed code review suggestions
Result: Identifies potential issues and improvement suggestions
Scenario 3: Understanding Large Files
You: "What does this 3000-line file do?"
Claude Code:
→ Automatically calls mcp__skim__skim_transform
→ Compresses to core structure (80% content reduction)
→ Quickly understands main logic
Result: Clear functional overview and workflow explanation
Key Point: You don't need to manually invoke these tools - Claude Code will automatically decide when to use them!
✅ Only absolute paths allowed
✅ Path traversal attacks blocked (../../../etc/passwd)
✅ Symlink resolution with validation
✅ Configurable allowed base paths
✅ Maximum input size (10MB default) ✅ Null byte detection ✅ Command injection prevention ✅ Shell injection mitigation (parameterized commands)
✅ Requests per minute limits ✅ Prevents DoS attacks ✅ Retry-after headers
# Install dependencies
npm install
# Run all tests
npm test
# Test with coverage
npm run test:coverage
# Watch mode for development
npm run test:watch
# Single file (300 lines)
skim transform - 1.3ms
# Large file (3000 lines)
skim transform - 14.6ms
# Cached (second run)
skim transform - 5ms (48x faster)
# MCP overhead < 2ms
| Mode | Reduction | Use Case | Example Output |
|---|---|---|---|
| structure | 60-80% | Architecture analysis | function foo() { /* ... */ } |
| signatures | 85-92% | API documentation | function foo(): void |
| types | 90-95% | Type system analysis | interface User { name: string } |
| full | 0% | Debug/validation | Original code |
# Transform file
skim file.ts --mode=structure --show-stats
# Transform directory
skim src/ --mode=signatures
# Transform with glob
skim 'src/**/*.ts' --jobs 4
# Clear cache
skim --clear-cache
git clone https://github.com/luw2007/skim-mcp-server.git
cd skim-mcp-server
npm install
# Start development
npm run dev
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Format code
npm run format:fix
# Build for production
npm run build
skim-mcp-server/
├── src/
│ └── index.js # Main server
├── test/
│ └── index.test.js # Test suite
├── scripts/
│ ├── install-skim.js # Auto-install script
│ └── build.js # Build script
├── docs/
│ └── examples.md # Usage examples
├── dist/ # Built files
└── README.md
docker build -t skim-mcp-server .
docker run -i --rm \
-e LOG_LEVEL=info \
-v /workspace:/workspace \
skim-mcp-server
version: '3.8'
services:
skim-mcp:
image: skim-mcp-server
environment:
- LOG_LEVEL=info
- SKIM_ALLOWED_PATHS=/workspace
volumes:
- ./workspace:/workspace
MIT License - see LICENSE file for details.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Q1: Getting "skim-mcp-server: command not found"
Reason: npm global install path is not in your system PATH.
Solution:
# Method 1: Find the installation path
npm config get prefix
# Assuming it returns /usr/local, the full path would be:
# /usr/local/bin/skim-mcp-server
# Method 2: Use the full path in your config file
{
"mcpServers": {
"skim": {
"command": "/usr/local/bin/skim-mcp-server" # Replace with actual path
}
}
}
Q2: Node.js version incompatibility error
Check your version:
node --version
Must be >= 18.0.0. If your version is too old, visit nodejs.org to download the latest LTS version.
Q3: Can't find where the config file is
Try these locations in order:
macOS / Linux:
# 1. Check this path first
ls -la ~/.claude/config.json
# 2. If it doesn't exist, check this
ls -la ~/.config/claude-code/config.json
# 3. If neither exists, create the first one
mkdir -p ~/.claude
echo '{"mcpServers":{}}' > ~/.claude/config.json
Windows:
Search for config.json in File Explorer, or create it directly at:
C:\Users\YourUsername\.claude\config.json
Q4: Configuration has no effect
Checklist:
skim-mcp-server command works in terminalQ5: When will the tool be automatically used?
Claude Code automatically uses Skim when:
You don't need to manually invoke it - Claude Code will automatically decide when to use it.
Q6: How do I know Skim is working?
Watch Claude Code's conversation window for:
mcp__skim__skim_file or mcp__skim__skim_analyzeThis indicates Skim is working.
Q7: Will Skim modify my code?
No! Skim only reads and compresses code for analysis - it will not modify any source files.
Please report issues on GitHub Issues.
Include:
node --version)See CHANGELOG.md for version history.
Skim Project and its Author @dean0x
This project is an MCP server wrapper built on top of the excellent Skim project created by dean0x. Skim is a powerful code transformation tool written in Rust that provides intelligent code compression capabilities for LLMs.
Without dean0x's outstanding work, this MCP server wouldn't exist. We highly recommend visiting the original project to learn more about the technical details!
Made with ❤️ for the LLM community
FAQs
MCP Server for Skim - Intelligent code compression for LLM context optimization
The npm package skim-mcp-server receives a total of 30 weekly downloads. As such, skim-mcp-server popularity was classified as not popular.
We found that skim-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.