Skip to content

ci: auto-close new-server PRs and triage new-server issues - #4528

Open
olaservo wants to merge 2 commits into
modelcontextprotocol:mainfrom
olaservo:automation/new-server-close
Open

ci: auto-close new-server PRs and triage new-server issues#4528
olaservo wants to merge 2 commits into
modelcontextprotocol:mainfrom
olaservo:automation/new-server-close

Conversation

@olaservo

Copy link
Copy Markdown
Member

Description

Adds two automations that enforce the existing CONTRIBUTING.md policy that new server implementations belong in the MCP Server Registry, not this repo.

1. new-server-pr-check.yml — auto-close PRs adding new servers (deterministic, no AI)

  • Triggers on pull_request_target (API-only, never checks out PR code).
  • Detects added files that create a top-level directory under src/ that does not exist on the base branch (the existing-directory set is fetched dynamically, so the workflow never needs updating).
  • Labels the PR new-server-submission, posts one comment pointing to the registry and quickstart, and closes it.
  • Escape hatch: a maintainer removes the label and reopens; the workflow will not re-close while the label is absent. Complements the existing readme-pr-check.yml, which keeps handling README-only edits with its /i-promise-this-is-not-a-new-server flow.

2. issue-triage.md (+ compiled issue-triage.lock.yml) — agentic triage of new-server issues

  • A GitHub Agentic Workflow (public preview), engine: copilot, compiled with gh aw compile --strict (v0.81.6).
  • On issue opened/reopened, classifies whether the issue is a new-server request. Only on high confidence does it label new-server-request, comment with registry pointers, and close as not planned; on any doubt it takes no action.
  • Write operations are restricted to the declared safe-outputs (one label, one comment, close-issue); the agent job itself is read-only.
  • No PAT or secret needed: copilot-requests: write in the frontmatter bills inference to the org Copilot plan (changelog).

Motivation and Context

New-server PRs and issues keep arriving despite the policy. Today only README-only PRs get an automated response (comment, no close); PRs adding directories under src/ and issues requesting new servers require manual triage.

How Has This Been Tested?

Types of changes

  • New feature (non-breaking change which adds functionality)

Additional context

Maintainer follow-ups needed after merge:

  1. Create the two labels: new-server-submission and new-server-request.
  2. (Separate from this PR) Enable automatic Copilot code review for all PRs via a branch ruleset: Settings -> Rules -> Rulesets -> New branch ruleset -> target the default branch -> enable "Automatically request Copilot code review" (recommend "Run on each push" on, drafts off). See configure automatic review.
  3. Agentic workflows require the org to have GitHub Agentic Workflows (public preview) enabled and Copilot billing available for copilot-requests: write.

olaservo and others added 2 commits July 14, 2026 08:14
Adds two automations enforcing the CONTRIBUTING.md policy that new server
implementations belong in the MCP Server Registry, not this repo:

- new-server-pr-check.yml: deterministically detects PRs that add a new
  top-level directory under src/ (compared against the base branch),
  labels them new-server-submission, comments with registry pointers,
  and closes them. Maintainers opt a PR back in by removing the label
  and reopening.

- issue-triage.md (+ compiled lock file): GitHub Agentic Workflow
  (engine: copilot, billed to the org via copilot-requests: write) that
  classifies newly opened issues; on high confidence that an issue is a
  new-server request it labels, comments, and closes as not planned.
  On any doubt it takes no action.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agentic-workflow tooling (gh-aw) compiles .github/workflows/*.lock.yml from
their source workflow definitions. Marking them linguist-generated keeps them
collapsed in diffs and out of language statistics, and merge=ours stops
conflicts in a regenerated artifact from blocking a merge.

Note that merge=ours is not a built-in merge driver: it takes effect only in
clones that also configure `git config merge.ours.driver true`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 10, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automation to redirect new MCP server submissions to the Server Registry.

Changes:

  • Auto-closes PRs introducing new server directories.
  • Adds agentic issue triage and its compiled workflow.
  • Tracks generated workflow metadata and attributes.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/new-server-pr-check.yml Detects and closes new-server PRs.
.github/workflows/issue-triage.md Defines agentic issue triage.
.github/workflows/issue-triage.lock.yml Compiled triage workflow.
.github/aw/actions-lock.json Pins agentic workflow actions.
.gitattributes Marks generated workflow locks.
Suppressed comments (1)

.github/workflows/issue-triage.md:4

  • Running again on reopened defeats the promised recovery path: a maintainer reopening a false positive triggers the classifier against the same title/body, and a repeated high-confidence result closes it again. Trigger only on opened, or add a deterministic escape condition that the maintainer can satisfy, then regenerate the lock file.
    types: [opened, reopened]

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +2 to +4
on:
issues:
types: [opened, reopened]

const addedDirs = new Set();
for (const f of files) {
if (f.status !== 'added') continue;
'',
'To share your server with the community, publish it to the [MCP Server Registry](https://github.com/modelcontextprotocol/registry) instead (see the [quickstart guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/quickstart.mdx)). You can browse published servers at [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/).',
'',
'This PR is being closed automatically. If you believe this is a mistake, leave a comment and a maintainer can reopen it.',
Comment thread .gitattributes
@@ -1 +1,3 @@
package-lock.json linguist-generated=true

.github/workflows/*.lock.yml linguist-generated=true merge=ours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants