38a975ee57
Branch Policy Check / Verify merge target (pull_request) Successful in 0s
Remove VERSION: XX.YY.ZZ lines from 213 file headers across PHP, TypeScript, TF definitions, workflows, CSS, markdown, and XML files. Version is tracked in composer.json and CHANGELOG.md only. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
485 lines
19 KiB
Terraform
485 lines
19 KiB
Terraform
/**
|
|
* MCP Server Repository Structure Definition
|
|
* Standard repository structure for Model Context Protocol (MCP) server projects
|
|
*
|
|
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
* Schema Version: 1.0
|
|
*/
|
|
|
|
locals {
|
|
repository_structure = {
|
|
metadata = {
|
|
name = "MCP Server"
|
|
description = "Standard repository structure for Model Context Protocol (MCP) server projects — TypeScript/Node.js MCP servers that expose external APIs as AI assistant tools"
|
|
repository_type = "mcp-server"
|
|
platform = "mcp-server"
|
|
last_updated = "2026-05-07T00:00:00Z"
|
|
maintainer = "Moko Consulting"
|
|
version = "04.06.00"
|
|
schema_version = "1.0"
|
|
}
|
|
|
|
root_files = [
|
|
{
|
|
name = "README.md"
|
|
extension = "md"
|
|
description = "Project overview with tool reference table, install, and configuration"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-README.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "README.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-README.md"
|
|
},
|
|
{
|
|
name = "LICENSE"
|
|
extension = ""
|
|
description = "License file (GPL-3.0-or-later)"
|
|
requirement_status = "required"
|
|
audience = "general"
|
|
source_path = "templates/licenses"
|
|
source_filename = "GPL-3.0"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "LICENSE"
|
|
create_path = false
|
|
template = "templates/licenses/GPL-3.0"
|
|
},
|
|
{
|
|
name = "CHANGELOG.md"
|
|
extension = "md"
|
|
description = "Version history and changes"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-CHANGELOG.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CHANGELOG.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-CHANGELOG.md"
|
|
},
|
|
{
|
|
name = "CONTRIBUTING.md"
|
|
extension = "md"
|
|
description = "Contribution guidelines"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "contributor"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-CONTRIBUTING.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CONTRIBUTING.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-CONTRIBUTING.md"
|
|
},
|
|
{
|
|
name = "SECURITY.md"
|
|
extension = "md"
|
|
description = "Security policy and vulnerability reporting"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-SECURITY.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "SECURITY.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-SECURITY.md"
|
|
},
|
|
{
|
|
name = "CODE_OF_CONDUCT.md"
|
|
extension = "md"
|
|
description = "Community code of conduct"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "contributor"
|
|
source_path = "templates/docs/extra"
|
|
source_filename = "template-CODE_OF_CONDUCT.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CODE_OF_CONDUCT.md"
|
|
create_path = false
|
|
template = "templates/docs/extra/template-CODE_OF_CONDUCT.md"
|
|
},
|
|
{
|
|
name = "package.json"
|
|
extension = "json"
|
|
description = "Node.js project manifest — @mokoconsulting scoped, MCP SDK + Zod dependencies"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = "tsconfig.json"
|
|
extension = "json"
|
|
description = "TypeScript configuration — ES2022 target, Node16 module, strict mode"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = "config.example.json"
|
|
extension = "json"
|
|
description = "Example multi-connection configuration file"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
},
|
|
{
|
|
name = ".gitignore"
|
|
extension = "gitignore"
|
|
description = "Git ignore patterns"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = ".gitattributes"
|
|
extension = "gitattributes"
|
|
description = "Git attributes configuration"
|
|
requirement_status = "required"
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = ".gitmessage"
|
|
extension = "gitmessage"
|
|
description = "Conventional commit message template"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = "Makefile"
|
|
description = "Build automation — install, build, dev, clean, setup, start targets"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
}
|
|
]
|
|
|
|
directories = [
|
|
{
|
|
name = "src"
|
|
path = "src"
|
|
description = "TypeScript source code"
|
|
requirement_status = "required"
|
|
purpose = "Contains MCP server entry point, API client, config loader, and type definitions"
|
|
files = [
|
|
{
|
|
name = "index.ts"
|
|
extension = "ts"
|
|
description = "MCP server entry point — registers all API tools with McpServer"
|
|
requirement_status = "required"
|
|
},
|
|
{
|
|
name = "client.ts"
|
|
extension = "ts"
|
|
description = "HTTP client wrapper for the target API (GET/POST/PUT/DELETE)"
|
|
requirement_status = "required"
|
|
},
|
|
{
|
|
name = "config.ts"
|
|
extension = "ts"
|
|
description = "Configuration loader — reads ~/.{project}.json with multi-connection support"
|
|
requirement_status = "required"
|
|
},
|
|
{
|
|
name = "types.ts"
|
|
extension = "ts"
|
|
description = "TypeScript interfaces for connection, config, and API response types"
|
|
requirement_status = "required"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "scripts"
|
|
path = "scripts"
|
|
description = "Setup and utility scripts"
|
|
requirement_status = "required"
|
|
purpose = "Contains interactive setup wizard and repo-specific helpers"
|
|
files = [
|
|
{
|
|
name = "setup.mjs"
|
|
extension = "mjs"
|
|
description = "Interactive setup wizard — prompts for API connection details and writes config"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "docs"
|
|
path = "docs"
|
|
description = "Documentation directory"
|
|
requirement_status = "required"
|
|
purpose = "Contains project documentation"
|
|
files = [
|
|
{
|
|
name = "index.md"
|
|
extension = "md"
|
|
description = "Documentation index"
|
|
requirement_status = "suggested"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = ".gitea"
|
|
path = ".gitea"
|
|
description = "Gitea-specific configuration"
|
|
requirement_status = "required"
|
|
purpose = "Contains Gitea Actions workflows and platform configuration"
|
|
files = [
|
|
{
|
|
name = ".mokostandards"
|
|
description = "MokoStandards platform declaration — must contain 'platform: mcp-server'"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
}
|
|
]
|
|
subdirectories = [
|
|
{
|
|
name = "workflows"
|
|
path = ".gitea/workflows"
|
|
description = "Gitea Actions workflows"
|
|
requirement_status = "required"
|
|
files = [
|
|
{
|
|
name = "auto-release.yml"
|
|
extension = "yml"
|
|
description = "Auto-create release on push to main"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/auto-release.yml.template"
|
|
},
|
|
{
|
|
name = "auto-dev-issue.yml"
|
|
extension = "yml"
|
|
description = "Auto-create tracking issue when a dev/** branch is pushed"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/auto-dev-issue.yml.template"
|
|
},
|
|
{
|
|
name = "auto-assign.yml"
|
|
extension = "yml"
|
|
description = "Auto-assign issues and PRs"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/auto-assign.yml.template"
|
|
},
|
|
{
|
|
name = "standards-compliance.yml"
|
|
extension = "yml"
|
|
description = "MokoStandards compliance validation"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/standards-compliance.yml.template"
|
|
},
|
|
{
|
|
name = "codeql-analysis.yml"
|
|
extension = "yml"
|
|
description = "CodeQL security analysis"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/codeql-analysis.yml.template"
|
|
},
|
|
{
|
|
name = "changelog-validation.yml"
|
|
extension = "yml"
|
|
description = "CHANGELOG validation on PR"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/changelog-validation.yml.template"
|
|
},
|
|
{
|
|
name = "sync-version-on-merge.yml"
|
|
extension = "yml"
|
|
description = "Auto-bump patch version on merge"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/sync-version-on-merge.yml.template"
|
|
},
|
|
{
|
|
name = "repository-cleanup.yml"
|
|
extension = "yml"
|
|
description = "Scheduled cleanup of stale branches and workflow runs"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/repository-cleanup.yml.template"
|
|
},
|
|
{
|
|
name = "enterprise-firewall-setup.yml"
|
|
extension = "yml"
|
|
description = "Enterprise firewall configuration for trusted domain access"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/enterprise-firewall-setup.yml.template"
|
|
},
|
|
{
|
|
name = "deploy-dev.yml"
|
|
extension = "yml"
|
|
description = "Deployment to development server"
|
|
requirement_status = "suggested"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/deploy-dev.yml.template"
|
|
},
|
|
{
|
|
name = "deploy-demo.yml"
|
|
extension = "yml"
|
|
description = "Deployment to demo server on merge to main"
|
|
requirement_status = "suggested"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/deploy-demo.yml.template"
|
|
},
|
|
{
|
|
name = "copilot-agent.yml"
|
|
extension = "yml"
|
|
description = "Copilot agent workflow for automated code review"
|
|
requirement_status = "optional"
|
|
always_overwrite = true
|
|
template = "templates/workflows/shared/copilot-agent.yml.template"
|
|
},
|
|
{
|
|
name = "mcp-build-test.yml"
|
|
extension = "yml"
|
|
description = "MCP server build validation — TypeScript compile, dist verification, tool count"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/mcp/mcp-build-test.yml.template"
|
|
},
|
|
{
|
|
name = "mcp-sdk-check.yml"
|
|
extension = "yml"
|
|
description = "Weekly check for MCP SDK and Zod updates — creates issue when new version available"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = "templates/workflows/mcp/mcp-sdk-check.yml.template"
|
|
},
|
|
{
|
|
name = "mcp-tool-inventory.yml"
|
|
extension = "yml"
|
|
description = "Generate tool inventory report on push to main"
|
|
requirement_status = "suggested"
|
|
always_overwrite = true
|
|
template = "templates/workflows/mcp/mcp-tool-inventory.yml.template"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "dist"
|
|
path = "dist"
|
|
description = "Compiled JavaScript output (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
},
|
|
{
|
|
name = "node_modules"
|
|
path = "node_modules"
|
|
description = "Node.js dependencies (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
}
|
|
]
|
|
|
|
repository_requirements = {
|
|
secrets = [
|
|
{
|
|
name = "GH_TOKEN"
|
|
description = "Org-level Gitea PAT — configure in org Actions secrets"
|
|
required = true
|
|
scope = "organisation"
|
|
used_in = "Gitea Actions workflows"
|
|
}
|
|
]
|
|
|
|
variables = [
|
|
{
|
|
name = "NODE_VERSION"
|
|
description = "Node.js version for CI/CD"
|
|
default_value = "20"
|
|
required = false
|
|
scope = "repository"
|
|
}
|
|
]
|
|
|
|
branch_protections = [
|
|
{
|
|
branch_pattern = "main"
|
|
require_pull_request = true
|
|
required_approvals = 1
|
|
require_code_owner_review = false
|
|
dismiss_stale_reviews = true
|
|
require_status_checks = true
|
|
required_status_checks = ["ci"]
|
|
enforce_admins = false
|
|
restrict_pushes = true
|
|
}
|
|
]
|
|
|
|
repository_settings = {
|
|
has_issues = true
|
|
has_projects = true
|
|
has_wiki = false
|
|
has_discussions = false
|
|
allow_merge_commit = true
|
|
allow_squash_merge = true
|
|
allow_rebase_merge = false
|
|
delete_branch_on_merge = true
|
|
allow_auto_merge = false
|
|
}
|
|
|
|
labels = [
|
|
{
|
|
name = "bug"
|
|
color = "d73a4a"
|
|
description = "Something isn't working"
|
|
},
|
|
{
|
|
name = "enhancement"
|
|
color = "a2eeef"
|
|
description = "New feature or request"
|
|
},
|
|
{
|
|
name = "documentation"
|
|
color = "0075ca"
|
|
description = "Improvements or additions to documentation"
|
|
},
|
|
{
|
|
name = "security"
|
|
color = "ee0701"
|
|
description = "Security vulnerability or concern"
|
|
},
|
|
{
|
|
name = "new-tool"
|
|
color = "5319e7"
|
|
description = "New MCP tool/endpoint to add"
|
|
},
|
|
{
|
|
name = "api-change"
|
|
color = "fbca04"
|
|
description = "Upstream API changed — tool needs update"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|