Gibber MCP server

Provides cryptographic tools for secure communication, including key generation, shared secret derivation, and message encryption/decryption using SJCL P-256 and AES-CCM, enabling end-to-end encrypted data exchange via server-sent events.
Back to servers
Provider
Anton
Release date
Mar 03, 2025
Language
TypeScript
Stats
186 stars

This lightweight MCP server provides cryptographic tools including key pair generation, shared secret derivation, and message encryption/decryption, built with Express.js and powered by the Stanford Javascript Crypto Library (SJCL).

Installation

Prerequisites

Before installing, ensure you have Node.js and npm installed on your system.

Setup Steps

# Clone the repository
git clone https://github.com/anton10xr/gibber-mcp
cd mcp-server

# Install dependencies
npm install

Environment Configuration

The server uses the following environment variables:

  • PORT: The port on which the server will run (default: 3006)

You can set these variables in a .env file or through your system's environment variables.

Usage

Starting the Server

# For development with hot reloading
npm run dev

# For production
npm run build
npm start

Connecting to the Server

The server is accessible at http://localhost:3006 or the port you configured. A public instance is available at http://104.248.174.57/sse.

Cryptographic Tools

The MCP server provides the following cryptographic functionality:

1. Generate Key Pair

Creates a new SJCL P-256 key pair for secure communications.

// Example tool usage
{
  "type": "tool_use",
  "id": "tool_id",
  "name": "generateKeyPair",
  "input": {}
}

// Example response
{
  "publicKey": "c16JvftvDZJlFXSZpGSe/ZF1BfDBCNYnBH+2ZmRzWqCBsh2Y9SmS9jGZZvr0V6dI",
  "privateKey": "NrYnRI1mRWNSIJQyW3wyj2+0/oCY/qZj"
}

2. Derive Shared Secret

Generates a shared secret from a private key and another party's public key.

// Example tool usage
{
  "type": "tool_use",
  "id": "tool_id",
  "name": "deriveSharedSecret",
  "input": {
    "userPublicKey": "u0UPh6fEacvURF7EyxKsRg8uzRu+vzMsiCNzNNMcNKh6nKpeqyEZmBg1Uy8B5B0l",
    "myPrivateKey": "NrYnRI1mRWNSIJQyW3wyj2+0/oCY/qZj"
  }
}

// Example response
"You got the shared secret: M54VhH4WdFGFdAonfZtNmqm1pBO53BT6Xjl3SjjTjhQ="

3. Encrypt Messages

Encrypts plaintext using SJCL AES-CCM with the derived shared secret.

// Example tool usage
{
  "type": "tool_use",
  "id": "tool_id",
  "name": "encrypt",
  "input": {
    "sharedSecret": "M54VhH4WdFGFdAonfZtNmqm1pBO53BT6Xjl3SjjTjhQ=",
    "plaintext": "PAPERCLIP"
  }
}

// Example response
{
  "iv": "1hY771YWIwz5kTHDTWbxGQ==",
  "ct": "i1j8U68SNl5yzF9QOKOtad4="
}

4. Decrypt Messages

Decrypts encrypted messages using the shared secret.

// Example tool usage
{
  "type": "tool_use",
  "id": "tool_id",
  "name": "decrypt",
  "input": {
    "sharedSecret": "M54VhH4WdFGFdAonfZtNmqm1pBO53BT6Xjl3SjjTjhQ=",
    "iv": "/S+rQJdvjucr9muHh6IHuQ==",
    "ct": "zwb5d2qfAoyQUWzfF2Xvlv3VlBIxDJqifPnkG3B2hlh5yONQ2lWUrJE="
  }
}

// Example response
"PAPERCLIP received. We're secure."

API Endpoints

The server provides the following endpoints:

  • GET /sse: Connect to the server using server-sent events for real-time communication
  • POST /messages/:id: Send messages to a specific connection

Real-World Example

The server can be used to establish secure communication channels between LLMs or other agents. The workflow typically involves:

  1. Generating key pairs on both sides
  2. Exchanging public keys
  3. Deriving a shared secret
  4. Using the shared secret for encrypting and decrypting messages

This enables secure communication even when the transmission channel might be compromised by potential eavesdroppers.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later