{"id":27736765,"url":"https://github.com/drbenjamin/imagerecog","last_synced_at":"2026-04-13T17:01:59.941Z","repository":{"id":288951873,"uuid":"969460084","full_name":"DrBenjamin/BenBox","owner":"DrBenjamin","description":"Agent AI app utilizing MCP tools with Angular mobile and Phoenix desktop app.","archived":false,"fork":false,"pushed_at":"2025-06-04T17:03:36.000Z","size":5602,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T22:16:50.755Z","etag":null,"topics":["angular","image-recognition","js","mcp-server","phoenix","python","streamlit","ts"],"latest_commit_sha":null,"homepage":"https://www.seriousbenentertainment.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrBenjamin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-20T07:37:13.000Z","updated_at":"2025-06-04T17:03:38.000Z","dependencies_parsed_at":"2025-04-28T14:42:43.635Z","dependency_job_id":"d2910007-6904-4178-95f2-52f4a26bd911","html_url":"https://github.com/DrBenjamin/BenBox","commit_stats":null,"previous_names":["drbenjamin/imagerecog","drbenjamin/benbox"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DrBenjamin/BenBox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBenjamin%2FBenBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBenjamin%2FBenBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBenjamin%2FBenBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBenjamin%2FBenBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrBenjamin","download_url":"https://codeload.github.com/DrBenjamin/BenBox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrBenjamin%2FBenBox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261926624,"owners_count":23231363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","image-recognition","js","mcp-server","phoenix","python","streamlit","ts"],"created_at":"2025-04-28T14:30:14.459Z","updated_at":"2025-06-25T18:04:16.366Z","avatar_url":"https://github.com/DrBenjamin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSE-based Server and mobile Angular App\n\nImage recognition tool on top of the [MCP](https://modelcontextprotocol.io/introduction) protocol. This project is designed to provide a simple and efficient way to recognize images using a server-client architecture.\n\n**Why?**\n\nMCP server can now be some running process that agents (clients) connect to, use, and disconnect from whenever and wherever they want. In other words, an SSE-based server and clients can be decoupled processes (potentially even, on decoupled nodes). This is different and better fits \"cloud-native\" use-cases compared to the STDIO-based pattern where the client itself spawns the server as a subprocess.\n\n## Setup\n\nInstall the required packages and the MCP server and client:\n\n```bash\n# Installing Node.js on Linux\nsudo apt install nodejs npm\n\n# Installing Node.js on Mac\nbrew install nodejs npm\n\n# Installing mcp\nconda install -c conda-forge mcp \n\n# Cloning the repo\ngit clone https://github.com/DrBenjamin/imagerecog\n```\n\n## Usage\n\nTest bytes for an image to test on MCP Inspector or in VS Code Copilot Chat:\n\n```ini\n\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=\"\n```\n\nTest image URL:\n\n```ini\nhttps://www.seriousbenentertainment.org/R/Image.png\nhttp://212.227.102.172:9000/templategenerator/subfolder/City.Golf.jpg\n```\n\nRunning the MCP server and Streamlit client app:\n\n```bash\n# Creating a conda environment using the environment.yml file\nconda env create -f environment.yml\n\n# Activating the conda environment\nconda activate imagerecog\npython -m pip install \"mcp[cli]\"\n\n# 1. Running the MCP dev server\nmcp dev src/server.py\n\n# 2. Running the MCP server\npython src/server.py\n\n# 3. Running the Streamlit app\npython -m streamlit run app.py\n\n# or the run script\nsudo chmod 755 run.sh\n./run.sh\nlsof -i :6274\nlsof -i :8080\nlsof -i :8501\n```\n\n## Configuration\n\nChange configuration and add the OpenAI API key in the `.streamlit/st.secrets.toml` file:\n\n```ini\n# LLM Provider\nLLM_LOCAL = \"False\"  # `False` for local Ollama model, `True` for OpenAI API\n\n# MCP API\n[MCP]\nMCP_URL = \"http://127.0.0.1:8080\"\nMCP_SYSTEM_PROMPT = \"\u003csystem prompt for image recognition\u003e\"\nMCP_USER_PROMPT = \"\u003cuser prompt for image recognition\u003e\"\n\n# Ollama API\n[OLLAMA]\nOLLAMA_URL = \"http://127.0.0.1:11434\"\nOLLAMA_MODEL = \"\u003collama model\u003e\" # e.g. llava or \"llama3.2-vision\"\n\n# OpenAI API\n[OPENAI]\nOPENAI_API_KEY = \"sk-...\"\nOPENAI_MODEL = \"\u003cmodel\u003e\" # e.g. \"o4-mini\" or \"gpt-4.1\" or \"gpt-4o\" or \"gpt-4-turbo\"\n```\n\n## Ollama\n\nTo install und run the Ollama model, use the following command:\n\n```bash\n# Running the Ollama service\n# Linux\nsystemctl start ollama\n# or Mac\nbrew services start ollama\n\n# Running the model\nollama run llama3.2-vision\n\n# Sharing the models between Ollama and LM Studio\n# https://smcleod.net/2024/03/llamalink-ollama-to-lm-studio-llm-model-linker/\ngo install github.com/sammcj/llamalink@latest\nllamalink\n```\n\n## Docker\n\nTo use the Docker for MCP hosting, use the following commands:\n\n```bash\n# Build the docker image\ndocker build -t \u003cdocker hub user name\u003e/imagerecog .\n\n# Login to Docker Hub\ndocker login\n\n# Tagging the image (https://hub.docker.com/repositories/drbenjamin)\ndocker tag \u003cdocker hub user name\u003e/imagerecog \u003cdocker hub user name\u003e/imagerecog:latest\n\n# Push the image to the registry\ndocker push \u003cdocker hub user name\u003e/imagerecog:latest\n```\n\nNow the MCP docker can be added in VS Code or any other MCP client like Claude Desktop.\n\n## Mobile App\n\nThe Angular app can be run using the following commands:\n\n```bash\n# Installing Angular CLI\nnpm install -g @angular/cli\n\n# Installing the required packages\nnpm install\n\n# Running the app\nng serve\n```\n\n### Buildung the app for mobile\n\nTo build the app for mobile, use the following commands (pin matching Capacitor versions):\n\n```bash\n# Preparing the app for mobile\nnpm install @capacitor/core@5.7.8 @capacitor/cli@5.7.8\nnpm install @capacitor/ios@5.7.8\nnpx cap init imagerecog org.benbox.imagerecog --webDir=../browser\nnpx cap add ios\n\n# Building the app\nng build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbenjamin%2Fimagerecog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbenjamin%2Fimagerecog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbenjamin%2Fimagerecog/lists"}