Skip to content

Update qmd-docs.md to use mcp-scripts instead of MCP server#20847

Merged
pelikhan merged 10 commits intomainfrom
copilot/update-qmd-docs-query-instructions
Mar 13, 2026
Merged

Update qmd-docs.md to use mcp-scripts instead of MCP server#20847
pelikhan merged 10 commits intomainfrom
copilot/update-qmd-docs-query-instructions

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Updates .github/workflows/shared/mcp/qmd-docs.md to replace the MCP server setup with a single native mcp-scripts tool that wraps the qmd CLI directly.

Changes

  • Removed the mcp-servers block (HTTP MCP endpoint config)
  • Removed the Start QMD MCP server step (nohup server, health polling, tools verification)
  • Kept Node.js setup, npm install, and cache restore steps
  • Simplified collections registration: all directories (docs/src/content/docs, .github/agents, .github/aw) are now indexed into a single gh-aw collection
  • Added mcp-scripts: section with one shell-based tool exposed to the agent:
    • qmd-query — wraps qmd query ... --files --min-score with query and min_score inputs; uses vector similarity search to return relevant file paths
  • Added a <qmd> prompt block in the workflow body encouraging the agent to use qmd-query with a natural language request, explaining it queries a local vector database of project docs, agents, and workflow files

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits March 13, 2026 19:54
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…xample

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan March 13, 2026 20:15
@pelikhan
Copy link
Contributor

@copilot mount qmd query ... into a mcp-scripts script and remove the prompting to use the cli.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot mount qmd query ... into a mcp-scripts script and remove the prompting to use the cli.

Done in 3b08136. Added three mcp-scripts shell tools to the frontmatter — qmd-search, qmd-query, and qmd-get — and removed the <qmd> prompt section. The tools are now the interface for the agent to search docs.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw data/expected_co-V=full yaml-import.md ts/cache_memory_prompt.md ts/t�� js/**/*.json&#39; --ignore-path ../../../.prettierignore ts/cache_memory_prompt_multi.md ub/aw/imports/githubnext/agentics/d3422bf940923ef1d43db5559652b8e1e71869f3/workflows_shared_repo/home/REDACTED/work/gh-aw/gh-aw/.github/workflows ata/wasm_golden/git ata/wasm_golden/-C ata/wasm_golden//home/REDACTED/work/gh-aw/gh-aw/.github/workflows ata/wasm_golden/rev-parse (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw data/expected_corev-parse yaml-import.md ts/cache_memory_prompt.md ts/t�� js/**/*.json&#39; --ignore-path ../../../.prettierignore ts/cache_memory_prompt_multi.md ub/aw/imports/githubnext/agentics/d3422bf940923ef1d43db5559652b8e1e71869f3/workflows_shared_repo/home/REDACTED/work/gh-aw/gh-aw/.github/workflows ata/wasm_golden/git ata/wasm_golden/-C ata/wasm_golden//home/REDACTED/work/gh-aw/gh-aw/.github/workflows ata/wasm_golden/rev-parse (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha ath ../../../.pr**/*.json (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Update qmd-docs.md to use CLI commands instead of MCP server Update qmd-docs.md to use mcp-scripts instead of MCP server Mar 13, 2026
@pelikhan
Copy link
Contributor

@copilot put all files in a single collection, do not add collection input argument. do not expose get, agent can read files.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot put all files in a single collection, do not add collection input argument. do not expose get, agent can read files.

Done in 602c886. All directories are now registered as a single gh-aw collection, the collection input has been removed from both qmd-search and qmd-query, and qmd-get was already removed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot remove qmd_search and add prompt in share agentic worfklow to encourage the model to use this tool to search documentation with a "natural language request" . Explain it's a vector database.

… search

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot remove qmd_search and add prompt in share agentic worfklow to encourage the model to use this tool to search documentation with a "natural language request" . Explain it's...

Done in 530426d. Removed qmd-search and added a <qmd> prompt in the workflow body that instructs the agent to use qmd-query with a natural language request, and explains it queries a local vector database of project docs, agents, and workflow files.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan marked this pull request as ready for review March 13, 2026 21:48
Copilot AI review requested due to automatic review settings March 13, 2026 21:48
@pelikhan pelikhan merged commit fa061e8 into main Mar 13, 2026
47 checks passed
@pelikhan pelikhan deleted the copilot/update-qmd-docs-query-instructions branch March 13, 2026 21:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the QMD documentation search integration used by several GitHub Actions “lock” workflows, replacing the standalone QMD MCP server approach with an mcp-scripts-hosted tool that shells out to qmd query.

Changes:

  • Replace QMD MCP server startup/health checks with a simpler “register collection” step and a single qmd-query tool wrapper.
  • Add an MCP Scripts HTTP server setup and wire it into the MCP Gateway as mcpscripts across multiple workflows.
  • Update the shared module .github/workflows/shared/mcp/qmd-docs.md to define the mcp-scripts tool and new agent guidance.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/unbloat-docs.lock.yml Switch from QMD MCP server to MCP Scripts server + qmd-query, update gateway config and logs parsing.
.github/workflows/technical-doc-writer.lock.yml Same migration to MCP Scripts + qmd-query, update gateway config and logs parsing.
.github/workflows/glossary-maintainer.lock.yml Same migration to MCP Scripts + qmd-query, update tool allowlist and logs parsing.
.github/workflows/dictation-prompt.lock.yml Same migration to MCP Scripts + qmd-query, update gateway config and logs parsing.
.github/workflows/developer-docs-consolidator.lock.yml Same migration to MCP Scripts + qmd-query, update gateway config and logs parsing.
.github/workflows/daily-doc-updater.lock.yml Same migration to MCP Scripts + qmd-query, update gateway config and logs parsing.
.github/workflows/daily-doc-healer.lock.yml Same migration to MCP Scripts + qmd-query, update gateway config and logs parsing.
.github/workflows/shared/mcp/qmd-docs.md Replace MCP server config with mcp-scripts tool definition and updated agent prompt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 343 to 356
- name: Create gh-aw temp directory
run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh
- name: Install QMD
run: npm install -g @tobilu/qmd
- name: Restore QMD index cache
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }}
path: ~/.cache/qmd
restore-keys: qmd-docs-
- name: Start QMD MCP server
run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Re-register collections so qmd MCP tools are available.\n# The cache restore only restores the index data; qmd requires collections\n# to be registered in the current session for MCP tools to be served.\nDOCS_DIR=\"${GITHUB_WORKSPACE}/docs/src/content/docs\"\nAGENTS_DIR=\"${GITHUB_WORKSPACE}/.github/agents\"\nAW_DIR=\"${GITHUB_WORKSPACE}/.github/aw\"\n\n[ -d \"$DOCS_DIR\" ] && qmd collection add \"$DOCS_DIR\" --name docs 2>/dev/null || true\n[ -d \"$AGENTS_DIR\" ] && qmd collection add \"$AGENTS_DIR\" --name agents 2>/dev/null || true\n[ -d \"$AW_DIR\" ] && qmd collection add \"$AW_DIR\" --name aw 2>/dev/null || true\n\n# Start QMD MCP server in the background (explicit nohup rather than\n# --daemon to ensure the process survives the step and stays running)\nnohup qmd mcp --http > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 &\necho $! > /tmp/gh-aw/mcp-logs/qmd/server.pid\necho \"QMD MCP server started (PID $(cat /tmp/gh-aw/mcp-logs/qmd/server.pid))\"\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server is healthy\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n break\n fi\n sleep 0.5\ndone\n\nif ! curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server health check timed out after 15 seconds\"\n echo \"Server logs:\"\n cat /tmp/gh-aw/mcp-logs/qmd/server.log || true\n exit 1\nfi\n\n# Verify the MCP tools endpoint is responding with actual tools.\n# Without this check, a server with no registered collections will pass\n# the health check but return an empty tools list to the MCP Gateway.\nfor i in $(seq 1 20); do\n TOOLS=$(curl -sf -X POST http://localhost:8181/mcp \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: application/json, text/event-stream\" \\\n -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}' 2>/dev/null \\\n | grep -o '\"name\":\"[^\"]*\"' | wc -l || echo \"0\")\n if [ \"$TOOLS\" -gt \"0\" ]; then\n echo \"QMD MCP server started successfully with $TOOLS tools available\"\n exit 0\n fi\n sleep 1\ndone\n\necho \"QMD MCP server started but no tools available after 20 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1"
- name: Register QMD collections
run: |
qmd collection add "${GITHUB_WORKSPACE}" --name gh-aw --glob "docs/src/content/docs/**,.github/agents/**,.github/aw/**" 2>/dev/null || true
- name: Checkout repository

-->
<qmd>
Use `qmd-query` to find relevant documentation files with a natural language request — it queries a local vector database of project docs, agents, and workflow files. Read the returned file paths to get full content.
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.

3 participants