dockerhub-api 1.3.4__tar.gz → 1.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dockerhub_api-1.3.4/dockerhub_api.egg-info → dockerhub_api-1.3.6}/PKG-INFO +3 -9
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/README.md +0 -2
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/__init__.py +33 -0
- dockerhub_api-1.3.6/dockerhub_api/__main__.py +4 -0
- dockerhub_api-1.3.6/dockerhub_api/connector_sources.py +116 -0
- dockerhub_api-1.3.6/dockerhub_api/mcp_server.py +44 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/certification.json +6 -6
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/mappings/source.yaml +1 -1
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6/dockerhub_api.egg-info}/PKG-INFO +3 -9
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api.egg-info/SOURCES.txt +0 -6
- dockerhub_api-1.3.6/dockerhub_api.egg-info/entry_points.txt +5 -0
- dockerhub_api-1.3.6/dockerhub_api.egg-info/requires.txt +9 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/pyproject.toml +14 -14
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_dockerhub_mcp_validation.py +2 -2
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_fleet_name.py +1 -1
- dockerhub_api-1.3.4/MANIFEST.in +0 -4
- dockerhub_api-1.3.4/dockerhub_api/__main__.py +0 -4
- dockerhub_api-1.3.4/dockerhub_api/connector_sources.py +0 -192
- dockerhub_api-1.3.4/dockerhub_api/connectors/__init__.py +0 -0
- dockerhub_api-1.3.4/dockerhub_api/mcp_server.py +0 -121
- dockerhub_api-1.3.4/dockerhub_api/prompts/__init__.py +0 -0
- dockerhub_api-1.3.4/dockerhub_api/skills/__init__.py +0 -0
- dockerhub_api-1.3.4/dockerhub_api.egg-info/entry_points.txt +0 -11
- dockerhub_api-1.3.4/dockerhub_api.egg-info/requires.txt +0 -15
- dockerhub_api-1.3.4/requirements.txt +0 -3
- dockerhub_api-1.3.4/tests/test_default_content_surfaces.py +0 -43
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/LICENSE +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/__init__.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_access_tokens.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_audit_logs.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_auth.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_base.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_groups.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_org_access_tokens.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_orgs.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_registry.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_registry_base.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_repositories.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_scim.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_scout.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api_client.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/auth.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/dockerhub_input_models.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/dockerhub_response_models.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/kg_ingest.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/__init__.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_admin.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_audit.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_auth.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_kg.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_org.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_registry.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_repos.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_scim.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_scout.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp/mcp_teams.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/mcp_config.json +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/__init__.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/dockerhub.ttl +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/fixtures/records.json +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/migrations/manifest.json +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/shapes/connector.shacl.ttl +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-api-operations/SKILL.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-api-operations/agents/openai.yaml +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-api-operations/references/catalog.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-image-registry-scout/SKILL.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-image-registry-scout/WORKFLOW.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-org-administration/SKILL.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-org-administration/WORKFLOW.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-repository-management/SKILL.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-repository-management/WORKFLOW.md +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api.egg-info/dependency_links.txt +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api.egg-info/top_level.txt +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/setup.cfg +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_audit.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_org.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_registry.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_repositories.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_scim.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_scout.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_teams.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_tokens.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_api_wrapper.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_auth.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_dockerhub_a2a_validation.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_identity_namespace_scoping.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_init_dynamics.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_kg_ingest.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_models.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_rate_limit.py +0 -0
- {dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/tests/test_startup.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dockerhub-api
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Docker Hub API + MCP Server
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -12,13 +12,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
15
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
|
|
16
16
|
Requires-Dist: httpx>=0.28.1
|
|
17
17
|
Requires-Dist: python-dotenv>=1.2.4
|
|
18
|
-
Provides-Extra: mcp
|
|
19
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
|
|
20
|
-
Provides-Extra: all
|
|
21
|
-
Requires-Dist: dockerhub-api[mcp]>=1.0.1; extra == "all"
|
|
22
18
|
Provides-Extra: test
|
|
23
19
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
24
20
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -41,8 +37,6 @@ Dynamic: license-file
|
|
|
41
37
|

|
|
42
38
|

|
|
43
39
|
|
|
44
|
-
*Version: 1.3.4*
|
|
45
|
-
|
|
46
40
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
47
41
|
> Docker Hub platform are maintained in [docs/](docs/index.md).
|
|
48
42
|
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|

|
|
14
14
|

|
|
15
15
|
|
|
16
|
-
*Version: 1.3.4*
|
|
17
|
-
|
|
18
16
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
19
17
|
> Docker Hub platform are maintained in [docs/](docs/index.md).
|
|
20
18
|
|
|
@@ -98,3 +98,36 @@ def __getattr__(name: str) -> Any:
|
|
|
98
98
|
|
|
99
99
|
def __dir__() -> list[str]:
|
|
100
100
|
return sorted(list(globals().keys()) + __all__)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
from agent_connector_sdk.connector import Connector
|
|
104
|
+
|
|
105
|
+
from dockerhub_api.api.api_client_registry import RegistryApi
|
|
106
|
+
from dockerhub_api.api.api_client_scout import ScoutApi
|
|
107
|
+
from dockerhub_api.api_client import Api
|
|
108
|
+
from dockerhub_api.mcp import (
|
|
109
|
+
get_hub_client,
|
|
110
|
+
get_registry_client,
|
|
111
|
+
get_scout_client,
|
|
112
|
+
redact_secrets,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
connector = Connector(
|
|
116
|
+
api=Api,
|
|
117
|
+
get_client=get_hub_client,
|
|
118
|
+
tools="dockerhub_api.mcp_server",
|
|
119
|
+
instructions="Docker Hub API MCP Server - Manage repositories, tags, access tokens, organizations, teams, audit logs, and SCIM provisioning; plus Registry v2 image operations (manifests, blobs, digests, multi-arch inspect, OCI referrers, gated push/delete) and Docker Scout CVE/SBOM/policy intelligence.",
|
|
120
|
+
verbose_targets=(
|
|
121
|
+
{
|
|
122
|
+
"client_cls": RegistryApi,
|
|
123
|
+
"get_client": get_registry_client,
|
|
124
|
+
"prefix": "dockerhub_registry",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"client_cls": ScoutApi,
|
|
128
|
+
"get_client": get_scout_client,
|
|
129
|
+
"prefix": "dockerhub_scout",
|
|
130
|
+
},
|
|
131
|
+
),
|
|
132
|
+
result_coercer=redact_secrets,
|
|
133
|
+
)
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"""Data sources of this connector, declared by tool name (generated by connector-ontology-map migrate).
|
|
2
|
+
|
|
3
|
+
Served live as ``connector://resources``. Regenerate by editing the declarations, not the tools.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from agent_connector_sdk.ingest.live_declaration import source_meta
|
|
10
|
+
|
|
11
|
+
SOURCES = (
|
|
12
|
+
source_meta(
|
|
13
|
+
tool="dockerhub_get_repositories",
|
|
14
|
+
source_id="dockerhub-repositories",
|
|
15
|
+
record_type="Repository",
|
|
16
|
+
id_field="name",
|
|
17
|
+
cursor_field="last_updated",
|
|
18
|
+
page_param="page",
|
|
19
|
+
page_size_param="page_size",
|
|
20
|
+
pagination="page",
|
|
21
|
+
preset={
|
|
22
|
+
"doc_type": "repository",
|
|
23
|
+
"page_kind": "number",
|
|
24
|
+
"params_style": "args",
|
|
25
|
+
},
|
|
26
|
+
records_path="data.results",
|
|
27
|
+
server="dockerhub-mcp",
|
|
28
|
+
text_field="description",
|
|
29
|
+
title_field="name",
|
|
30
|
+
),
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
SCHEMA_VERSION = 2
|
|
34
|
+
|
|
35
|
+
FIELD_SETS = {
|
|
36
|
+
"fields_1": {
|
|
37
|
+
"architecture": "xsd:string",
|
|
38
|
+
"digest": "xsd:string",
|
|
39
|
+
"imageSize": "xsd:integer",
|
|
40
|
+
"isPrivate": "xsd:boolean",
|
|
41
|
+
"lastPushed": "xsd:string",
|
|
42
|
+
"permission": "xsd:string",
|
|
43
|
+
"pullCount": "xsd:integer",
|
|
44
|
+
"scopes": "xsd:string",
|
|
45
|
+
"starCount": "xsd:integer",
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
SCHEMA_MAPPINGS = {
|
|
50
|
+
"AccessToken": {
|
|
51
|
+
"field_sets": ["fields_1"],
|
|
52
|
+
"ontology_class": None,
|
|
53
|
+
},
|
|
54
|
+
"ContainerImage": {
|
|
55
|
+
"field_sets": ["fields_1"],
|
|
56
|
+
"ontology_class": None,
|
|
57
|
+
},
|
|
58
|
+
"Namespace": {
|
|
59
|
+
"field_sets": ["fields_1"],
|
|
60
|
+
"ontology_class": None,
|
|
61
|
+
},
|
|
62
|
+
"Organization": {
|
|
63
|
+
"field_sets": ["fields_1"],
|
|
64
|
+
"ontology_class": "Namespace",
|
|
65
|
+
},
|
|
66
|
+
"Repository": {
|
|
67
|
+
"field_sets": ["fields_1"],
|
|
68
|
+
"ontology_class": "SoftwareProject",
|
|
69
|
+
},
|
|
70
|
+
"Team": {
|
|
71
|
+
"field_sets": ["fields_1"],
|
|
72
|
+
"ontology_class": "Team",
|
|
73
|
+
},
|
|
74
|
+
"Vulnerability": {
|
|
75
|
+
"field_sets": ["fields_1"],
|
|
76
|
+
"ontology_class": None,
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
RESOURCES = (
|
|
81
|
+
{
|
|
82
|
+
"id_prefix": "accesstoken",
|
|
83
|
+
"label": "Access Token",
|
|
84
|
+
"name": "AccessToken",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id_prefix": "containerimage",
|
|
88
|
+
"label": "Container Image",
|
|
89
|
+
"name": "ContainerImage",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id_prefix": "namespace",
|
|
93
|
+
"label": "Docker Hub Namespace",
|
|
94
|
+
"name": "Namespace",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id_prefix": "organization",
|
|
98
|
+
"label": "Docker Hub Organization",
|
|
99
|
+
"name": "Organization",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id_prefix": "repository",
|
|
103
|
+
"label": "Container Repository",
|
|
104
|
+
"name": "Repository",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id_prefix": "team",
|
|
108
|
+
"label": "Team",
|
|
109
|
+
"name": "Team",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id_prefix": "vulnerability",
|
|
113
|
+
"label": "Vulnerability",
|
|
114
|
+
"name": "Vulnerability",
|
|
115
|
+
},
|
|
116
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
"""Docker Hub MCP server entry point.
|
|
3
|
+
|
|
4
|
+
CONCEPT:DH-OS.audit.action-routed-mcp-surface — action-routed MCP surface. Registers the consolidated,
|
|
5
|
+
togglable tool modules (hub_auth, hub_repos, hub_org, hub_teams, hub_audit,
|
|
6
|
+
hub_scim, hub_admin, hub_registry, hub_scout) on an agent-connector-sdk FastMCP
|
|
7
|
+
server.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import warnings
|
|
11
|
+
|
|
12
|
+
with warnings.catch_warnings():
|
|
13
|
+
warnings.simplefilter("ignore")
|
|
14
|
+
|
|
15
|
+
warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
|
|
16
|
+
warnings.filterwarnings("ignore", message=".*urllib3.*or charset_normalizer.*")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
from dockerhub_api.mcp import (
|
|
20
|
+
register_admin_tools,
|
|
21
|
+
register_audit_tools,
|
|
22
|
+
register_auth_tools,
|
|
23
|
+
register_kg_tools,
|
|
24
|
+
register_org_tools,
|
|
25
|
+
register_registry_tools,
|
|
26
|
+
register_repos_tools,
|
|
27
|
+
register_scim_tools,
|
|
28
|
+
register_scout_tools,
|
|
29
|
+
register_teams_tools,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# SDK discovery registers the register_<tag>_tools functions bound in this module.
|
|
33
|
+
__all__ = [
|
|
34
|
+
"register_admin_tools",
|
|
35
|
+
"register_audit_tools",
|
|
36
|
+
"register_auth_tools",
|
|
37
|
+
"register_kg_tools",
|
|
38
|
+
"register_org_tools",
|
|
39
|
+
"register_registry_tools",
|
|
40
|
+
"register_repos_tools",
|
|
41
|
+
"register_scim_tools",
|
|
42
|
+
"register_scout_tools",
|
|
43
|
+
"register_teams_tools",
|
|
44
|
+
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"api_version": "
|
|
2
|
+
"api_version": "graphos.io/v1",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"dockerhub_api/ontology/dockerhub.ttl": "
|
|
4
|
+
"dockerhub_api/ontology/dockerhub.ttl": "263d36a1d975b161eb0e479310dc8fe5ac7c6f8977a053479d8e70707af0d858",
|
|
5
5
|
"dockerhub_api/ontology/fixtures/records.json": "cdf24bdcd53b75daef789c05f93d55ced4ce4a138360a2ff9f1e34c55f8f6da8",
|
|
6
|
-
"dockerhub_api/ontology/mappings/source.yaml": "
|
|
6
|
+
"dockerhub_api/ontology/mappings/source.yaml": "84985121b0fe97a045b04a5c40183d434d3d7ca1bca29202080cb390955545a6",
|
|
7
7
|
"dockerhub_api/ontology/migrations/manifest.json": "81a24f182615e83dc844c6e7f3a211d47705d2bfce4ee45b5c4b24134e64909f",
|
|
8
8
|
"dockerhub_api/ontology/shapes/connector.shacl.ttl": "d42f68bb302d9a9e48fb3687b106416583661c5ac07c8aa7f35ed1622dcdae76"
|
|
9
9
|
},
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"synthetic_fixture_contract": "passed"
|
|
16
16
|
},
|
|
17
17
|
"compatibility": {
|
|
18
|
-
"
|
|
18
|
+
"agent_utilities": ">=2.5.0,<3",
|
|
19
19
|
"bundle_schema": "2",
|
|
20
20
|
"epistemic_graph": ">=2.27.0,<3"
|
|
21
21
|
},
|
|
22
|
-
"connector": "dockerhub-
|
|
22
|
+
"connector": "dockerhub-api",
|
|
23
23
|
"kind": "ConnectorSourceAttestation",
|
|
24
24
|
"live_certified": false,
|
|
25
25
|
"mode": "offline-source",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"signer": "UNSIGNED-PREVIEW",
|
|
30
30
|
"signing_public_key": "",
|
|
31
31
|
"status": "source-validated",
|
|
32
|
-
"validated_at": "2026-
|
|
32
|
+
"validated_at": "2026-10-24T09:37:17Z"
|
|
33
33
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dockerhub-api
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Docker Hub API + MCP Server
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -12,13 +12,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
15
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
|
|
16
16
|
Requires-Dist: httpx>=0.28.1
|
|
17
17
|
Requires-Dist: python-dotenv>=1.2.4
|
|
18
|
-
Provides-Extra: mcp
|
|
19
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.4.1; extra == "mcp"
|
|
20
|
-
Provides-Extra: all
|
|
21
|
-
Requires-Dist: dockerhub-api[mcp]>=1.0.1; extra == "all"
|
|
22
18
|
Provides-Extra: test
|
|
23
19
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
24
20
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -41,8 +37,6 @@ Dynamic: license-file
|
|
|
41
37
|

|
|
42
38
|

|
|
43
39
|
|
|
44
|
-
*Version: 1.3.4*
|
|
45
|
-
|
|
46
40
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
47
41
|
> Docker Hub platform are maintained in [docs/](docs/index.md).
|
|
48
42
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
2
|
README.md
|
|
4
3
|
pyproject.toml
|
|
5
|
-
requirements.txt
|
|
6
4
|
dockerhub_api/__init__.py
|
|
7
5
|
dockerhub_api/__main__.py
|
|
8
6
|
dockerhub_api/api_client.py
|
|
@@ -32,7 +30,6 @@ dockerhub_api/api/api_client_registry_base.py
|
|
|
32
30
|
dockerhub_api/api/api_client_repositories.py
|
|
33
31
|
dockerhub_api/api/api_client_scim.py
|
|
34
32
|
dockerhub_api/api/api_client_scout.py
|
|
35
|
-
dockerhub_api/connectors/__init__.py
|
|
36
33
|
dockerhub_api/mcp/__init__.py
|
|
37
34
|
dockerhub_api/mcp/mcp_admin.py
|
|
38
35
|
dockerhub_api/mcp/mcp_audit.py
|
|
@@ -51,8 +48,6 @@ dockerhub_api/ontology/fixtures/records.json
|
|
|
51
48
|
dockerhub_api/ontology/mappings/source.yaml
|
|
52
49
|
dockerhub_api/ontology/migrations/manifest.json
|
|
53
50
|
dockerhub_api/ontology/shapes/connector.shacl.ttl
|
|
54
|
-
dockerhub_api/prompts/__init__.py
|
|
55
|
-
dockerhub_api/skills/__init__.py
|
|
56
51
|
dockerhub_api/skills/dockerhub-api-operations/SKILL.md
|
|
57
52
|
dockerhub_api/skills/dockerhub-api-operations/agents/openai.yaml
|
|
58
53
|
dockerhub_api/skills/dockerhub-api-operations/references/catalog.md
|
|
@@ -72,7 +67,6 @@ tests/test_api_teams.py
|
|
|
72
67
|
tests/test_api_tokens.py
|
|
73
68
|
tests/test_api_wrapper.py
|
|
74
69
|
tests/test_auth.py
|
|
75
|
-
tests/test_default_content_surfaces.py
|
|
76
70
|
tests/test_dockerhub_a2a_validation.py
|
|
77
71
|
tests/test_dockerhub_mcp_validation.py
|
|
78
72
|
tests/test_fleet_name.py
|
|
@@ -4,37 +4,29 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dockerhub-api"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.6"
|
|
8
8
|
description = "Docker Hub API + MCP Server"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
11
11
|
requires-python = ">=3.12, <3.15"
|
|
12
|
-
dependencies = [ "agent-connector-sdk[mcp]>=0.4
|
|
12
|
+
dependencies = [ "agent-connector-sdk[mcp]>=0.5.4,<0.6.0", "httpx>=0.28.1", "python-dotenv>=1.2.4",]
|
|
13
13
|
[[project.authors]]
|
|
14
|
-
name = "
|
|
15
|
-
email = "maintainers@
|
|
14
|
+
name = "Repository Maintainers"
|
|
15
|
+
email = "maintainers@knuckles.team"
|
|
16
16
|
|
|
17
17
|
[project.license]
|
|
18
18
|
text = "MIT"
|
|
19
19
|
|
|
20
20
|
[project.optional-dependencies]
|
|
21
|
-
mcp = [ "agent-connector-sdk[mcp]>=0.4.1,<1.0.0",]
|
|
22
|
-
all = [ "dockerhub-api[mcp]>=1.0.1",]
|
|
23
21
|
test = [
|
|
24
22
|
"pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
|
|
25
23
|
|
|
26
24
|
[project.scripts]
|
|
27
|
-
dockerhub-mcp = "
|
|
28
|
-
|
|
29
|
-
[project.entry-points."agent_connector_sdk.skill_providers"]
|
|
30
|
-
dockerhub-api = "dockerhub_api.skills"
|
|
31
|
-
|
|
32
|
-
[project.entry-points."agent_connector_sdk.ontology_providers"]
|
|
33
|
-
dockerhub-api = "dockerhub_api.ontology"
|
|
25
|
+
dockerhub-mcp = "agent_connector_sdk.cli:serve"
|
|
34
26
|
|
|
35
27
|
# The one declared connector identity: the fleet name (SDK-CONNECTOR-CONTROL-R071).
|
|
36
28
|
[project.entry-points."agent_connector_sdk.connector"]
|
|
37
|
-
dockerhub-mcp = "dockerhub_api"
|
|
29
|
+
dockerhub-mcp = "dockerhub_api:connector"
|
|
38
30
|
|
|
39
31
|
[tool.uv.workspace]
|
|
40
32
|
members = ["."]
|
|
@@ -48,6 +40,7 @@ override-dependencies = [
|
|
|
48
40
|
]
|
|
49
41
|
|
|
50
42
|
[tool.ruff]
|
|
43
|
+
extend-exclude = ["tests", "scripts"]
|
|
51
44
|
line-length = 88
|
|
52
45
|
target-version = "py312"
|
|
53
46
|
|
|
@@ -77,3 +70,10 @@ ignore_names = ["request", "config", "cls", "exc_info"]
|
|
|
77
70
|
|
|
78
71
|
[tool.pipelines_hooks.ste]
|
|
79
72
|
exempt = ["specs/*", "specs/**/*"]
|
|
73
|
+
|
|
74
|
+
[tool.pipelines.container]
|
|
75
|
+
debug_apt = ["default-jre", "ripgrep", "tree", "fd-find", "curl", "nano", "build-essential", "cmake", "libssl-dev", "libcurl4-openssl-dev", "pkg-config", "cargo", "rustc"]
|
|
76
|
+
install_extras = {"mcp" = []}
|
|
77
|
+
|
|
78
|
+
[tool.pipelines.codespell]
|
|
79
|
+
ignore_words = ["nd"]
|
|
@@ -50,9 +50,9 @@ def mcp_instance(hub, registry, scout, monkeypatch):
|
|
|
50
50
|
hub_auth_module, "get_scout_client", lambda **_k: make_scout_api(scout)
|
|
51
51
|
)
|
|
52
52
|
monkeypatch.setattr(sys, "argv", ["dockerhub-mcp"])
|
|
53
|
-
from
|
|
53
|
+
from agent_connector_sdk.connector import build_server
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
_, mcp = build_server("dockerhub_api", command_args=[])
|
|
56
56
|
return mcp
|
|
57
57
|
|
|
58
58
|
|
|
@@ -35,7 +35,7 @@ def _call_connectors(path: Path) -> list[str]:
|
|
|
35
35
|
def test_connector_name_is_the_fleet_name() -> None:
|
|
36
36
|
pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
|
|
37
37
|
assert pyproject["project"]["entry-points"]["agent_connector_sdk.connector"] == {
|
|
38
|
-
FLEET: "dockerhub_api"
|
|
38
|
+
FLEET: "dockerhub_api:connector"
|
|
39
39
|
}
|
|
40
40
|
assert connector_name("dockerhub_api") == FLEET
|
|
41
41
|
for module in sorted(PACKAGE.glob("*.py")):
|
dockerhub_api-1.3.4/MANIFEST.in
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"""Data sources of this connector, declared by tool name (generated by connector-ontology-map migrate).
|
|
2
|
-
|
|
3
|
-
Served live as ``connector://resources``. Regenerate by editing the declarations, not the tools.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
# ruff: noqa: E501
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
from agent_connector_sdk.ingest.live_declaration import source_meta
|
|
10
|
-
from agent_connector_sdk.ingest.sources import IngestSourceDeclaration, IngestSourceSpec
|
|
11
|
-
|
|
12
|
-
CONNECTOR = "dockerhub-mcp"
|
|
13
|
-
|
|
14
|
-
SOURCES = (
|
|
15
|
-
source_meta(
|
|
16
|
-
tool="dockerhub_get_repositories",
|
|
17
|
-
source_id="dockerhub-repositories",
|
|
18
|
-
record_type="Repository",
|
|
19
|
-
id_field="name",
|
|
20
|
-
cursor_field="last_updated",
|
|
21
|
-
page_param="page",
|
|
22
|
-
page_size_param="page_size",
|
|
23
|
-
pagination="page",
|
|
24
|
-
preset={
|
|
25
|
-
"doc_type": "repository",
|
|
26
|
-
"page_kind": "number",
|
|
27
|
-
"params_style": "args",
|
|
28
|
-
},
|
|
29
|
-
records_path="data.results",
|
|
30
|
-
server="dockerhub-mcp",
|
|
31
|
-
text_field="description",
|
|
32
|
-
title_field="name",
|
|
33
|
-
),
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
SCHEMA_MAPPINGS = {
|
|
37
|
-
"AccessToken": {
|
|
38
|
-
"fields": {
|
|
39
|
-
"architecture": "xsd:string",
|
|
40
|
-
"digest": "xsd:string",
|
|
41
|
-
"imageSize": "xsd:integer",
|
|
42
|
-
"isPrivate": "xsd:boolean",
|
|
43
|
-
"lastPushed": "xsd:string",
|
|
44
|
-
"permission": "xsd:string",
|
|
45
|
-
"pullCount": "xsd:integer",
|
|
46
|
-
"scopes": "xsd:string",
|
|
47
|
-
"starCount": "xsd:integer",
|
|
48
|
-
},
|
|
49
|
-
"ontology_class": None,
|
|
50
|
-
},
|
|
51
|
-
"ContainerImage": {
|
|
52
|
-
"fields": {
|
|
53
|
-
"architecture": "xsd:string",
|
|
54
|
-
"digest": "xsd:string",
|
|
55
|
-
"imageSize": "xsd:integer",
|
|
56
|
-
"isPrivate": "xsd:boolean",
|
|
57
|
-
"lastPushed": "xsd:string",
|
|
58
|
-
"permission": "xsd:string",
|
|
59
|
-
"pullCount": "xsd:integer",
|
|
60
|
-
"scopes": "xsd:string",
|
|
61
|
-
"starCount": "xsd:integer",
|
|
62
|
-
},
|
|
63
|
-
"ontology_class": None,
|
|
64
|
-
},
|
|
65
|
-
"Namespace": {
|
|
66
|
-
"fields": {
|
|
67
|
-
"architecture": "xsd:string",
|
|
68
|
-
"digest": "xsd:string",
|
|
69
|
-
"imageSize": "xsd:integer",
|
|
70
|
-
"isPrivate": "xsd:boolean",
|
|
71
|
-
"lastPushed": "xsd:string",
|
|
72
|
-
"permission": "xsd:string",
|
|
73
|
-
"pullCount": "xsd:integer",
|
|
74
|
-
"scopes": "xsd:string",
|
|
75
|
-
"starCount": "xsd:integer",
|
|
76
|
-
},
|
|
77
|
-
"ontology_class": None,
|
|
78
|
-
},
|
|
79
|
-
"Organization": {
|
|
80
|
-
"fields": {
|
|
81
|
-
"architecture": "xsd:string",
|
|
82
|
-
"digest": "xsd:string",
|
|
83
|
-
"imageSize": "xsd:integer",
|
|
84
|
-
"isPrivate": "xsd:boolean",
|
|
85
|
-
"lastPushed": "xsd:string",
|
|
86
|
-
"permission": "xsd:string",
|
|
87
|
-
"pullCount": "xsd:integer",
|
|
88
|
-
"scopes": "xsd:string",
|
|
89
|
-
"starCount": "xsd:integer",
|
|
90
|
-
},
|
|
91
|
-
"ontology_class": "Namespace",
|
|
92
|
-
},
|
|
93
|
-
"Repository": {
|
|
94
|
-
"fields": {
|
|
95
|
-
"architecture": "xsd:string",
|
|
96
|
-
"digest": "xsd:string",
|
|
97
|
-
"imageSize": "xsd:integer",
|
|
98
|
-
"isPrivate": "xsd:boolean",
|
|
99
|
-
"lastPushed": "xsd:string",
|
|
100
|
-
"permission": "xsd:string",
|
|
101
|
-
"pullCount": "xsd:integer",
|
|
102
|
-
"scopes": "xsd:string",
|
|
103
|
-
"starCount": "xsd:integer",
|
|
104
|
-
},
|
|
105
|
-
"ontology_class": "SoftwareProject",
|
|
106
|
-
},
|
|
107
|
-
"Team": {
|
|
108
|
-
"fields": {
|
|
109
|
-
"architecture": "xsd:string",
|
|
110
|
-
"digest": "xsd:string",
|
|
111
|
-
"imageSize": "xsd:integer",
|
|
112
|
-
"isPrivate": "xsd:boolean",
|
|
113
|
-
"lastPushed": "xsd:string",
|
|
114
|
-
"permission": "xsd:string",
|
|
115
|
-
"pullCount": "xsd:integer",
|
|
116
|
-
"scopes": "xsd:string",
|
|
117
|
-
"starCount": "xsd:integer",
|
|
118
|
-
},
|
|
119
|
-
"ontology_class": "Team",
|
|
120
|
-
},
|
|
121
|
-
"Vulnerability": {
|
|
122
|
-
"fields": {
|
|
123
|
-
"architecture": "xsd:string",
|
|
124
|
-
"digest": "xsd:string",
|
|
125
|
-
"imageSize": "xsd:integer",
|
|
126
|
-
"isPrivate": "xsd:boolean",
|
|
127
|
-
"lastPushed": "xsd:string",
|
|
128
|
-
"permission": "xsd:string",
|
|
129
|
-
"pullCount": "xsd:integer",
|
|
130
|
-
"scopes": "xsd:string",
|
|
131
|
-
"starCount": "xsd:integer",
|
|
132
|
-
},
|
|
133
|
-
"ontology_class": None,
|
|
134
|
-
},
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
RESOURCES = (
|
|
138
|
-
{
|
|
139
|
-
"id_prefix": "accesstoken",
|
|
140
|
-
"label": "Access Token",
|
|
141
|
-
"name": "AccessToken",
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"id_prefix": "containerimage",
|
|
145
|
-
"label": "Container Image",
|
|
146
|
-
"name": "ContainerImage",
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"id_prefix": "namespace",
|
|
150
|
-
"label": "Docker Hub Namespace",
|
|
151
|
-
"name": "Namespace",
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"id_prefix": "organization",
|
|
155
|
-
"label": "Docker Hub Organization",
|
|
156
|
-
"name": "Organization",
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"id_prefix": "repository",
|
|
160
|
-
"label": "Container Repository",
|
|
161
|
-
"name": "Repository",
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"id_prefix": "team",
|
|
165
|
-
"label": "Team",
|
|
166
|
-
"name": "Team",
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"id_prefix": "vulnerability",
|
|
170
|
-
"label": "Vulnerability",
|
|
171
|
-
"name": "Vulnerability",
|
|
172
|
-
},
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
def declaration() -> IngestSourceDeclaration:
|
|
177
|
-
"""The declaration the server assembles from this module."""
|
|
178
|
-
specs = []
|
|
179
|
-
for item in SOURCES:
|
|
180
|
-
for entry in item["connector_sources"]:
|
|
181
|
-
body = {k: v for k, v in entry.items() if k not in ("tool", "mapping")}
|
|
182
|
-
specs.append(
|
|
183
|
-
IngestSourceSpec.model_validate({**body, "tools": (entry["tool"],)})
|
|
184
|
-
)
|
|
185
|
-
return IngestSourceDeclaration.model_validate(
|
|
186
|
-
{
|
|
187
|
-
"connector": CONNECTOR,
|
|
188
|
-
"sources": specs,
|
|
189
|
-
"schema_mappings": SCHEMA_MAPPINGS,
|
|
190
|
-
"resources": RESOURCES,
|
|
191
|
-
}
|
|
192
|
-
)
|
|
File without changes
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python
|
|
2
|
-
"""Docker Hub MCP server entry point.
|
|
3
|
-
|
|
4
|
-
CONCEPT:DH-OS.audit.action-routed-mcp-surface — action-routed MCP surface. Registers the consolidated,
|
|
5
|
-
togglable tool modules (hub_auth, hub_repos, hub_org, hub_teams, hub_audit,
|
|
6
|
-
hub_scim, hub_admin, hub_registry, hub_scout) on an agent-connector-sdk FastMCP
|
|
7
|
-
server.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
import warnings
|
|
11
|
-
|
|
12
|
-
with warnings.catch_warnings():
|
|
13
|
-
warnings.simplefilter("ignore")
|
|
14
|
-
|
|
15
|
-
warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
|
|
16
|
-
warnings.filterwarnings("ignore", message=".*urllib3.*or charset_normalizer.*")
|
|
17
|
-
|
|
18
|
-
import logging
|
|
19
|
-
import os
|
|
20
|
-
import sys
|
|
21
|
-
from typing import Any
|
|
22
|
-
|
|
23
|
-
from agent_connector_sdk.config import load_config
|
|
24
|
-
from agent_connector_sdk.mcp.server import create_mcp_server
|
|
25
|
-
from agent_connector_sdk.mcp.tool_surface import register_tool_surface
|
|
26
|
-
from fastmcp.utilities.logging import get_logger
|
|
27
|
-
|
|
28
|
-
from dockerhub_api.api.api_client_registry import RegistryApi
|
|
29
|
-
from dockerhub_api.api.api_client_scout import ScoutApi
|
|
30
|
-
from dockerhub_api.api_client import Api
|
|
31
|
-
from dockerhub_api.mcp import (
|
|
32
|
-
get_hub_client,
|
|
33
|
-
get_registry_client,
|
|
34
|
-
get_scout_client,
|
|
35
|
-
redact_secrets,
|
|
36
|
-
register_admin_tools, # noqa: F401
|
|
37
|
-
register_audit_tools, # noqa: F401
|
|
38
|
-
register_auth_tools, # noqa: F401
|
|
39
|
-
register_kg_tools, # noqa: F401
|
|
40
|
-
register_org_tools, # noqa: F401
|
|
41
|
-
register_registry_tools, # noqa: F401
|
|
42
|
-
register_repos_tools, # noqa: F401
|
|
43
|
-
register_scim_tools, # noqa: F401
|
|
44
|
-
register_scout_tools, # noqa: F401
|
|
45
|
-
register_teams_tools, # noqa: F401
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
__version__ = "1.3.4"
|
|
49
|
-
print(f"Docker Hub MCP v{__version__}", file=sys.stderr)
|
|
50
|
-
|
|
51
|
-
logger = get_logger(name="mcp_server")
|
|
52
|
-
logger.setLevel(logging.DEBUG)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def get_mcp_instance() -> tuple[Any, Any, Any, Any]:
|
|
56
|
-
"""Initialize and return the Docker Hub MCP instance, args, and middlewares."""
|
|
57
|
-
load_config()
|
|
58
|
-
os.environ["FASTMCP_LOG_LEVEL"] = "ERROR"
|
|
59
|
-
os.environ["TERM"] = "dumb"
|
|
60
|
-
os.environ["NO_COLOR"] = "1"
|
|
61
|
-
|
|
62
|
-
args, mcp, middlewares = create_mcp_server(
|
|
63
|
-
name="DockerHub",
|
|
64
|
-
version=__version__,
|
|
65
|
-
instructions=(
|
|
66
|
-
"Docker Hub API MCP Server - Manage repositories, tags, access "
|
|
67
|
-
"tokens, organizations, teams, audit logs, and SCIM provisioning; "
|
|
68
|
-
"plus Registry v2 image operations (manifests, blobs, digests, "
|
|
69
|
-
"multi-arch inspect, OCI referrers, gated push/delete) and Docker "
|
|
70
|
-
"Scout CVE/SBOM/policy intelligence."
|
|
71
|
-
),
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
registered_tags = register_tool_surface(
|
|
75
|
-
mcp,
|
|
76
|
-
client_cls=Api,
|
|
77
|
-
get_client=get_hub_client,
|
|
78
|
-
service="dockerhub-api",
|
|
79
|
-
tools_module=sys.modules[__name__],
|
|
80
|
-
verbose_targets=[
|
|
81
|
-
{
|
|
82
|
-
"client_cls": RegistryApi,
|
|
83
|
-
"get_client": get_registry_client,
|
|
84
|
-
"prefix": "dockerhub_registry",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"client_cls": ScoutApi,
|
|
88
|
-
"get_client": get_scout_client,
|
|
89
|
-
"prefix": "dockerhub_scout",
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
result_coercer=redact_secrets,
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
for mw in middlewares:
|
|
96
|
-
mcp.add_middleware(mw)
|
|
97
|
-
|
|
98
|
-
return mcp, args, middlewares, registered_tags
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def mcp_server() -> None:
|
|
102
|
-
mcp, args, middlewares, registered_tags = get_mcp_instance()
|
|
103
|
-
print(f"{'dockerhub-api'} MCP v{__version__}", file=sys.stderr)
|
|
104
|
-
print("\nStarting MCP Server", file=sys.stderr)
|
|
105
|
-
print(f" Transport: {args.transport.upper()}", file=sys.stderr)
|
|
106
|
-
print(f" Auth: {args.auth_type}", file=sys.stderr)
|
|
107
|
-
print(f" Dynamic Tags Loaded: {len(set(registered_tags))}", file=sys.stderr)
|
|
108
|
-
|
|
109
|
-
if args.transport == "stdio":
|
|
110
|
-
mcp.run(transport="stdio")
|
|
111
|
-
elif args.transport == "streamable-http":
|
|
112
|
-
mcp.run(transport="streamable-http", host=args.host, port=args.port)
|
|
113
|
-
elif args.transport == "sse":
|
|
114
|
-
mcp.run(transport="sse", host=args.host, port=args.port)
|
|
115
|
-
else:
|
|
116
|
-
logger.error("Invalid transport", extra={"transport": args.transport})
|
|
117
|
-
sys.exit(1)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if __name__ == "__main__":
|
|
121
|
-
mcp_server()
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[agent_connector_sdk.connector]
|
|
2
|
-
dockerhub-mcp = dockerhub_api
|
|
3
|
-
|
|
4
|
-
[agent_connector_sdk.ontology_providers]
|
|
5
|
-
dockerhub-api = dockerhub_api.ontology
|
|
6
|
-
|
|
7
|
-
[agent_connector_sdk.skill_providers]
|
|
8
|
-
dockerhub-api = dockerhub_api.skills
|
|
9
|
-
|
|
10
|
-
[console_scripts]
|
|
11
|
-
dockerhub-mcp = dockerhub_api.mcp_server:mcp_server
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
agent-connector-sdk[mcp]<1.0.0,>=0.4.1
|
|
2
|
-
httpx>=0.28.1
|
|
3
|
-
python-dotenv>=1.2.4
|
|
4
|
-
|
|
5
|
-
[all]
|
|
6
|
-
dockerhub-api[mcp]>=1.0.1
|
|
7
|
-
|
|
8
|
-
[mcp]
|
|
9
|
-
agent-connector-sdk[mcp]<1.0.0,>=0.4.1
|
|
10
|
-
|
|
11
|
-
[test]
|
|
12
|
-
pytest-xdist>=3.8.0
|
|
13
|
-
pytest>=9.1.1
|
|
14
|
-
pytest-asyncio>=1.4.0
|
|
15
|
-
pytest-cov>=7.1.0
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"""CONN-DOCKERHUB-API-CONNECTOR-CONTENT-R001: the server lists its packaged skills, ontology and prompts by default."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import asyncio
|
|
6
|
-
import importlib
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
|
|
9
|
-
import pytest
|
|
10
|
-
from fastmcp import Client
|
|
11
|
-
|
|
12
|
-
PACKAGE = "dockerhub_api"
|
|
13
|
-
ROOT = Path(list(importlib.import_module(PACKAGE).__path__)[0])
|
|
14
|
-
|
|
15
|
-
pytestmark = pytest.mark.spec("CONN-DOCKERHUB-API-CONNECTOR-CONTENT-R001")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def _server():
|
|
19
|
-
namespace = {"__name__": PACKAGE + ".mcp_server"}
|
|
20
|
-
exec(
|
|
21
|
-
"from agent_connector_sdk.mcp.server import create_mcp_server\n"
|
|
22
|
-
"result = create_mcp_server('dockerhub-mcp', version='0', command_args=[])",
|
|
23
|
-
namespace,
|
|
24
|
-
)
|
|
25
|
-
return namespace["result"][1]
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
async def _listings():
|
|
29
|
-
async with Client(_server()) as client:
|
|
30
|
-
resources = {str(r.uri) for r in await client.list_resources()}
|
|
31
|
-
prompts = {p.name for p in await client.list_prompts()}
|
|
32
|
-
return resources, prompts
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def test_default_content_surfaces() -> None:
|
|
36
|
-
resources, prompts = asyncio.run(_listings())
|
|
37
|
-
if list(ROOT.glob("skills/*/SKILL.md")):
|
|
38
|
-
assert any(u.startswith("skill://") for u in resources)
|
|
39
|
-
if list(ROOT.glob("ontology/*.ttl")):
|
|
40
|
-
assert any(u.startswith("ontology://dockerhub-mcp/") for u in resources)
|
|
41
|
-
for path in ROOT.glob("prompts/*.json"):
|
|
42
|
-
if not path.name.startswith("_"):
|
|
43
|
-
assert path.stem in prompts
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/api/api_client_org_access_tokens.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/ontology/shapes/connector.shacl.ttl
RENAMED
|
File without changes
|
{dockerhub_api-1.3.4 → dockerhub_api-1.3.6}/dockerhub_api/skills/dockerhub-api-operations/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|