DEV Community

Cover image for How to Vet the Skills an MCP Server Adds to Your Coding Agent
Mayur Agnani
Mayur Agnani

Posted on Originally published at theaicommit.com

How to Vet the Skills an MCP Server Adds to Your Coding Agent

Your editor can now let a connected server add instructions your coding agent will follow. Clicking Allow pins the exact files, but it cannot tell you whether they are safe, and the short descriptions reach the model before anything is checked.

Engineer's view. This is a lockfile integrity hash. Approving an MCP server's skills pins every file's hash, and any later change makes the host ask again. But the hashes come from the same server as the files. A match proves nothing changed since you clicked Allow. It never proves the instructions are safe to follow.

TL;DR. Approving MCP server skills pins the hash of every file the server sent, so you hear about changes but learn nothing about safety. Read each skill before you allow it, and keep your own lock of what you approved.

Explain Like I'm 5

A caterer gives your kitchen a binder of recipes. The table of contents goes on the wall. The cook reads it before every meal to decide what to make.

When you approved the binder, you photographed every page. Before cooking a recipe, the cook compares its page to your photo. If the page changed, the cook asks you again.

But the caterer wrote the pages you photographed. The photo only proves nothing changed since then. Nobody checks the wall list until a recipe is opened. And if a recipe says "phone us for today's sauce," the photo says nothing about the sauce.

The Problem

You have shipped this bug before, and it had nothing to do with AI.

Your app depends on a popular open source package. Your lockfile pins its exact version and a hash of its bytes. Then a new maintainer publishes a release with a credential stealer inside. Someone on your team runs an upgrade. The lockfile records the new hash, and CI goes green.

The hash did its job perfectly. It proved you got the same bytes as everyone else. It never claimed those bytes were safe.

An MCP server can now ship that same kind of dependency straight into your coding agent. The MCP skills extension lets a connected server offer skills: folders of instructions the model reads and follows. The first time a server offers skills, your editor asks once whether to allow them into the model's context.

That click covers less than a lockfile does. Each skill's name and description sit in the model's context on every turn. They are checked against the file only when the skill loads. The file hashes come from the same server as the files. And if a skill tells the model to fetch more instructions from a web address, nothing hashes those at all.

The fix: treat the Allow click as a lockfile entry, not a code review. Read each skill before you approve it, keep your own lock of what you approved, and refuse skills whose instructions point at content no hash covers.

Read the full post on The AI Commit

How to Vet the Skills an MCP Server Adds to Your Coding Agent carries the rest: the fix and why it works, the code to change for each role, how to tell it worked, when it is the wrong tool, and an interactive model you can play with.


Originally published at theaicommit.com, a daily AI engineering lab for software engineers. The original has an interactive version you can play with, and the full runnable code is on GitHub.

Top comments (0)