Snippets MCP
Click on "Install 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., "@Snippets MCPsave this React useEffect cleanup snippet"
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.
Snippets MCP
MCP server for storing, searching, and managing code snippets using semantic search and traditional keyword matching.
Just tell your coding agent (claude code, cursor, cline, opencode, etc.) to save a certain snippet. That's it.
When needed, just tell it to search for code snippets related to:
your query.
Features
Semantic search using AI embeddings to find snippets by meaning, not just keywords
Hybrid search combining semantic similarity and keyword matching
Automatic programming language detection
Tag-based organization and filtering
Date range filtering
No database needed. JSON based storage.
Vector embeddings cached for fast retrieval
Atomic, queued JSON writes to protect the database from partial writes
Related MCP server: Acemcp
Installation
npm install @freakynit/snippets-mcpAvailable Tools
add-snippet
Adds a new code snippet to the database.
Parameters:
code(string, required) - The code contenttags(array, optional) - Array of tag stringslanguage(string, optional) - Programming language (auto-detected if not provided)description(string, optional) - Text description for better semantic search
search-snippets
Searches snippets using hybrid semantic and keyword matching.
Parameters:
query(string, optional) - Natural language search querytags(array, optional) - Filter by specific tags (AND logic)language(string, optional) - Filter by programming languagedateStart(ISO date string, optional) - Filter by creation date startdateEnd(ISO date string, optional) - Filter by creation date endlimit(number, optional) - Maximum results to return (default: 10)
update-snippet
Updates an existing snippet. Re-generates embeddings if code, tags, or description change.
Parameters:
id(string, required) - Snippet IDcode,tags,language,description(optional) - Fields to update directly
delete-snippet
Deletes a snippet from the database.
Parameters:
id(string, required) - Snippet ID
get-snippet
Retrieves a single snippet by ID.
Parameters:
id(string, required) - Snippet ID
Environment Variables
SNIPPETS_FILE_PATH: Optional, Full path to file to save snippets and embeddings in. Defaults to~/.snippets-mcp-db.json.
How It Works
The library uses a hybrid search approach:
Semantic Search (70% weight) - Uses the
all-MiniLM-L6-v2model to perform vector searh against embeddings generated off code, description, tags and language.Keyword Matching (30% weight) - Traditional text matching for exact term matches based on code and tags.
Hard Filters - Applied first to narrow results by tags, language, and date range.
Embeddings are generated once when adding/updating snippets and cached for fast retrieval.
Storage
Snippets are stored in a JSON file specified by environment variable SNIPPETS_FILE_PATH, or at default path: ~/.snippets-mcp-db.json with the following structure:
{
"id": "uuid",
"code": "string",
"language": "string",
"tags": ["array"],
"description": "string",
"embedding": [/* vector array */],
"createdAt": "ISO date",
"updatedAt": "ISO date"
}Configuring using mcpServers json
For Mac and Linux
{
"mcpServers": {
"snippets-mcp": {
"command": "npx",
"args": ["-y", "@freakynit/snippets-mcp@latest"],
"env": {
"SNIPPETS_FILE_PATH": "Optional... path to save snippets and embeddings in.. should have .json extension"
}
}
}
}For Windows
{
"mcpServers": {
"snippets-mcp": {
"command": "cmd",
"args": ["/k", "npx", "-y", "@freakynit/snippets-mcp@latest"],
"env": {
"SNIPPETS_FILE_PATH": "Optional... path to save snippets and embeddings in.. should have .json extension"
}
}
}
}License
This server cannot be installed
Maintenance
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
- AlicenseAqualityFmaintenanceEnables semantic code search across codebases with automatic incremental indexing. Searches return relevant code snippets with file paths and line numbers based on natural language queries.Last updated1810Apache 2.0
- AlicenseAqualityFmaintenanceProvides code repository indexing and semantic search capabilities, allowing natural language queries to find relevant code snippets with automatic incremental indexing and multi-language support.Last updated129358ISC
- Alicense-qualityDmaintenanceProvides intelligent code context management and semantic search capabilities for software development, enabling natural language queries to find relevant code snippets, functions, and classes across Python, JavaScript, TypeScript, and SQL codebases.Last updatedMIT
- Alicense-qualityCmaintenanceProvides semantic code search and retrieval capabilities for AI agents, enabling them to query codebases using natural language with automatic learning, hybrid search, and intelligent chunking of functions and classes.Last updated3929ISC
Related MCP Connectors
Search your knowledge bases from any AI assistant using hybrid RAG.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/freakynit/snippets-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server