Skip to main content
Glama
Grayhood144

Snippet Saver

by Grayhood144

Snippet Saver MCP Server

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.

Related MCP server: Doclea MCP

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

Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
    Last updated
    15
    304
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A local MCP server providing persistent memory for AI coding assistants by storing and searching architectural decisions, patterns, and solutions. It also includes tools for git automation and mapping codebase expertise based on project history.
    Last updated
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    A local MCP server that provides AI coding assistants with semantic search capabilities over codebases. It indexes code using local embeddings and exposes tools for efficient code retrieval, saving tokens and improving response quality.
    Last updated
    31
    4
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that enables AI agents to navigate and understand codebases through file descriptions, semantic search, and code recommendations without repeatedly scanning files.
    Last updated
    MIT

View all related MCP servers

Related MCP Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.

  • Cloud-hosted MCP server for durable AI memory

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Grayhood144/snippet-saver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server