Code Snippet Server

by ngeojiajun
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • The server provides persistent local storage for code snippets

  • The server requires Node.js (18.x, 20.x, or 22.x) as a prerequisite

  • The server requires npm as a prerequisite and uses npm commands for building and linking

コードスニペットサーバー

概要

コードスニペットサーバーは、異なるプログラミング言語間でコードスニペットを管理・保存するために設計されたモデルコンテキストプロトコル(MCP)サーバーです。標準化されたサーバーインターフェースを使用して、コードスニペットを作成、一覧表示、削除するための柔軟で拡張性の高い方法を提供します。

特徴

  • タイトル、言語、コードを含むコードスニペットを作成する
  • 言語またはタグによるフィルタリングが可能なリストスニペット
  • 一意の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

使用法

サーバーは 3 つの主要なツールを公開します。

1. スニペットを作成する

タイトル、言語、コードを含む新しいコード スニペットを作成します。

パラメータ:

  • title (必須): スニペットの名前
  • language (必須): プログラミング言語
  • code (必須): 実際のコードスニペット
  • tags (オプション): 分類用のタグの配列

2. リストスニペット

オプションのフィルタリングを使用してスニペットのリストを取得します。

パラメータ:

  • language (オプション): プログラミング言語でスニペットをフィルタリングします
  • tag (オプション):タグでスニペットをフィルタリングする

3. スニペットを削除する

ストレージからスニペットを削除します。

パラメータ:

  • id (必須): 削除するスニペットの一意の識別子

発達

建てる

npm run build

糸くず

npm run lint

貢献

PRは大歓迎です

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

さまざまなプログラミング言語のコード スニペットを管理および保存するための MCP サーバー。ユーザーは標準化されたインターフェイスを使用してスニペットを作成、一覧表示、削除できます。

  1. Overview
    1. Features
      1. Prerequisites
        1. Installation
          1. Usage
            1. 1. Create Snippet
            2. 2. List Snippets
            3. 3. Delete Snippet
          2. Development
            1. Build
            2. Lint
          3. Contributing
            ID: qt4j367mfk