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: Secret Vault MCP Server

기능

유형

이름

설명

🔧 도구

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.jsonengines 참고)


설치

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도 동일한 패턴을 따릅니다. encryptedMessageencryptionKey를 인자로 받아 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 호환 클라이언트는 모두 연결할 수 있습니다.

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    17
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    AES-256-GCM encrypted local secret storage exposed as MCP tools, with secrets captured via native OS dialogs and never passing through the LLM API.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes OS keychain or AES-256-GCM encrypted file secrets as MCP tools, allowing reading, setting, and listing secrets without exposing values in conversation messages.
    10
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for sovereign AES-256-GCM backup encryption and decryption. Enables encrypting, decrypting, verifying, and scoring passphrases with zero network calls.
    MIT

View all related MCP servers

Related MCP Connectors

  • Production-grade cryptography toolkit with 31 MCP tools for classical, PQC, and KMS workflows.

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/igorgrv1/AI-MCP-from-scratch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server