Skip to content

feat: add mcp documentation skill for spec-aware development#609

Merged
devcrocod merged 1 commit intomainfrom
devcrocod/add-mcp-doc-skill
Mar 18, 2026
Merged

feat: add mcp documentation skill for spec-aware development#609
devcrocod merged 1 commit intomainfrom
devcrocod/add-mcp-doc-skill

Conversation

@devcrocod
Copy link
Contributor

@devcrocod devcrocod commented Mar 17, 2026

Add a Claude Code skill (.claude/skills/mcp-docs/) that provides live MCP documentation and specification context

Motivation and Context

The modelcontextprotocol.io site provides both an MCP server and an llms.txt index for machine-readable access to the documentation. This skill leverages both to give Claude live access to the current spec during development.

How Has This Been Tested?

The skill was evaluated on 3 realistic scenarios (implementation, code review, spec question) comparing with-skill vs without-skill baseline:

  • Pass rate: 100% vs 67% — skill consistently cites spec sources and uses RFC 2119 language
  • Token efficiency: 41% fewer tokens on average (44k vs 75k) — goes directly to spec instead of reverse-engineering from codebase
  • Accuracy: with-skill discovered URL mode elicitation (new in spec 2025-11-25) that baseline missed entirely
  • Description triggering: optimized through 5 iterations of automated trigger evaluation against 20 test prompts

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

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

Adds a Claude Code skill that provides live MCP specification context from modelcontextprotocol.io, enabling spec-aware development and reviews without relying on potentially outdated model training data.

Changes:

  • Update .gitignore to allow committing .claude/ content while keeping local Claude settings untracked.
  • Add a new Claude Code skill at .claude/skills/mcp-docs/SKILL.md with guidance for fetching and citing MCP spec sources (MCP search tool first, llms.txt fallback).

Reviewed changes

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

File Description
.gitignore Stops ignoring the entire .claude/ directory; ignores only .claude/settings.local.json so skills can be committed.
.claude/skills/mcp-docs/SKILL.md Introduces the mcp-docs skill instructions for retrieving and citing up-to-date MCP specification content.

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

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

---
name: mcp-docs
description: >
Fetch live MCP specification and docs from modelcontextprotocol.io. Training data may be
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please read the PR description more carefully. What you sent is not related to this skill

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I missed the mention of documentation in the PR, that was my mistake. It is stated in the skill itself

Comment on lines +44 to +58
1. Fetch the documentation index:
```
WebFetch("https://modelcontextprotocol.io/llms.txt", "Return the full content as-is")
```

2. Identify the relevant page URL(s) from the index. Key sections:
- **Specification**: `specification/...` — protocol details, message formats, transports, lifecycle
- **SEPs**: `seps/...` — specification enhancement proposals
- **Learning**: `docs/learn/...` — architecture, concepts
- **Development**: `docs/develop/...` — building clients/servers

3. Fetch the specific page:
```
WebFetch("<page-url>", "Return the full content of this documentation page")
```
Copy link
Contributor

Choose a reason for hiding this comment

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

see previous comment. there is a well-known spec locations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

please check llms.txt
This skill is about documentation in general, not the specification schema. I’ll create a separate skill for the schema and open a dedicated PR for it later


### Version handling

Always use the latest spec version by default. Only use a specific version or draft when the user explicitly requests it (e.g., "check the 2025-03-26 spec" or "what does the draft say").
Copy link
Contributor

Choose a reason for hiding this comment

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

...or comment explicitly states the spec version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where exactly is that stated in the comment? In the prompt, in the KDoc, or somewhere else?
The instruction should be unambiguous, which is why the wording user explicitly requests is used with an example

Copy link
Contributor

@e5l e5l left a comment

Choose a reason for hiding this comment

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

lgtm

@devcrocod devcrocod merged commit 2542c9c into main Mar 18, 2026
24 checks passed
@devcrocod devcrocod deleted the devcrocod/add-mcp-doc-skill branch March 18, 2026 16:53
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.

5 participants