Code Snippet Server
代码片段服务器
概述
代码片段服务器是一个模型上下文协议 (MCP) 服务器,旨在管理和存储跨不同编程语言的代码片段。它提供了一种灵活且可扩展的方式,可以使用标准化的服务器接口来创建、列出和删除代码片段。
Related MCP server: CodeBot MCP Server v2
特征
创建包含标题、语言和代码的代码片段
列出片段,并可选择按语言或标签进行过滤
根据唯一 ID 删除片段
本地化支持
持久本地存储
先决条件
Node.js(18.x、20.x 或 22.x)
npm
安装
git clone git@github.com:ngeojiajun-deriv/mcp-code-snippets.git
npm run build
npm link用法
该服务器公开了三个主要工具:
1. 创建代码片段
创建具有标题、语言和代码的新代码片段。
参数:
title(必填):代码片段的名称language(必填):编程语言code(必需):实际的代码片段tags(可选):用于分类的标签数组
2. 列出片段
检索具有可选过滤功能的片段列表。
参数:
language(可选):按编程语言过滤代码片段tag(可选):按标签过滤片段
3. 删除代码片段
从存储中删除片段。
参数:
id(必需):要删除的代码片段的唯一标识符
发展
建造
npm run build皮棉
npm run lint贡献
欢迎任何 PR
Available Tools
3 toolscreate_snippetC
Create a snippet (specify title, language, and code)
Inputs: code (required), language (required), title (required), tags.
delete_snippetC
Delete a snippet (specify ID)
Inputs: id (required).
list_snippetsC
List snippets (can filter by language or tags)
Inputs: language, tag.
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 clearly distinct purpose: create_snippet for creation, delete_snippet for deletion, and list_snippets for listing with optional filtering. There is no overlap or ambiguity between these operations.
All tool names follow a consistent verb_noun pattern (create_snippet, delete_snippet, list_snippets) using snake_case throughout. This makes the set predictable and easy to understand.
With only 3 tools, the set feels thin for a snippet management server. While it covers basic operations, it lacks tools for updating snippets or retrieving a single snippet by ID, which are common needs in such domains.
The server provides create, delete, and list operations, but there are notable gaps: no update_snippet tool to modify existing snippets and no get_snippet tool to retrieve a specific snippet by ID. This limits functionality and may cause agent workarounds.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP Server for running code snippet and show the result.11,865 npm241MIT
- FlicenseNot gradedqualityDmaintenanceAn extended MCP server for managing code snippets, performing code analysis, and handling deployments via Render and GitHub. It enables users to perform code reviews, track issues, and manage service operations through natural language interactions.-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI coding tools to save, list, and read code snippets as files in the local filesystem.3MIT
- AlicenseAqualityDmaintenanceMCP server for massCode that lets AI assistants list, read, create, and update snippets, folders, and tags via the local massCode API.8MIT