diff --git a/PUBLISHING.md b/PUBLISHING.md deleted file mode 100644 index 8d0607d..0000000 --- a/PUBLISHING.md +++ /dev/null @@ -1,200 +0,0 @@ -# Publishing Guide - -This guide explains how to make the Image Recognition MCP Server portable and distributable. - -## Current Setup (Local) - -The server currently runs locally using the `run.sh` script. This is configured in Kilocode's MCP settings: - -```json -{ - "mcpServers": { - "image-recognition": { - "command": "/home/enne2/Sviluppo/tetris-sdl/mcp-image-server/run.sh", - "args": [], - "env": { - "OPENAI_API_KEY": "your-openai-api-key-here" - } - } - } -} -``` - -## Making It Portable (PyPI Distribution) - -To make this server portable and installable by anyone, you can publish it to PyPI. - -### Prerequisites - -1. Install build tools: -```bash -pip install build twine -``` - -2. Create a PyPI account at https://pypi.org/account/register/ - -3. Create an API token at https://pypi.org/manage/account/token/ - -### Step 1: Update Package Metadata - -Edit `setup.py` and `pyproject.toml` to update: -- `author` and `author_email` -- `url` (your GitHub repository) -- Version number - -### Step 2: Build the Package - -```bash -cd /home/enne2/Sviluppo/tetris-sdl/mcp-image-server -python -m build -``` - -This creates: -- `dist/image-recognition-mcp-0.1.0.tar.gz` (source distribution) -- `dist/image_recognition_mcp-0.1.0-py3-none-any.whl` (wheel distribution) - -### Step 3: Test Locally - -Before publishing, test the package locally: - -```bash -pip install dist/image_recognition_mcp-0.1.0-py3-none-any.whl -``` - -Then test the command: -```bash -image-recognition-mcp -``` - -### Step 4: Publish to PyPI - -#### Option A: Using Twine (Recommended) - -```bash -python -m twine upload dist/* -``` - -You'll be prompted for your PyPI username and password/token. - -#### Option B: Using UV (Modern Alternative) - -```bash -uv publish -``` - -Set your PyPI token: -```bash -export UV_PUBLISH_TOKEN="your-pypi-token" -``` - -### Step 5: Update Kilocode Configuration - -After publishing, users can install and use your server with: - -```bash -pip install image-recognition-mcp -``` - -Or use it directly with `uvx` (like `npx` for Python): - -```json -{ - "mcpServers": { - "image-recognition": { - "command": "uvx", - "args": [ - "image-recognition-mcp" - ], - "env": { - "OPENAI_API_KEY": "your-openai-api-key-here" - } - } - } -} -``` - -Or with `pipx`: - -```json -{ - "mcpServers": { - "image-recognition": { - "command": "pipx", - "args": [ - "run", - "image-recognition-mcp" - ], - "env": { - "OPENAI_API_KEY": "your-openai-api-key-here" - } - } - } -} -``` - -## Benefits of PyPI Distribution - -1. **Easy Installation**: Users can install with `pip install image-recognition-mcp` -2. **Version Management**: Easy to update and manage versions -3. **Dependency Management**: Automatically installs required dependencies -4. **Portable**: Works on any system with Python installed -5. **No Local Path**: No need for absolute paths in configuration - -## Alternative: GitHub Distribution - -If you don't want to publish to PyPI, you can distribute via GitHub: - -```json -{ - "mcpServers": { - "image-recognition": { - "command": "uvx", - "args": [ - "--from", - "git+https://github.com/yourusername/image-recognition-mcp.git", - "image-recognition-mcp" - ], - "env": { - "OPENAI_API_KEY": "your-openai-api-key-here" - } - } - } -} -``` - -## Updating the Package - -1. Update version in `setup.py` and `pyproject.toml` -2. Rebuild: `python -m build` -3. Republish: `python -m twine upload dist/*` - -Users will get updates automatically when they reinstall or when using `uvx`. - -## Testing Before Publishing - -Always test your package locally before publishing: - -```bash -# Build -python -m build - -# Install locally -pip install dist/*.whl - -# Test -image-recognition-mcp - -# Uninstall -pip uninstall image-recognition-mcp -``` - -## Current Status - -✅ Package structure ready -✅ `setup.py` configured -✅ `pyproject.toml` configured -✅ `MANIFEST.in` created -✅ LICENSE added -✅ Entry point configured - -**Ready to publish!** Just update the metadata and follow the steps above. \ No newline at end of file diff --git a/README.md b/README.md index b063914..7924d27 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ Automatically configures Kilocode! ✨ ### Method 2: From Source ```bash -git clone https://github.com/yourusername/image-recognition-mcp.git +git clone https://git.enne2.net/enne2/mcp-image-server.git cd image-recognition-mcp pip install -e . ``` @@ -171,17 +171,19 @@ No installation needed! Works like `npx` for Python. The server automatically adds this configuration: ```json -{ - "mcpServers": { "image-recognition": { "command": "uvx", - "args": ["image-recognition-mcp"], + "args": [ + "--from", + "git+https://git.enne2.net/enne2/mcp-image-server.git", + "image-recognition-server" + ], "env": { - "OPENAI_API_KEY": "your-openai-api-key-here" - } + "OPENAI_API_KEY": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + "disabled": false, + "alwaysAllow": [] } - } -} ``` ## Files Structure diff --git a/butcher_pokemon_style.png b/butcher_pokemon_style.png deleted file mode 100644 index 517862f..0000000 Binary files a/butcher_pokemon_style.png and /dev/null differ diff --git a/pyproject.toml b/pyproject.toml index bb77d60..f481921 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,9 @@ dependencies = [ ] [project.urls] -Homepage = "https://github.com/yourusername/image-recognition-mcp" -Repository = "https://github.com/yourusername/image-recognition-mcp" -Issues = "https://github.com/yourusername/image-recognition-mcp/issues" +Homepage = "https://git.enne2.net/enne2/mcp-image-server.git" +Repository = "https://git.enne2.net/enne2/mcp-image-server.git" +Issues = "https://git.enne2.net/enne2/mcp-image-server.git" [project.scripts] image-recognition-mcp = "image_recognition_server.server:main" diff --git a/setup.py b/setup.py index b61196a..49b3617 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( description="An MCP server for AI-powered image analysis and generation using OpenAI Vision API and DALL-E", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/yourusername/image-recognition-mcp", + url="https://git.enne2.net/enne2/mcp-image-server.git", packages=find_packages(), classifiers=[ "Development Status :: 3 - Alpha",