# Toolkits MCP
A stdio MCP implementation using Fast MCP 3 meant to be run locally. This MCP provides a collection of useful tools for image processing.
## MCP Tools
- **Image optimizer**: Optimize images by reducing file size while maintaining quality.
- **Remove background from image**: Remove the background from images using AI.
- **Favicon generator**: Generate favicons of sizes 16, 32, 192, 512 from a logo.png file.
## Tech Stack
- `uv` for Python environment management
- Python
- Fast MCP 3.0
- PIL (Pillow) for image processing
- rembg for background removal
## Installation
1. Ensure you have `uv` installed. If not, install it from https://github.com/astral-sh/uv.
2. Clone or navigate to the project directory.
3. Install dependencies:
```bash
uv sync
```
## Running Locally
To run the MCP server locally for testing:
```bash
uv run python main.py
```
This starts the server using stdio transport, which is suitable for local development.
## Using in VSCode
To use this MCP server in VSCode, you can integrate it with the Claude Code extension or GitHub Copilot Chat that supports MCP.
### Option 1: Using Claude Code Extension
1. Install the "Claude Code" extension in VSCode from the marketplace.
2. Create a `.mcp.json` configuration file in your project root or user directory (e.g., `~/.mcp.json` for user scope).
3. Add the following configuration to `.mcp.json`:
```json
{
"mcpServers": {
"toolkits-mcp": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/toolkits-mcp"
}
}
}
```
Replace `/path/to/toolkits-mcp` with the actual path to your project directory.
4. Restart VSCode or reload the Claude Code extension.
5. The tools should now be available in Claude Code conversations.
### Option 2: Using GitHub Copilot Chat
1. Ensure you have GitHub Copilot Chat installed in VSCode.
2. Open VSCode settings (Cmd/Ctrl + ,) and search for "mcp".
3. In the "GitHub Copilot Chat: Mcp" setting, add the server configuration:
```json
{
"toolkits-mcp": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/toolkits-mcp"
}
}
```
4. The tools will be available in Copilot Chat.
## Usage
Once configured, you can use the tools in your AI assistant conversations:
- To optimize an image: Ask the assistant to optimize an image file.
- To remove background: Request background removal from an image.
- To generate favicons: Provide a logo.png and request favicon generation.
## Development
To contribute or modify the tools:
1. Make changes to `main.py`.
2. Test locally using `uv run python main.py`.
3. Ensure all dependencies are listed in `pyproject.toml`.
## License
[Add license information if applicable]