claude-code-tools
Allows running ESLint linting and auto-fixing on code files to enforce code quality and style rules.
Generates test skeletons for the Jest testing framework, optionally creating test files alongside source code.
Allows formatting code using Prettier to enforce consistent code style.
Generates test skeletons for the Vitest testing framework, optionally creating test files alongside source code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-code-toolsReview src/index.ts for security issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-code-tools
TypeScript toolkit for Claude Code — code review, auto-fix, tests, lint, and format exposed as an MCP server and a small CLI.
What is this?
claude-code-tools is a TypeScript package that implements common developer workflows so Claude (via Model Context Protocol) or your own scripts can:
Review files or diffs for risky patterns (e.g.
eval,debugger, possible secrets, TODOs) plus optional custom rulesAuto-fix with ESLint
--fix, Prettier, and safe line-based cleanups (standaloneconsole.log/console.debug/console.info, up tomaxFixesPerFile), with an approval gate by defaultRun tests via your configured command (default
npm test)Generate test skeletons for Vitest or Jest
Lint and format with the ESLint and Prettier APIs
Suggest refactors using lightweight heuristics (line length, nesting, etc.)
All processing runs locally on your machine.
Related MCP server: mcp-agent-review
Requirements
Node.js 20+ (22+ recommended for tooling parity)
Optional: Claude Code or any MCP-capable client
Installation
cd claude-code-tools
npm install
npm run buildThe dist/ output is gitignored. Run npm run build before using node dist/..., npm run review, npm run fix, or registering dist/index.js in your MCP client.
npm scripts
Script | Description |
| Compile |
| Run MCP server on stdio from TypeScript (stdio; blocks) |
| ESLint on |
| Vitest (unit + integration) |
| Integration smoke tests |
|
|
|
|
|
|
| Vitest in watch mode |
| Runs before |
Quick start
1. MCP server (stdio)
Build, then register the server (absolute path required):
{
"mcpServers": {
"dev-tools": {
"command": "node",
"args": ["/absolute/path/to/claude-code-tools/dist/index.js"]
}
}
}Restart the client. Registered tools:
Tool | Purpose |
| Review a file or diff |
| ESLint/Prettier + safe console-line removals |
| Run the test command |
| Emit a test skeleton ( |
| ESLint |
| Prettier |
| Heuristic suggestions |
Development (TypeScript, stdio):
npm run dev2. CLI
After npm run build:
# Review a file (JSON output)
node dist/cli.js review --file src/index.ts
# Only errors and warnings (drop info-level findings)
node dist/cli.js review --file src/index.ts --severity-warn-only
# Pipe a diff
git diff | node dist/cli.js review --diff -
# Run tests (uses `.claude-tools.config.json` when present)
node dist/cli.js test-run
# Auto-fix: needs --auto-approve or CLAUDE_TOOLS_AUTO_APPROVE unless disabled in config
node dist/cli.js fix --file src/buggy.ts --auto-approveExit codes (fix): 0 success, 2 file not found, 3 approval required.
After npm link or publishing: claude-code-tools review --file ... (see package.json bin).
3. Programmatic API
import {
reviewCode,
autoFix,
runTests,
writeTests,
runLint,
runFormat,
refactorSuggest,
} from 'claude-code-tools';
const review = await reviewCode({ path: './src/index.ts' });
console.log(review.summary, review.issues);
const fixed = await autoFix({ path: './src/buggy.ts', autoApprove: false });
const tests = await runTests({ command: 'npm test' });
const generated = await writeTests({
path: './src/auth.ts',
framework: 'vitest',
write: false,
});
console.log(generated.generatedCode);Use write: true to create a *.test.ts / *.spec.ts file next to the source (same as the MCP test_writer tool with write: true).
4. Custom rules
import { addCustomRule } from 'claude-code-tools/rules';
addCustomRule({
name: 'no-console',
description: 'Disallow console.log in production code',
severity: 'warning',
check: ({ source, filePath }) => {
if (!/\.[jt]sx?$/.test(filePath)) {
return [];
}
return source.includes('console.log')
? [
{
rule: 'no-console',
message: 'Avoid console.log in production paths',
severity: 'warning',
suggestion: 'Use a logger',
},
]
: [];
},
});Configuration
Create .claude-tools.config.json in the project root:
{
"review": {
"ignorePatterns": ["**/*.test.ts", "dist/**"],
"severityThreshold": "warning"
},
"autoFix": {
"requireApproval": true,
"maxFixesPerFile": 10
},
"testRunner": {
"defaultCommand": "npm run test:ci",
"timeoutMs": 60000
},
"lint": {
"eslintConfig": "eslint.config.js"
}
}severityThreshold:error|warning|info— caps which severities are reported after scanning.autoFix.requireApproval: whenfalse,auto_fixapplies ESLint/Prettier/console cleanups without the approval gate (default istrue).maxFixesPerFile: max number of standaloneconsole.*lines removed per auto-fix run (default10).CLAUDE_TOOLS_AUTO_APPROVE: set to1,true, oryesto allow destructive fixes without per-callautoApprove(see.env.example).
Docker
A Dockerfile is included. From the repo root:
docker build -t claude-code-tools .
docker run -i --rm -v "$(pwd)":/workspace -w /workspace claude-code-toolsTesting
npm run lint
npm test
npm run test:integrationnpm test runs the full Vitest suite, including tests/integration/. Use npm run test:integration if you only want the smoke tests.
Project layout
claude-code-tools/
├── src/
│ ├── tools/ # code-review, auto-fix, test-runner, …
│ ├── mcp-server.ts # MCP tool registration
│ ├── cli.ts # CLI entry (also package bin)
│ ├── rules.ts # Custom rules registry (export: claude-code-tools/rules)
│ ├── config.ts
│ └── index.ts # Library API; MCP stdio when executed as main
├── tests/
├── Dockerfile
├── .dockerignore
├── .env.example
├── .gitignore
├── eslint.config.js
├── LICENSE
├── README.md
├── package.json
├── package-lock.json
├── tsconfig.json
└── vitest.config.tsLicense
This project is licensed under the MIT License.
Acknowledgements
Built with TypeScript, @modelcontextprotocol/sdk, ESLint, and Prettier.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceMCP server that enables Claude Code to send code and plans for review by OpenAI Codex, returning structured feedback inline.Last updated8523MIT
- Alicense-qualityCmaintenanceAn MCP server that provides agentic code review powered by OpenAI-compatible models, designed for use with Claude Code.Last updated1MIT
- AlicenseBqualityDmaintenanceAn MCP server that connects Claude Code to your codebase for automated code cleanup with scanning, planning, atomic fixes, and rollback safety.Last updated102MIT
- AlicenseAqualityBmaintenanceAn MCP server that enables code review by having two LLMs (Claude and GPT-4o) independently evaluate code and then synthesize their findings into a unified report.Last updated3MIT
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/permacopia3223/claude-code-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server