We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/whtan410/mcp_code_review'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
claude_desktop_config.md•1.65 KiB
# How to Use with Claude Desktop
## Setup
1. Open Claude Desktop configuration file:
- **Mac**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add this MCP server to the config:
```json
{
"mcpServers": {
"code-refiner": {
"command": "python",
"args": ["/absolute/path/to/mcp_code_review/mcp_server.py"],
"env": {
"GOOGLE_API_KEY": "your-gemini-api-key-here"
}
}
}
}
```
3. Replace `/absolute/path/to/mcp_code_review/` with your actual path
4. Add your Gemini API key (get from https://ai.google.dev/)
5. Restart Claude Desktop
## Usage
Just talk to Claude naturally! Examples:
**Example 1: Refine code**
```
You: "Refine /Users/me/project/app.py to make it more logical and add error handling"
Claude will:
1. Call refine_code_tool
2. Show you the diff and explanation
3. Ask if you want to apply it
4. If yes, call apply_refinement_tool
```
**Example 2: Improve existing code**
```
You: "Make /path/to/script.py more performant"
Claude automatically:
- Uses refine_code_tool to analyze and improve
- Shows you what changed
- Waits for your approval
- Applies changes when you confirm
```
**Example 3: Simplify code**
```
You: "Simplify the logic in /path/to/complex.py"
```
## How it works
1. You tell Claude what you want in natural language
2. Claude sees your MCP tools and decides when to use them
3. `refine_code_tool` - Second layer LLM reviews and improves code
4. Shows you the diff
5. You approve/reject in Claude chat
6. `apply_refinement_tool` - Applies changes after approval
No custom client needed - just Claude Desktop!