@@ -128,6 +128,7 @@ def build_context(
128128 license_key : str ,
129129 author_name : str ,
130130 author_email : str ,
131+ deployed_service : bool = False ,
131132) -> dict [str , Any ]:
132133 standards_version = read_standards_version ()
133134 meta_major , meta_minor , meta_patch = read_meta_version ()
@@ -153,6 +154,7 @@ def build_context(
153154 "meta_patch" : meta_patch ,
154155 "meta_version" : f"{ meta_major } .{ meta_minor } .{ meta_patch } " ,
155156 "year" : datetime .datetime .now (datetime .timezone .utc ).year ,
157+ "deployed_service" : deployed_service ,
156158 }
157159
158160
@@ -191,7 +193,15 @@ def _render_repo(output_dir: Path, ctx: dict, *, verbose: bool) -> None:
191193 # plus the two optional-for-both workflows (pages, label-sync). mcp-server
192194 # repos do NOT get cursor-plugin-specific validate.yml / release.yml.
193195 if repo_type == "mcp-server" :
194- write_file (output_dir , ".github/workflows/publish.yml" , render_template (env , "publish.yml.j2" , ctx ), verbose = verbose )
196+ if ctx .get ("deployed_service" ):
197+ write_file (
198+ output_dir ,
199+ ".drift-check.json" ,
200+ json .dumps ({"archetype" : "deployed-service" }, indent = 2 ) + "\n " ,
201+ verbose = verbose ,
202+ )
203+ else :
204+ write_file (output_dir , ".github/workflows/publish.yml" , render_template (env , "publish.yml.j2" , ctx ), verbose = verbose )
195205 write_file (output_dir , ".github/workflows/ci.yml" , render_template (env , "ci.yml.j2" , ctx ), verbose = verbose )
196206 write_file (output_dir , ".github/workflows/release.yml" , render_template (env , "release.mcp.yml.j2" , ctx ), verbose = verbose )
197207 write_file (output_dir , ".github/workflows/pages.yml" , render_template (env , "pages.mcp.yml.j2" , ctx ), verbose = verbose )
@@ -279,6 +289,7 @@ def build_registry_entry(
279289 skill_count : int ,
280290 rule_count : int ,
281291 license_key : str ,
292+ deployed_service : bool = False ,
282293) -> dict [str , Any ]:
283294 """Build a schema-valid registry.json entry for a generated repo.
284295
@@ -287,7 +298,7 @@ def build_registry_entry(
287298 a fresh repo has no MCP tools yet so ``mcpTools`` is 0.
288299 """
289300 homepage = f"https://{ REPO_OWNER .lower ()} .github.io/{ slug } /"
290- return {
301+ entry : dict [ str , Any ] = {
291302 "name" : name ,
292303 "repo" : f"{ REPO_OWNER } /{ slug } " ,
293304 "slug" : slug ,
@@ -305,6 +316,12 @@ def build_registry_entry(
305316 "pagesType" : "static" ,
306317 "hasCI" : True ,
307318 }
319+ if repo_type == "mcp-server" :
320+ if deployed_service :
321+ entry ["archetype" ] = "deployed-service"
322+ else :
323+ entry ["npm" ] = f"@tmhs/{ slug } "
324+ return entry
308325
309326
310327def register_in_registry (
@@ -375,6 +392,7 @@ def generate_repo(
375392 register : bool = True ,
376393 registry_root : Optional [Path ] = None ,
377394 verbose : bool = True ,
395+ deployed_service : bool = False ,
378396) -> Path :
379397 """Render a complete, standards-compliant repo and (by default) register
380398 it in the meta catalog. Returns the path to the generated repo.
@@ -385,6 +403,8 @@ def generate_repo(
385403 """
386404 if repo_type not in ("cursor-plugin" , "mcp-server" ):
387405 raise ScaffoldError (f"unknown repo type: { repo_type !r} " )
406+ if deployed_service and repo_type != "mcp-server" :
407+ raise ScaffoldError ("--deployed-service requires --type mcp-server" )
388408 if license_key not in LICENSE_FILES :
389409 raise ScaffoldError (f"unknown license: { license_key !r} " )
390410
@@ -410,6 +430,7 @@ def generate_repo(
410430 license_key = license_key ,
411431 author_name = author_name ,
412432 author_email = author_email ,
433+ deployed_service = deployed_service ,
413434 )
414435
415436 if verbose :
@@ -432,6 +453,7 @@ def generate_repo(
432453 skill_count = len (skill_names ),
433454 rule_count = len (rule_names ),
434455 license_key = license_key ,
456+ deployed_service = deployed_service ,
435457 )
436458 register_in_registry (Path (root ), entry , run_sync = True , verbose = verbose )
437459
0 commit comments