Update qmd-docs.md to use mcp-scripts instead of MCP server#20847
Update qmd-docs.md to use mcp-scripts instead of MCP server#20847
Conversation
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 mount |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 3b08136. Added three 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot put all files in a single collection, do not add collection input argument. do not expose |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
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:
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>
Done in 602c886. All directories are now registered as a single 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot remove |
… search Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 530426d. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
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-querytool wrapper. - Add an MCP Scripts HTTP server setup and wire it into the MCP Gateway as
mcpscriptsacross multiple workflows. - Update the shared module
.github/workflows/shared/mcp/qmd-docs.mdto define themcp-scriptstool 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.
| - 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. |
Updates
.github/workflows/shared/mcp/qmd-docs.mdto replace the MCP server setup with a single nativemcp-scriptstool that wraps theqmdCLI directly.Changes
mcp-serversblock (HTTP MCP endpoint config)Start QMD MCP serverstep (nohup server, health polling, tools verification)docs/src/content/docs,.github/agents,.github/aw) are now indexed into a singlegh-awcollectionmcp-scripts:section with one shell-based tool exposed to the agent:qmd-query— wrapsqmd query ... --files --min-scorewithqueryandmin_scoreinputs; uses vector similarity search to return relevant file paths<qmd>prompt block in the workflow body encouraging the agent to useqmd-querywith 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.