Skip to content

Migrate Kibana Dev MCP Server to Agent Skills#254135

Closed
rmyz wants to merge 8 commits intoelastic:mainfrom
rmyz:migrate-dev-mcp-to-skills
Closed

Migrate Kibana Dev MCP Server to Agent Skills#254135
rmyz wants to merge 8 commits intoelastic:mainfrom
rmyz:migrate-dev-mcp-to-skills

Conversation

@rmyz
Copy link
Copy Markdown
Contributor

@rmyz rmyz commented Feb 20, 2026

Summary

Migrates all tools from the @kbn/mcp-dev-server package 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.md and (where the logic is non-trivial) a standalone .ts helper script that preserves the exact original implementation:

    • kibana-dev-packages -- list/filter packages and teams, generate new packages
    • run-unit-tests -- run Jest tests for changed files or specific packages, with coverage and JSON output parsing
    • run-ci-checks -- execute CI commands (build, lint, type check, etc.)
    • search-by-codeowner -- search code within files owned by a specific GitHub team
    • find-dependency-references -- find all imports/usage of a dependency grouped by team
  • @kbn/mcp-dev-server package 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:

  • Less maintenance burden -- removes a full Node.js package with its own build config, moon.yml, tsconfig.json, and MCP protocol plumbing that nobody needs to maintain or keep compatible
  • Better discoverability -- skills are markdown files that any AI agent can read directly; no server needs to be running
  • Same logic, simpler delivery -- the .ts helper scripts reuse the original tool implementations verbatim, so behavior is identical but the wrapper is a node CLI invocation instead of an MCP protocol call
  • ~3,100 lines removed vs ~450 added (net reduction of ~2,650 lines), mostly by dropping tests and utilities that only existed to support the MCP server infrastructure itself
  • Unlike the MCP server, which required explicit configuration to use, skills are available immediately to every agent with zero setup.

@rmyz rmyz self-assigned this Feb 20, 2026
@rmyz rmyz added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation labels Feb 20, 2026
@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Feb 20, 2026

/ci

@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Feb 20, 2026

/ci

@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Feb 20, 2026

/ci

@rmyz rmyz marked this pull request as ready for review February 20, 2026 11:57
@rmyz rmyz requested a review from a team as a code owner February 20, 2026 11:57
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@peteharverson peteharverson requested a review from rbrtj February 23, 2026 15:34
@rmyz rmyz changed the title Migrate Kibana Dev MCP Server to Skills Migrate Kibana Dev MCP Server to Agent Skills Feb 24, 2026
@rmyz rmyz requested a review from a team as a code owner February 24, 2026 11:08
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ security / security_solution ] plugin / local-serverless-security_complete - Entity analytics dashboard page - enables risk score followed by the store

Metrics [docs]

Count of Enzyme imports

Enzyme is no longer supported, and we should switch to @testing-library/react instead.

id before after diff
@kbn/mcp-dev-server 16 - -16
Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/mcp-dev-server 2 - -2

Total ESLint disabled count

id before after diff
@kbn/mcp-dev-server 2 - -2

History

cc @rmyz

Copy link
Copy Markdown
Contributor

@rbrtj rbrtj left a comment

Choose a reason for hiding this comment

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

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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We shouldn't need @kbn/setup-node-env and can just run the ts file directly with node.

@tylersmalley
Copy link
Copy Markdown
Member

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add disable-model-invocation: true

@clintandrewhall
Copy link
Copy Markdown
Contributor

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

@tylersmalley
Copy link
Copy Markdown
Member

@rmyz, still working on the review - just had to step away for a bit.

@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Mar 2, 2026

@tylersmalley @clintandrewhall should we close this PR then?
If you still find value in having the MCP let's keep it as it is, I thought about simplifying it as the use cases could be converted to skills easily, but I'm fine either way.

@rmyz
Copy link
Copy Markdown
Contributor Author

rmyz commented Mar 6, 2026

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.
Meanwhile, it's being used, so we'll keep it as is.

@rmyz rmyz closed this Mar 6, 2026
@rmyz rmyz deleted the migrate-dev-mcp-to-skills branch March 6, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants