Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Snippet Saver

БесплатноНе проверен

An MCP server that enables AI coding tools to save, list, and read code snippets as files in the local filesystem.

GitHubEmbed

Описание

An MCP server that enables AI coding tools to save, list, and read code snippets as files in the local filesystem.

README

A Model Context Protocol (MCP) server that lets AI coding tools save, list, and read code snippets. Build your personal code snippet library that Claude Code, Cursor, and other MCP-compatible tools can access.

What It Does

This MCP server provides three tools:

  1. save_snippet - Save a code snippet with a name, language, and optional description
  2. list_snippets - View all your saved snippets
  3. read_snippet - Read a specific snippet back

Snippets are stored as individual files in ~/snippets/ directory for easy access.

Installation

  1. Clone or download this project

  2. Install dependencies:

    cd snippet-saver
    npm install
    
  3. Configure Claude Code (choose one method):

    Method A: Using command line (recommended)

    claude mcp add --transport stdio snippet-saver -- node C:\Users\Grays\mcp-projects\snippet-saver\index.js
    

    Method B: Manual configuration Create or edit .mcp.json in your project root:

    {
      "mcpServers": {
        "snippet-saver": {
          "command": "node",
          "args": ["C:\\Users\\Grays\\mcp-projects\\snippet-saver\\index.js"]
        }
      }
    }
    
  4. Reconnect servers in Claude Code:

    • Type /mcp in Claude Code
    • Or start a new session

Usage Examples

Save a Snippet

Claude, save this React hook as a snippet:

const useLocalStorage = (key, initialValue) => {
  const [value, setValue] = useState(() => {
    const item = localStorage.getItem(key);
    return item ? JSON.parse(item) : initialValue;
  });

  useEffect(() => {
    localStorage.setItem(key, JSON.stringify(value));
  }, [key, value]);

  return [value, setValue];
};

Name it "useLocalStorage", language "javascript"

List All Snippets

Claude, what snippets do I have saved?

Read a Snippet

Claude, show me the useLocalStorage snippet

How It Works

  • Snippets are stored in ~/snippets/ (your home directory)
  • Each snippet is saved as a separate file with the language extension
  • Metadata (name, language, description, date) is included as comments
  • Works with any MCP-compatible AI coding tool

Limitations

  • Snippets are stored as plain text files (no database)
  • No search functionality yet
  • Cannot update existing snippets (must save new version)
  • No categorization or tagging system

Requirements

  • Node.js v16 or higher
  • Claude Code or another MCP-compatible tool

from github.com/Grayhood144/snippet-saver

Установка Snippet Saver

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/Grayhood144/snippet-saver

FAQ

Snippet Saver MCP бесплатный?

Да, Snippet Saver MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Snippet Saver?

Нет, Snippet Saver работает без API-ключей и переменных окружения.

Snippet Saver — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Snippet Saver в Claude Desktop, Claude Code или Cursor?

Открой Snippet Saver на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Snippet Saver with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development