mcpskills

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 8 Imported by: 1

README

mcp-skills-go

An MCP (Model Context Protocol) server that serves Claude Code skills from a directory of SKILL.md files.

Uses Go's fs.FS interface for filesystem access, which provides path traversal protection by design. Works with both embed.FS (compile-time) and os.DirFS (runtime).

Tools

The server exposes 5 MCP tools:

Tool Description
list-skills List all available skills with metadata (name, description, version)
get-skill Get a skill's full content (frontmatter + markdown body)
list-skill-resources List all resource files in a skill's directory
get-skill-resource Get a resource file from a skill's subdirectory
search-skills Search skills by keyword (OR mode by default) against name, description, and body

Skills Directory Structure

skills-dir/
  my-skill/
    SKILL.md              # Required: frontmatter + body
    references/           # Optional: supporting docs
      guide.md
    scripts/              # Optional: executable code
    agents/               # Optional: sub-agent definitions
SKILL.md Format
---
name: my-skill
description: When to use this skill
version: 1.0.0
---

Skill instructions go here.

Usage

As a library (embed.FS)
import (
    "embed"
    "io/fs"

    skills "github.com/meinside/mcp-skills-go"
)

//go:embed my-skills
var skillsFS embed.FS

sub, _ := fs.Sub(skillsFS, "my-skills")
server, tools := skills.NewServer(sub)
As a library (os.DirFS)
import (
    "os"

    skills "github.com/meinside/mcp-skills-go"
)

fsys := os.DirFS("/path/to/skills")
server, tools := skills.NewServer(fsys)
As a standalone STDIO server
go build -o skills-mcp-stdio-server ./cmd/skills-mcp-stdio-server/
./skills-mcp-stdio-server --skills-dir /path/to/skills
Claude Code MCP configuration
{
  "mcpServers": {
    "skills": {
      "command": "/path/to/skills-mcp-stdio-server",
      "args": ["--skills-dir", "/path/to/skills"]
    }
  }
}

Build

go build ./...

Test

go test ./...

License

MIT

Documentation

Overview

Package mcpskills provides an MCP server that serves SKILL.md-based skills via fs.FS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(fsys fs.FS) (*mcp.Server, []*mcp.Tool)

NewServer creates a new MCP server that serves skills from the given fs.FS. It returns the server and the list of registered mcp.Tool definitions.

Types

This section is empty.

Directories

Path Synopsis
cmd
Package skills provides parsing and access to SKILL.md-based skill directories via fs.FS.
Package skills provides parsing and access to SKILL.md-based skill directories via fs.FS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL