代码片段服务器
概述
代码片段服务器是一个模型上下文协议 (MCP) 服务器,旨在管理和存储跨不同编程语言的代码片段。它提供了一种灵活且可扩展的方式,可以使用标准化的服务器接口来创建、列出和删除代码片段。
特征
创建包含标题、语言和代码的代码片段
列出片段,并可选择按语言或标签进行过滤
根据唯一 ID 删除片段
本地化支持
持久本地存储
先决条件
Node.js(18.x、20.x 或 22.x)
npm
安装
用法
该服务器公开了三个主要工具:
1. 创建代码片段
创建具有标题、语言和代码的新代码片段。
参数:
title
(必填):代码片段的名称language
(必填):编程语言code
(必需):实际的代码片段tags
(可选):用于分类的标签数组
2. 列出片段
检索具有可选过滤功能的片段列表。
参数:
language
(可选):按编程语言过滤代码片段tag
(可选):按标签过滤片段
3. 删除代码片段
从存储中删除片段。
参数:
id
(必需):要删除的代码片段的唯一标识符
发展
建造
皮棉
贡献
欢迎任何 PR
local-only server
The server can only run on the client's local machine because it depends on local resources.
用于管理和存储各种编程语言的代码片段的 MCP 服务器,允许用户通过标准化界面创建、列出和删除片段。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityTypeScript-based MCP server designed to enhance code editing experiences by providing features such as hover information, code completion, and diagnostics.Last updated -325MIT License
- AsecurityAlicenseAqualityMCP server for collecting code from files and directories into a single markdown document.Last updated -9MIT License
- AsecurityAlicenseAqualityMCP Server for running code snippet and show the result.Last updated -1859203MIT License
- -securityFlicense-qualityAn MCP server that enables generating scripts based on specified topics and keywords, while also providing functionality to store and summarize notes.Last updated -1