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).
Before installing, ensure you have Node.js and npm installed on your system.
# Clone the repository
git clone https://github.com/anton10xr/gibber-mcp
cd mcp-server
# Install dependencies
npm install
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.
# For development with hot reloading
npm run dev
# For production
npm run build
npm start
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.
The MCP server provides the following cryptographic functionality:
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"
}
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="
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="
}
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."
The server provides the following endpoints:
GET /sse
: Connect to the server using server-sent events for real-time communicationPOST /messages/:id
: Send messages to a specific connectionThe server can be used to establish secure communication channels between LLMs or other agents. The workflow typically involves:
This enables secure communication even when the transmission channel might be compromised by potential eavesdroppers.
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.
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"
]
}
}
}
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.
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.