SOURCE_URL: https://majikah.solutions/products/majik-signature/docs/mjksig-cli-mcp
---
title: "Majik Signature CLI (mjksig) & MCP Server (mjksig-mcp)"
id: "mjksig-cli-mcp"
group: "majik-signature"
type: "products"
version: "0.8.0"
lastUpdated: "2026-07-29T00:00:00.000Z"
difficulty: "Intermediate"
time: "10 minutes"
tags: [majik-signature, cli, mcp, model-context-protocol, automation, ci-cd, trusted-timestamps, batch-signing, ai-agents, windows]
---
# Majik Signature CLI (mjksig) & MCP Server (mjksig-mcp)
> This guide covers installation (none required — both ship bundled with the app), every mjksig CLI command and flag, batch signing behavior, the mjksig-mcp MCP server's five tools, exact configuration snippets for Claude Desktop, Cursor, VS Code (Copilot), Windsurf, and Codex CLI, and the underlying security/trust model.
## Overview
mjksig and mjksig-mcp let scripts, CI pipelines, and AI agents request signing, sealing, verification, and Trusted Timestamp actions from Majik Signature — without ever giving them your private key. Both tools relay requests over a local named pipe to the desktop app, which still requires your explicit, in-app approval before anything is actually signed or sealed.
### What This Is
mjksig is a command-line interface for Majik Signature, and mjksig-mcp is a Model Context Protocol server that exposes the same capabilities as callable tools for AI agents (Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI, and any other MCP-compatible client). Both are bundled automatically with the Microsoft Store build of Majik Signature — there is nothing separate to install. As of v0.8.0, both are Windows-only.
> **NOTE:** If you already have Majik Signature installed from the Microsoft Store, mjksig and mjksig-mcp are already on your PATH. Neither requires the app to be open ahead of time — the app launches automatically (hidden, in the background) the first time a command needs it.
### The Trust Model
Automation reaches the request, never the key. Both tools talk to the already-running (or auto-launched) Majik Signature desktop app over a local named pipe (\\.\pipe\majik-signature-cli on Windows). Only the desktop app process ever touches your decrypted signing keys. When a request would actually produce a signature or seal, the app brings its own window to the front so any unlock prompt, passphrase entry, or Windows Hello dialog happens somewhere you can see and approve it — the same way a manual, in-app signature works today.
### Which Actions Require Approval
| Action | Approval Required? | Why |
| --- | --- | --- |
| sign / sign_file | Yes | Produces a new signature — key material is used |
| seal / seal_file | Yes | Locks the file and applies a seal signature |
| verify / verify_file | No | Read-only — checks existing signatures |
| can-sign / can_sign | No | Read-only — allowlist/seal permission check |
| tsa-quota / tsa_quota | No | Read-only — reads your credit balance |
> ⚠️ **WARNING:** No script, pipeline, or AI agent can ever complete a signature without you approving it live in the app. If you see an unexpected unlock prompt appear, you can always decline it — declining causes the CLI or MCP call to fail cleanly rather than silently succeed.
### The CLI: mjksig
mjksig exposes five subcommands: sign, seal, verify, can-sign, and tsa-quota. Run mjksig --help or mjksig --help at any time for the full flag reference.
### mjksig Subcommands
| Command | Purpose | Approval |
| --- | --- | --- |
| sign | Sign a file, folder, or archive | Required |
| seal | Seal an already-signed file | Required |
| verify | Verify embedded signature(s) | None |
| can-sign | Preflight allowlist/seal permission check | None |
| tsa-quota | Show remaining Trusted Timestamp credits | None |
### Using: mjksig sign
1. **Basic signature**
*Signs with your active Majik Key*
- mjksig sign report.pdf
2. **Custom output path**
*-o / --output*
- mjksig sign report.pdf -o ./out/report-signed.pdf
3. **Sign with a specific account**
*-a / --account*
- mjksig sign report.pdf --account
4. **Seal immediately after signing**
*--seal locks the file against further signers*
- mjksig sign report.pdf --seal
5. **Request a Trusted Timestamp**
*--tsa uses a TSA timestamp instead of a local one (consumes TSA quota)*
- mjksig sign report.pdf --tsa
6. **Combine flags in one call**
*Sign, timestamp, and seal in a single step*
- mjksig sign report.pdf --tsa --seal
7. **Name expected co-signers**
*--signers accepts a comma-delimited list for a multi-party envelope*
- mjksig sign contract.pdf --signers ,
### Example: sign, timestamp, and seal in one command
```bash
mjksig sign report.pdf --tsa --seal
```
### Using: mjksig verify
1. **Verify against the embedded signature (default)**
*--against self — trust-on-first-use*
- mjksig verify incoming/file.pdf
2. **Verify against your own account**
*--against account*
- mjksig verify incoming/file.pdf --against account --account
3. **Verify against a saved contact**
*--against contact requires --contact*
- mjksig verify incoming/vendor-invoice.pdf --against contact --contact
> **NOTE:** verify is read-only and never triggers an approval prompt, regardless of which client (CLI or MCP) is calling it.
### Preflight permission check before a batch job
```bash
mjksig can-sign contract.pdf --account
```
can-sign runs the exact same allowlist and sealing check that sign performs automatically before producing a signature. It just exposes that check on its own, as a read-only command — useful before a large batch job so a permission problem fails fast instead of surfacing mid-batch. sign will still stop cleanly on its own if permission is denied, with or without running can-sign first.
### Check remaining Trusted Timestamp credits
```bash
mjksig tsa-quota
```
tsa-quota prints your free daily remaining credits, free daily limit, paid credit balance, total available, and when your free allowance next resets — shown as human-readable relative time (e.g. "resets in 6 hours") rather than a raw ISO timestamp.
### Batch Signing & Progress Streaming
Point sign or verify at a folder or archive instead of a single file, and mjksig streams live progress from the app as each file completes — a spinner, an elapsed-time counter, and a progress bar, updated per file rather than only at the end. When the batch finishes, the CLI prints a summary table (total files, signed/processed count, error count) followed by a per-file status table: green for success, yellow for anything flagged unknown or unsigned, red for errors.
> **NOTE:** TSA-related fields — the Trusted Timestamp line and TSA authority — render in Majikah's brand accent color in the terminal output, matching the amber used across the rest of the ecosystem.
### The MCP Server: mjksig-mcp
The Model Context Protocol (MCP) is an open standard that lets AI agents call external tools directly with structured arguments, rather than a person copy-pasting commands for an agent to run. mjksig-mcp implements an MCP server over stdio and exposes five tools that map directly onto the CLI commands above. Every tool routes through the same named-pipe bridge and approval flow as the CLI — an agent gets no more direct access to your key than a terminal command does.
### Available MCP Tools
| Tool | Maps To | Description | Approval |
| --- | --- | --- | --- |
| sign_file | mjksig sign | Sign a file, folder, or archive. Combine seal_after_sign and use_tsa in one call as needed. | Required |
| seal_file | mjksig seal | Seal an already-signed file. | Required |
| verify_file | mjksig verify | Verify embedded signature(s). | None |
| can_sign | mjksig can-sign | Check allowlist/seal permission ahead of time. | None |
| tsa_quota | mjksig tsa-quota | Check remaining Trusted Timestamp credits. | None |
> **NOTE:** Tool descriptions are written specifically so an agent combines flags correctly in a single call. A request like "sign and seal this with a TSA timestamp" should become one sign_file call with both seal_after_sign=true and use_tsa=true set — not a sign_file call followed by a separate seal_file call.
Every tool call returns two content blocks: a markdown table for a human reading the chat, and a structured JSON object for anything downstream that needs to parse the result programmatically. The JSON is enriched with human-readable _relative sibling fields next to every ISO timestamp (resets_at becomes resets_at_relative: "in 6 hours", for example); the original ISO fields are left untouched for exact-time parsing.
### Setting Up MCP in Your Client
Every client points at the same command, mjksig-mcp — nothing to build, no arguments required. Add the relevant snippet below to your client's config file. All paths shown are for Windows, since mjksig-mcp currently ships Windows-only.
### Client Configuration
1. **Claude Desktop**
*%APPDATA%\Claude\claude_desktop_config.json*
- { "mcpServers": { "majik-signature": { "command": "mjksig-mcp" } } }
2. **Cursor**
*%USERPROFILE%\.cursor\mcp.json — same format as Claude Desktop. A project-level .cursor/mcp.json in your repo root works too and takes priority over the global file.*
- { "mcpServers": { "majik-signature": { "command": "mjksig-mcp" } } }
3. **VS Code (GitHub Copilot)**
*.vscode\mcp.json — the root key is servers, not mcpServers, and each entry needs an explicit "type": "stdio" field. The server only loads while Copilot Chat is in Agent mode.*
- { "servers": { "majik-signature": { "type": "stdio", "command": "mjksig-mcp" } } }
4. **Windsurf**
*%USERPROFILE%\.codeium\windsurf\mcp_config.json — same format as Claude Desktop and Cursor. Restart Windsurf fully after saving; it does not hot-reload this file.*
- { "mcpServers": { "majik-signature": { "command": "mjksig-mcp" } } }
5. **Codex CLI**
*%USERPROFILE%\.codex\config.toml — TOML, not JSON, and the table name is snake_case: mcp_servers, not mcpServers.*
- [mcp_servers.majik-signature]
command = "mjksig-mcp"
### Claude Desktop config
```json
{
"mcpServers": {
"majik-signature": {
"command": "mjksig-mcp"
}
}
}
```
### VS Code (Copilot) config
```json
{
"servers": {
"majik-signature": {
"type": "stdio",
"command": "mjksig-mcp"
}
}
}
```
### Codex CLI config
```toml
[mcp_servers.majik-signature]
command = "mjksig-mcp"
```
> **NOTE:** You don't need Majik Signature open before using mjksig or mjksig-mcp — if it isn't already running, both launch it automatically the first time a command needs it.
### Real-World Workflows
- Client handoff — sign and seal an entire delivery folder in one command: mjksig sign ./final_delivery --tsa --seal
- Inbound file trust — verify a vendor or contractor's file against a known contact before trusting it downstream: mjksig verify incoming/file.pdf --against contact --contact
- Preflight for large batches — check permission before a co-signing run touches 200 files: mjksig can-sign contract.pdf --account
- Quota-aware automation — run mjksig tsa-quota before a batch job that would use more Trusted Timestamps than you have free credits for
- Agent-driven signing — ask an agent in Claude Desktop or Cursor to "sign and seal this render with a trusted timestamp"; the agent calls sign_file once with both flags set, Majik Signature surfaces itself for approval, you approve once, done
### FAQ: Does the AI agent get access to my private key?
No. An agent using mjksig-mcp can request that something be signed — it never receives, handles, or has any path to your decrypted private key. Only the Majik Signature desktop app process ever holds that, and only after you've unlocked your account there.
### FAQ: What happens if I run a command while the app is closed?
Majik Signature launches automatically. You don't need to have it open ahead of time for mjksig or mjksig-mcp to work.
### FAQ: Is mjksig available for macOS or Linux?
Not yet. As of v0.8.0, this is Windows-only, bundled with the Microsoft Store build of Majik Signature.
### FAQ: Is can-sign's check different from what happens during a real sign?
No — it's the identical allowlist and sealing check that sign runs automatically by default before producing any signature. can-sign just exposes that same check as its own read-only command, so you can confirm permission ahead of time without attempting a real signature.
### Key Takeaways
- mjksig (CLI) and mjksig-mcp (MCP server) both ship bundled with the Microsoft Store build of Majik Signature — nothing to install separately, Windows-only for now.
- Both talk to the already-running (or auto-launched) desktop app over a local named pipe. The private key never leaves the app's process, and any action that creates a signature or seal requires explicit in-app approval.
- Read-only operations (verify, can-sign, tsa-quota) skip approval entirely, since nothing is being created or changed.
- The CLI streams live batch progress and prints color-coded status tables; the MCP server returns both a markdown table and machine-parseable JSON with relative-time fields.
- MCP tool descriptions are written so an agent combines flags correctly in one call — "sign and seal with a TSA timestamp" becomes a single sign_file call, not several.
- can-sign / can_sign exposes the exact same permission check sign performs automatically — a way to confirm permission ahead of time, not a separate rule set.