Snippet Saver
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Snippet Saver save this Python function as 'calculate_average'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
save_snippet - Save a code snippet with a name, language, and optional description
list_snippets - View all your saved snippets
read_snippet - Read a specific snippet back
Snippets are stored as individual files in ~/snippets/ directory for easy access.
Related MCP server: mcplens
Installation
Clone or download this project
Install dependencies:
cd snippet-saver npm installConfigure 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.jsMethod B: Manual configuration Create or edit
.mcp.jsonin your project root:{ "mcpServers": { "snippet-saver": { "command": "node", "args": ["C:\\Users\\Grays\\mcp-projects\\snippet-saver\\index.js"] } } }Reconnect servers in Claude Code:
Type
/mcpin Claude CodeOr 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 snippetHow 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
Available Tools
3 toolslist_snippetsA
List all saved code snippets in your library
Inputs: no named parameters.
read_snippetA
Read a specific code snippet from your library
Inputs: name (required).
save_snippetA
Save a code snippet to your snippets library. The snippet will be saved as a file in ~/snippets/
Inputs: code (required), name (required), language (required), description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clear and distinct purpose: listing all snippets, reading a specific snippet, and saving a new snippet. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (list_snippets, read_snippet, save_snippet) with underscore separation, making them predictable.
With 3 tools covering list, read, and create operations, the count is reasonable for a simple snippet library. It is slightly minimal but not inappropriate.
The set covers core operations (list, read, save) but lacks update and delete functionality, which are notable gaps for a snippet management tool.
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn 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.15306MIT
- AlicenseNot gradedqualityBmaintenanceA 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.31 npm4MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to navigate and understand codebases through file descriptions, semantic search, and code recommendations without repeatedly scanning files.MIT
- AlicenseBqualityCmaintenanceA comprehensive MCP server for developers providing file operations, shell execution, git integration, and smart caching to enhance AI-assisted development.1128 npmMIT