Skip to main content
Glama
igorgrv1

@igorromero/ciphersuite-mcp

by igorgrv1

ciphersuite-mcp

AES-256-CBC 암호화 및 복호화 도구, 각 알고리즘을 설명하는 리소스, 바로 사용 가능한 프롬프트를 제공하는 MCP (Model Context Protocol) 서버입니다. 이 모든 것은 VS Code Copilot Chat에서 바로 실행할 수 있습니다.

tools

Related MCP server: @erickwendel/ciphersuite-mcp

기능

유형

이름

설명

🔧 도구

encrypt_message

임의의 일반 텍스트 메시지를 암호 문구로 암호화합니다.

🔧 도구

decrypt_message

동일한 암호 문구로 이전에 암호화된 메시지를 복호화합니다.

📄 리소스

encryption://info

암호화 알고리즘, 키 유도, 출력 형식에 대한 세부 정보를 반환합니다.

📄 리소스

decryption://info

복호화 도구 사용 방법(예상 형식, 암호 문구 규칙, 일반적인 오류)을 반환합니다.

💬 프롬프트

encrypt_message_prompt

에이전트에게 메시지 암호화를 요청하는 사전 구축된 프롬프트입니다.

💬 프롬프트

decrypt_message_prompt

에이전트에게 메시지 복호화를 요청하는 사전 구축된 프롬프트입니다.

암호화 작동 방식

  • 알고리즘: AES-256-CBC

  • 키 유도: scrypt(passphrase, fixedSalt, 32) — 임의의 암호 문구 문자열을 전달하면 서버가 자동으로 강력한 32바이트 키를 유도합니다.

  • 출력 형식: <IV in hex>:<ciphertext in hex> — 나중에 복호화하려면 전체 문자열을 보관하세요.

  • IV: 암호화 호출마다 새로운 16바이트 IV가 무작위로 생성되므로, 같은 메시지를 두 번 암호화해도 다른 출력이 생성됩니다.


사전 요구 사항

  • Node.js v24+ (package.json의 engines 참고)


설치

npm install

빌드 단계가 필요하지 않습니다. 서버는 Node.js 네이티브 TypeScript 지원을 통해 TypeScript를 직접 실행합니다.


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"]
    }
  }
}

팁: 이 서버를 ~/.vscode/mcp.json의 사용자 수준 MCP 구성에 추가하면 모든 작업 영역에서 사용할 수 있습니다.

2. VS Code 다시 로드

명령 팔레트(Cmd+Shift+P)를 열고 개발자: 창 다시 로드를 실행하세요(또는 VS Code를 다시 시작하면 됩니다).

3. Copilot Chat에서 사용하기

Copilot Chat(에이전트 모드)을 열고 다음을 시도하세요:

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를 사용하면 브라우저 UI에서 모든 도구, 리소스, 프롬프트를 대화형으로 살펴보고 테스트할 수 있습니다:

npm run mcp:inspect

그러면 인스펙터가 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

사용 가능한 스크립트

Script

Description

npm start

서버 시작(MCP 클라이언트에서 사용)

npm run dev

파일 감시 및 Node.js 인스펙터와 함께 시작

npm test

모든 테스트 실행

npm run test:dev

감시 모드로 테스트 실행

npm run mcp:inspect

MCP Inspector UI 열기



처음부터 만들기

이 섹션에서는 이 MCP 서버가 단계별로 어떻게 구축되었는지 설명합니다. 향후 새 MCP 서버를 만들 때 유용합니다.

MCP 전송 유형

MCP 전송에는 3가지 유형이 있습니다:

유형

클래스

설명

stdio

StdioServerTransport

로컬 머신에서 실행됩니다 — 로컬 도구에 가장 일반적입니다.

http

—

HTTP를 통한 API로 실행됩니다.

sse

—

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. 도구 등록

tools

도구는 LLM이 작업을 수행하기 위해 호출할 수 있는 함수입니다. 3개의 인자를 받는 server.registerTool을 사용합니다:

  1. 도구의 이름(문자열)

  2. 다음을 포함하는 구성 객체:

    • description — 도구가 수행하는 작업; LLM은 이것을 사용하여 호출 시점을 결정합니다.

    • inputSchema — 요청 본문에 해당하며, Zod로 정의됩니다.

    • outputSchema — 응답 본문에 해당하며, Zod로 정의됩니다.

  3. 비동기 핸들러 함수 — 실제 구현

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. 리소스 등록

resource

리소스는 도구 주변의 맥락을 LLM이 이해하는 데 도움이 되는 정적 또는 계산된 정보를 제공합니다. 4개의 인자를 받는 server.registerResource를 사용합니다:

  1. 리소스의 이름

  2. URI 템플릿(보통 이름과 동일)

  3. description을 포함하는 구성 객체

  4. 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. 프롬프트 등록

prompt

프롬프트는 LLM이 안내된 방식으로 도구를 호출하는 데 사용할 수 있는 사전 구축된 메시지 템플릿입니다. 3개의 인자를 받는 server.registerPrompt를 사용합니다:

  1. 프롬프트의 이름

  2. 다음을 포함하는 구성 객체:

    • description — 프롬프트가 수행하는 작업

    • argsSchema — 입력 매개변수, Zod로 정의됨

  3. 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 서버 항목을 대상 프로젝트 또는 IDE의 MCP 구성 파일에 복사합니다. 서버는 stdio를 통해 하위 프로세스로 실행되므로 MCP 호환 클라이언트는 모두 연결할 수 있습니다.

Available Tools

2 tools
decrypt_messageA

Decrypt a message that was encrypted with the encrypt_message tool

NameRequiredDescriptionDefault
encryptionKeyYesThe same passphrase used during encryption
encryptedMessageYesThe encrypted message (format: iv:ciphertext)

Output Schema

NameRequiredDescription
decryptedMessageYesThe decrypted plain-text message

TDQS

A3.8/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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

NameRequiredDescriptionDefault
messageYesThe message to encrypt
encryptionKeyYesAny passphrase to use for encryption — the server derives a strong key from it automatically

Output Schema

NameRequiredDescription
encryptedMessageYesThe encrypted message (format: iv:ciphertext)

TDQS

C2.8/5.0
Behavior2/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 2 tool updatesv0.0.1
    • First observeddecrypt_message
    • First observedencrypt_message

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are perfectly distinct: one encrypts, the other decrypts. There is no overlap or potential for confusion between them.

Naming Consistency5/5

Both tools follow the same verb_noun pattern: encrypt_message and decrypt_message. Naming is consistent and intuitive.

Tool Count4/5

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.

Completeness5/5

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

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI memory persistence and secure credential management via vault tools for MCP-compatible clients like Claude Desktop, Cursor, and VS Code.
    12
    11 npm
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides 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.
    2
    ISC
  • A
    license
    C
    quality
    C
    maintenance
    Provides 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.
    1
    ISC
  • A
    license
    C
    quality
    C
    maintenance
    Enables 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.
    2
    ISC