@igorromero/ciphersuite-mcp
ciphersuite-mcp
Сервер MCP (Model Context Protocol), предоставляющий инструменты шифрования и дешифрования AES-256-CBC, ресурсы с описанием каждого алгоритма и готовые промпты — всё это можно запускать прямо внутри VS Code Copilot Chat.
Related MCP server: @erickwendel/ciphersuite-mcp
Что он делает
Возможность | Название | Описание |
🔧 Инструмент |
| Шифрует любое текстовое сообщение с помощью парольной фразы |
🔧 Инструмент |
| Расшифровывает ранее зашифрованное сообщение с той же парольной фразой |
📄 Ресурс |
| Возвращает сведения об алгоритме шифрования, выработке ключа и формате вывода |
📄 Ресурс |
| Возвращает инструкцию по использованию инструмента дешифрования: ожидаемый формат, требования к парольной фразе и типичные ошибки |
💬 Промпт |
| Готовый промпт, который просит агента зашифровать сообщение |
💬 Промпт |
| Готовый промпт, который просит агента расшифровать сообщение |
Как работает шифрование
Алгоритм: AES-256-CBC
Выработка ключа:
scrypt(passphrase, fixedSalt, 32)— вы передаёте любую строку в качестве парольной фразы; сервер автоматически вырабатывает надёжный 32-байтовый ключФормат вывода:
<IV in hex>:<ciphertext in hex>— сохраните всю строку целиком, чтобы позже расшифровать сообщениеIV: при каждом вызове шифрования генерируется новый случайный 16-байтовый IV, поэтому одно и то же сообщение, зашифрованное дважды, даёт разный результат
Предварительные требования
Node.js v24+ (см.
enginesвpackage.json)
Установка
npm installШаг сборки не требуется — сервер запускает TypeScript напрямую через встроенную поддержку TypeScript в Node.js.
Использование в VS Code
1. Добавьте конфигурацию MCP-сервера
Создайте (или откройте) .vscode/mcp.json в рабочей области и добавьте:
{
"servers": {
"ciphersuite-mcp": {
"command": "node",
"args": ["--experimental-strip-types", "ABSOLUTE_PATH_TO_PROJECT/src/index.ts"]
}
}
}или через npm:
{
"servers": {
"ciphersuite-mcp": {
"command": "npx",
"args": ["-y", "@igorromero/ciphersuite-mcp"]
}
}
}Совет: Вы также можете добавить этот сервер в пользовательскую конфигурацию MCP в
~/.vscode/mcp.json, чтобы он был доступен в любой рабочей области.
2. Перезагрузите VS Code
Откройте палитру команд (Cmd+Shift+P) и выполните Developer: Reload Window (или просто перезапустите VS Code).
3. Используйте в Copilot Chat
Откройте Copilot Chat (режим Agent) и попробуйте:
Encrypt the message "Hello, World!" using the passphrase "my-secret-key"Decrypt this message: a3f1...:<ciphertext> using the passphrase "my-secret-key"Show me the encryption://info resourceАгент автоматически вызовет нужный инструмент и вернёт результат.
Запуск MCP Inspector
MCP Inspector позволяет в интерактивном режиме исследовать и тестировать все инструменты, ресурсы и промпты в браузерном интерфейсе:
npm run mcp:inspectЭто откроет MCP Inspector на http://localhost:5173 и подключит его к запущенному серверу.
Запуск тестов
# Run all tests once
npm test
# Run tests in watch mode (with debugger)
npm run test:devТестовый набор покрывает:
Шифрование сообщения
Расшифровка сообщения с правильной парольной фразой
Получение списка и чтение ресурса
encryption://infoПолучение обоих промптов
Ошибка: расшифровка с неверной парольной фразой
Ошибка: расшифровка некорректного шифротекста
Структура проекта
src/
index.ts # Entry point — connects the server to stdio transport
mcp.ts # All tools, resources, and prompts are registered here
tests/
mcp.test.tsДоступные скрипты
Скрипт | Описание |
| Запуск сервера (используется MCP-клиентами) |
| Запуск с отслеживанием изменений файлов и инспектором Node.js |
| Запуск всех тестов |
| Запуск тестов в режиме наблюдения |
| Открыть интерфейс MCP Inspector |
Создание с нуля
В этом разделе описано, как этот MCP-сервер создавался шаг за шагом — полезно для создания новых MCP-серверов в будущем.
Типы транспорта MCP
Существует 3 типа транспорта MCP:
Тип | Класс | Описание |
|
| Запускается локально на машине — самый распространённый вариант для локальных инструментов |
| — | Работает как API через HTTP |
| — | Server-Sent Events — обрабатывает данные по запросу (потоковая передача) |
Зависимости
// package.json
"dependencies": {
"@modelcontextprotocol/sdk": "^1.27.1",
"@types/node": "^24.11.0",
"zod": "^3.25.76"
}1. Точка входа — src/index.ts
Точка входа создаёт StdioServerTransport и подключает к нему MCP-сервер:
// src/index.ts
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { server } from "./mcp.ts";
async function main() {
const transport = new StdioServerTransport()
await server.connect(transport)
console.error('Encrypt MCP Server running on stdio')
}
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});2. Настройка сервера — src/mcp.ts
Создайте экземпляр MCP-сервера с именем и версией:
// src/mcp.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
export const server = new McpServer({
name: '@igorromero/ciphersuite-mcp',
version: '0.0.1'
})3. Регистрация инструментов

Инструменты — это функции, которые LLM может вызывать для выполнения действий. Используйте server.registerTool, который принимает 3 аргумента:
Название инструмента (строка)
Объект конфигурации, содержащий:
description— описание того, что делает инструмент; LLM использует его, чтобы решить, когда его вызыватьinputSchema— аналог тела запроса, определяется с помощью ZodoutputSchema— аналог тела ответа, определяется с помощью Zod
Асинхронная функция-обработчик — собственно реализация
server.registerTool(
'encrypt_message',
{
description: 'Encrypt a message',
inputSchema: {
message: z.string().describe("The message to encrypt"),
encryptionKey: z.string().describe(
"Any passphrase to use for encryption — the server derives a strong key from it automatically"
)
},
outputSchema: {
encryptedMessage: z.string().describe(
"The encrypted message (format: iv:ciphertext)"
)
}
},
async ({ message, encryptionKey }) => {
try {
const encryptedMessage = encrypt(message, encryptionKey)
return {
content: [{ type: "text", text: encryptedMessage }],
structuredContent: { encryptedMessage }
}
} catch (error) {
return {
isError: true,
content: [{
type: 'text',
text: `Failed to encrypt message! Error: ${error instanceof Error ? error.message : String(error)}`
}]
}
}
}
)Тот же принцип применяется к decrypt_message — просто поменяйте местами поля схемы ввода/вывода и вызовите decrypt().
4. Регистрация ресурсов

Ресурсы предоставляют статическую или вычисляемую информацию, которая помогает LLM понять контекст вокруг инструмента. Используйте server.registerResource, который принимает 4 аргумента:
Название ресурса
Шаблон URI (обычно совпадает с названием)
Объект конфигурации, содержащий
descriptionФункция-обработчик, возвращающая
contents— массив объектов с полямиuri,mimeTypeиtext
server.registerResource(
'encryption://info',
'encryption://info',
{
description: 'Describes the encryption algorithm, key requirements, and output format used by this server',
},
() => ({
contents: [
{
uri: "encryption://info",
mimeType: "text/plain",
text: `
Algorithm : AES-256-CBC
Key derivation: scrypt (passphrase + fixed server salt → 32-byte key)
Output format: <16-byte IV in hex>:<ciphertext in hex> (separated by ":")
Notes:
- Users pass any passphrase — the server derives a strong 32-byte key automatically using scrypt.
- A random IV is generated for every encryption — the same message encrypted twice will produce different output.
- Use the exact same passphrase to decrypt.
- Keep the full "iv:ciphertext" string to decrypt later.
`.trim(),
},
]
})
)Ресурс decryption://info устроен так же и описывает ожидаемый формат входных данных, требования к парольной фразе и типичные сценарии ошибок для инструмента дешифрования.
5. Регистрация промптов

Промпты — это готовые шаблоны сообщений, которые LLM может использовать для направленного вызова инструментов. Используйте server.registerPrompt, который принимает 3 аргумента:
Название промпта
Объект конфигурации, содержащий:
description— описание того, что делает промптargsSchema— входные параметры, определяемые с помощью Zod
Функция-обработчик, возвращающая
messages— массив объектов с полямиrole(userилиassistant) иcontent
server.registerPrompt(
"encrypt_message_prompt",
{
description: "Prompt to encrypt a plain-text message using the encrypt_message tool",
argsSchema: {
message: z.string().describe("The message to encrypt"),
encryptionKey: z.string().describe(
"Any passphrase to use for encryption — the server derives a strong key from it automatically"
)
}
},
({ message, encryptionKey }) => ({
messages: [
{
role: 'user',
content: {
type: "text",
text: `Please encrypt the following message using the encrypt_message tool.\nMessage: ${message}\nEncryption key: ${encryptionKey}`,
}
}
]
})
)Промпт decrypt_message_prompt устроен так же — принимает encryptedMessage и encryptionKey в качестве аргументов и предписывает LLM вызвать decrypt_message.
6. Подключение MCP-сервера к IDE
VS Code (автоматически)
Создайте .vscode/mcp.json в корне проекта. VS Code обнаружит его автоматически:
{
"servers": {
"ciphersuite-mcp": {
"command": "node",
"args": [
"--experimental-strip-types",
"src/index.ts"
]
}
}
}Другие IDE / Другие проекты
Скопируйте запись сервера ciphersuite-mcp в файл конфигурации MCP целевого проекта или IDE. Сервер запускается как подпроцесс через stdio, поэтому к нему может подключиться любой MCP-совместимый клиент.
Available Tools
2 toolsdecrypt_messageA
Decrypt a message that was encrypted with the encrypt_message tool
| Name | Required | Description | Default |
|---|---|---|---|
| encryptionKey | Yes | The same passphrase used during encryption | |
| encryptedMessage | Yes | The encrypted message (format: iv:ciphertext) |
Output Schema
| Name | Required | Description |
|---|---|---|
| decryptedMessage | Yes | The decrypted plain-text message |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It does not state whether the operation is read-only, has side effects, or what happens on failure (e.g., wrong key). The only behavioral detail is the requirement for the same passphrase, which partially addresses input constraints but not the tool's overall safety profile. This is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with zero filler. It states the verb, object, and connection to the sibling tool efficiently, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, full parameter coverage, and presence of an output schema, the description is mostly complete. It correctly identifies the key requirement and relationship to encrypt_message. However, lacking behavioral disclosure (e.g., error handling, purity) means it is not fully complete for an agent deciding to invoke it safely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so each parameter already has a description. The tool description adds minimal semantic value beyond mentioning the key matches encrypt_message, which mirrors what the schema already states. This meets the baseline for full schema coverage but does not provide additional meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Decrypt') and resource ('a message'), and explicitly ties it to the encrypt_message tool, which differentiates it from the sibling. It is not a tautology; it names the exact operation and its counterpart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly implies usage context by referencing encrypt_message, indicating it is the decryption counterpart. However, it does not explicitly state when not to use it or name alternative tools beyond the implicit sibling relationship. This is clear context but lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
encrypt_messageC
Encrypt a message
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | The message to encrypt | |
| encryptionKey | Yes | Any passphrase to use for encryption — the server derives a strong key from it automatically |
Output Schema
| Name | Required | Description |
|---|---|---|
| encryptedMessage | Yes | The encrypted message (format: iv:ciphertext) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral disclosure, but it only states the action. It does not mention that encryption is irreversible (without the key), the output format, or any side effects. The schema hints at key derivation, but the description itself adds no behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, but it essentially restates the tool name without adding operational detail. While not verbose, it doesn't earn its place beyond the name—acceptable but minimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite an output schema existing, the description is too sparse for an encryption operation. It lacks information about when encryption is appropriate, the nature of the output, or any warnings. The agent is left to infer everything from the schema and sibling naming, which is insufficient for correct invocation in varied contexts.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters, so the schema already documents 'message' and 'encryptionKey' with meaningful descriptions. The tool description adds no extra parameter information, but the baseline is 3 given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Encrypt a message') with a specific verb and resource. It implicitly distinguishes from the sibling tool 'decrypt_message' by focusing on encryption, though it doesn't explicitly name the alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus decrypt_message or any other context. There is no mention of prerequisites, security considerations, or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.0.1- First observed
decrypt_message - First observed
encrypt_message
TDQS
Scored across 2 tools
The two tools are perfectly distinct: one encrypts, the other decrypts. There is no overlap or potential for confusion between them.
Both tools follow the same verb_noun pattern: encrypt_message and decrypt_message. Naming is consistent and intuitive.
At only 2 tools, the server is minimal, but the domain of encryption/decryption inherently requires exactly these two operations. The count is slightly under the typical 3-15 range but perfectly appropriate for its narrow scope.
The tool surface covers the full encryption/decryption lifecycle with no missing operations. For a cipher suite, encrypt and decrypt are the only necessary functions.
Maintenance
Related MCP Connectors
Generate contextual prompts and reusable agent skills, evaluate prompts with the 16-dimension Prompt Score, and manage saved work in PromptDrive. Twelve MCP tools also provide authorized access to private Memory for source-grounded answers. Connect over Streamable HTTP using OAuth 2.1 and PKCE. Generation consumes account quota and automatically saves successful results; Memory access follows account permissions and plan limits.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Secure P2P File Transfer, Encrypted Chat & Communication | Decentralized P2P & AES-256-GCM encryption | Zero cloud logs. Zero registration. For humans and autonomous AI agents / MCP servers.
Related MCP Servers
AlicenseAqualityCmaintenanceEnables AI memory persistence and secure credential management via vault tools for MCP-compatible clients like Claude Desktop, Cursor, and VS Code.1211 npmMIT- AlicenseAqualityCmaintenanceProvides AES-256-CBC encryption and decryption tools, a resource for algorithm details, and prompts for encrypting and decrypting messages, all runnable inside VS Code Copilot Chat.2ISC
- AlicenseCqualityCmaintenanceProvides AES-256-CBC encryption and decryption tools, an algorithm info resource, and ready-to-use prompts for use in MCP-compatible clients like VS Code Copilot Chat.1ISC
- AlicenseCqualityCmaintenanceEnables encrypting and decrypting plain-text messages with AES-256-CBC using any passphrase, with automatic scrypt key derivation and a fresh random IV per call. It also exposes a resource describing the algorithm and ready-to-use prompts, and can be run directly inside VS Code Copilot Chat or the MCP Inspector.2ISC