mcp code snippets
A MCP server for managing and storing code snippets in various programming languages, allowing users to create, list, and delete snippets via a standardized interface.
A MCP server for managing and storing code snippets in various programming languages, allowing users to create, list, and delete snippets via a standardized interface.
Code Snippet Server is a Model Context Protocol (MCP) server designed to manage and store code snippets across different programming languages. It provides a flexible and extensible way to create, list, and delete code snippets using a standardized server interface.
git clone [email protected]:ngeojiajun-deriv/mcp-code-snippets.git
npm run build
npm link
The server exposes three primary tools:
Create a new code snippet with a title, language, and code.
Parameters:
- title
(required): Name of the snippet
- language
(required): Programming language
- code
(required): The actual code snippet
- tags
(optional): Array of tags for categorization
Retrieve a list of snippets with optional filtering.
Parameters:
- language
(optional): Filter snippets by programming language
- tag
(optional): Filter snippets by tag
Remove a snippet from storage.
Parameters:
- id
(required): Unique identifier of the snippet to delete
npm run build
npm run lint
Any PRs are welcome
[
{
"description": "Create a snippet (specify title, language, and code)",
"inputSchema": {
"properties": {
"code": {
"description": "Code snippet",
"type": "string"
},
"language": {
"description": "Programming language",
"type": "string"
},
"tags": {
"description": "Snippet tags",
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"description": "Snippet title",
"type": "string"
}
},
"required": [
"title",
"language",
"code"
],
"type": "object"
},
"name": "create_snippet"
},
{
"description": "List snippets (can filter by language or tags)",
"inputSchema": {
"properties": {
"language": {
"description": "Filter by specific language",
"type": "string"
},
"tag": {
"description": "Filter by specific tag",
"type": "string"
}
},
"type": "object"
},
"name": "list_snippets"
},
{
"description": "Delete a snippet (specify ID)",
"inputSchema": {
"properties": {
"id": {
"description": "ID of snippet to delete",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "delete_snippet"
}
]