Migrate Kibana Dev MCP Server to Agent Skills#254135
Migrate Kibana Dev MCP Server to Agent Skills#254135rmyz wants to merge 8 commits intoelastic:mainfrom
Conversation
|
/ci |
|
/ci |
|
/ci |
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Count of Enzyme imports
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @rmyz |
rbrtj
left a comment
There was a problem hiding this comment.
tested and functionally LGTM
| Run from the repo root: | ||
|
|
||
| ```bash | ||
| node --no-experimental-require-module -r @kbn/setup-node-env .agents/skills/find-dependency-references/find_dependency_references.ts --dependency <name> |
There was a problem hiding this comment.
We shouldn't need @kbn/setup-node-env and can just run the ts file directly with node.
|
I believe @clintandrewhall is still using a few of these, like the unit testing one for code coverage, so might want to confirm with him before we remove all of them without direct replacements. |
| @@ -0,0 +1,55 @@ | |||
| --- | |||
| name: find-dependency-references | |||
| description: Find all files that import or require a specific dependency, with team ownership grouping from CODEOWNERS. Use when analyzing dependency usage, planning migrations, or auditing third-party library consumption. | |||
There was a problem hiding this comment.
Please add disable-model-invocation: true
|
I use the jest unit test tool because, over time, it has been more consistent in both process and results. This includes improving coverage in a pragmatic way. My draft PR for fixing docs-- #254836 -- would be difficult to migrate to a skill. Even opus believed it was better suited as a tool than a skill, given what it does: #247774 |
|
@rmyz, still working on the review - just had to step away for a bit. |
|
@tylersmalley @clintandrewhall should we close this PR then? |
|
I'm closing this as it's been open for a while. If we ever need to migrate away from the MCP server, I'm happy to help. |
Summary
Migrates all tools from the
@kbn/mcp-dev-serverpackage into AI agent skills under.agents/skills/, and removes the MCP server package entirely.The MCP dev server exposed 7 tools (list packages, list teams, generate package, run unit tests, run CI checks, search by codeowner, find dependency references) as an MCP protocol server. In practice, these tools are simple wrappers around CLI commands and Kibana internal APIs -- maintaining a full MCP server with its own package, dependencies, and protocol overhead is unnecessary for what they do.
What changed:
5 new skill directories created, each with a
SKILL.mdand (where the logic is non-trivial) a standalone.tshelper script that preserves the exact original implementation:kibana-dev-packages-- list/filter packages and teams, generate new packagesrun-unit-tests-- run Jest tests for changed files or specific packages, with coverage and JSON output parsingrun-ci-checks-- execute CI commands (build, lint, type check, etc.)search-by-codeowner-- search code within files owned by a specific GitHub teamfind-dependency-references-- find all imports/usage of a dependency grouped by team@kbn/mcp-dev-serverpackage deleted -- server code, tool implementations, tests, utilities, and all config references (package.json,tsconfig.base.json,CODEOWNERS,yarn.lock,scripts/mcp_dev.js)Why this is valuable:
moon.yml,tsconfig.json, and MCP protocol plumbing that nobody needs to maintain or keep compatible.tshelper scripts reuse the original tool implementations verbatim, so behavior is identical but the wrapper is anodeCLI invocation instead of an MCP protocol call