{"id":28437190,"url":"https://github.com/stackloklabs/ocireg-mcp","last_synced_at":"2026-03-06T06:31:09.956Z","repository":{"id":291728787,"uuid":"978579828","full_name":"StacklokLabs/ocireg-mcp","owner":"StacklokLabs","description":"An MCP (Model Context Protocol) server that provides tools for querying OCI registries and image references.","archived":false,"fork":false,"pushed_at":"2026-03-03T01:03:50.000Z","size":136,"stargazers_count":11,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-03T04:39:05.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StacklokLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":"dco.md","cla":null}},"created_at":"2025-05-06T07:51:01.000Z","updated_at":"2026-02-25T16:44:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e988a65a-43b8-41d3-9aa9-836341ddb072","html_url":"https://github.com/StacklokLabs/ocireg-mcp","commit_stats":null,"previous_names":["stackloklabs/ocireg-mcp"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/StacklokLabs/ocireg-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Focireg-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Focireg-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Focireg-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Focireg-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StacklokLabs","download_url":"https://codeload.github.com/StacklokLabs/ocireg-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Focireg-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-06-05T23:09:10.232Z","updated_at":"2026-03-06T06:31:09.932Z","avatar_url":"https://github.com/StacklokLabs.png","language":"Go","funding_links":[],"categories":["Security"],"sub_categories":["How to Submit"],"readme":"# OCI Registry MCP Server\n\nAn MCP (Model Context Protocol) server that provides tools for querying OCI registries and image references.\n\n## Overview\n\nThis project implements an SSE-based MCP server that allows LLM-powered applications to interact with OCI registries. It provides tools for retrieving information about container images, listing tags, and more.\n\n## Features\n\n- Get information about OCI images\n- List tags for repositories\n- Get image manifests\n- Get image configs\n\n## MCP Tools\n\nThe server provides the following MCP tools:\n\n### get_image_info\n\nGet information about an OCI image.\n\n**Input:**\n- `image_ref`: The image reference (e.g., docker.io/library/alpine:latest)\n\n**Output:**\n- Image information including digest, size, architecture, OS, creation date, and number of layers\n\n### list_tags\n\nList tags for a repository.\n\n**Input:**\n- `repository`: The repository name (e.g., docker.io/library/alpine)\n\n**Output:**\n- List of tags for the repository\n\n### get_image_manifest\n\nGet the manifest for an OCI image.\n\n**Input:**\n- `image_ref`: The image reference (e.g., docker.io/library/alpine:latest)\n\n**Output:**\n- The image manifest\n\n### get_image_config\n\nGet the config for an OCI image.\n\n**Input:**\n- `image_ref`: The image reference (e.g., docker.io/library/alpine:latest)\n\n**Output:**\n- The image config\n\n## Usage\n\n### Running with ToolHive (Recommended)\n\nThe easiest way to run the OCI Registry MCP server is using [ToolHive](https://github.com/stacklok/toolhive), which provides secure, containerized deployment of MCP servers:\n\n```bash\n# Install ToolHive (if not already installed)\n# See: https://github.com/stacklok/toolhive#installation\n\n# Enable auto-discovery to automatically configure supported clients\nthv config auto-discovery true\n\n# Run the OCI Registry MCP server (packaged as 'oci-registry' in ToolHive)\nthv run oci-registry\n\n# List running servers\nthv list\n\n# Get detailed information about the server\nthv registry info oci-registry\n```\n\nThe server will be available to your MCP-compatible clients and can query OCI registries for image information.\n\n#### Authentication with ToolHive\n\nIf you need to access private registries, you can provide authentication credentials using ToolHive's secret management:\n\n```bash\n# For bearer token authentication\nthv secret set oci-token\n# Enter your bearer token when prompted\n\nthv run --secret oci-token,target=OCI_TOKEN oci-registry\n\n# For username/password authentication\nthv secret set oci-username\nthv secret set oci-password\n# Enter your credentials when prompted\n\nthv run --secret oci-username,target=OCI_USERNAME --secret oci-password,target=OCI_PASSWORD oci-registry\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.21 or later\n- Access to OCI registries\n\n### Authentication\n\nThe server supports the following authentication methods for accessing private OCI registries:\n\n1. **Bearer Token**: Set the following environment variable:\n   - `OCI_TOKEN`: Bearer token for registry authentication\n\n2. **Username and Password**: Set the following environment variables:\n   - `OCI_USERNAME`: Username for registry authentication\n   - `OCI_PASSWORD`: Password for registry authentication\n\n3. **Docker Config**: If no token or username/password is provided, the server will use the default Docker keychain, which reads credentials from `~/.docker/config.json`.\n\nExamples:\n```bash\n# Bearer token authentication\nexport OCI_TOKEN=mytoken\n\n# Username/password authentication\nexport OCI_USERNAME=myuser\nexport OCI_PASSWORD=mypassword\n```\n\n### Port Configuration\n\nThe server can be configured to listen on a specific port using either:\n\n1. **Environment Variable**:\n   - `MCP_PORT`: The port number to listen on (must be between 0 and 65535)\n   - If not set or invalid, defaults to port 8080\n\n2. **Command-line Flag**:\n   - `-port`: Overrides the environment variable setting (must be between 0 and 65535)\n   - If invalid port provided it defaults to port 8080\n   - Example: `./ocireg-mcp -port 9090`\n\n\n### Testing\n\n```bash\ngo test ./...\n```\n\n### Linting\n\n```bash\ngolangci-lint run\n\n## Contributing\n\nWe welcome contributions to this MCP server! If you'd like to contribute, please review\nthe [CONTRIBUTING guide](./CONTRIBUTING.md) for details on how to get started.\n\nIf you run into a bug or have a feature request, please\n[open an issue](https://github.com/StacklokLabs/ocireg-mcp/issues) in the\nrepository or join us in the `#mcp-servers` channel on our\n[community Discord server](https://discord.gg/stacklok).\n\n## License\n\nThis project is licensed under the Apache v2 License - see the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Focireg-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackloklabs%2Focireg-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Focireg-mcp/lists"}