@atbash/mcp
v0.1.3
Published
Atbash safety judge exposed as a standalone MCP server
Readme
@atbash/mcp
Expose Atbash as a standalone MCP server.
This package starts an MCP server process that loads one Atbash agent identity and exposes safety and query tools over the Model Context Protocol. Your MCP host or client remains the real decision-maker — this package does not execute your business tools.
Installation
npm install @atbash/mcpWhen To Use It
Use this package when:
- your host already supports MCP
- you want one Atbash tool server to serve one or many MCP clients
- you want Atbash checks without coupling your app directly to the SDK
Do not use this when you need deep framework lifecycle integration — use a framework-native package like @atbash/eliza-plugin or @atbash/langgraph instead.
Quick Start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"atbash": {
"command": "npx",
"args": ["-y", "@atbash/mcp"],
"env": {
"ATBASH_AGENT_PRIVKEY": "your_agent_private_key_here"
}
}
}
}Any MCP Client
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["-y", "@atbash/mcp"],
env: {
...process.env,
ATBASH_AGENT_PRIVKEY: process.env.ATBASH_AGENT_PRIVKEY,
},
});Environment Variables
| Variable | Required | Description |
|---|---|---|
| ATBASH_AGENT_PRIVKEY | Yes | Your Atbash agent private key |
| ATBASH_ENDPOINT | No | Override the default Atbash endpoint (https://atbash.ai) |
Tools
Safety Tools
atbash_judge
Submit an action for safety judgment before executing it.
| Input | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Plain text description of the action |
| context | string | Yes | Why this action is being taken |
| tool_name | string | No | Name of the tool being called |
| tool_args_json | string | No | JSON string of tool arguments |
Returns: { verdict, allow, reason, tool_call_id }
atbash_log
Log a tool call on-chain without requesting a verdict.
| Input | Type | Required |
|---|---|---|
| action | string | Yes |
| context | string | Yes |
| tool_name | string | No |
| tool_args_json | string | No |
atbash_check_agent
Check whether an agent is registered on the Atbash platform.
| Input | Type | Description |
|---|---|---|
| pubkey | string | Agent public key (defaults to server agent) |
atbash_judgment_status
Poll the status of a previously submitted judgment.
| Input | Type | Description |
|---|---|---|
| tool_call_id | string | ID returned from atbash_judge |
| agent_pubkey | string | Agent public key (defaults to server agent) |
Query Tools (read-only)
| Tool | Description |
|---|---|
| atbash_get_policy | Get agent policy and jail status |
| atbash_get_agent_detail | Get agent metadata |
| atbash_get_tool_calls | List recent tool calls across all agents |
| atbash_get_agent_tool_calls | List recent tool calls for one agent |
| atbash_get_org_tool_calls | List recent tool calls for an organization |
| atbash_get_tool_call_full | Get full detail for a single tool call |
| atbash_get_tool_call_count | Get total on-chain tool call count |
| atbash_get_tier_info | Get organization tier information |
| atbash_get_held_actions | List actions pending operator review |
| atbash_get_reviews | List completed operator reviews |
| atbash_get_safety_stats | Get chain-wide safety statistics |
Verdict Handling
| Verdict | Meaning | What To Do |
|---|---|---|
| ALLOW | Safe to proceed | Execute the real tool |
| HOLD | Logged for async review | Execution is allowed; the action is flagged for operator review in the background — keep tool_call_id to poll status later |
| BLOCK | Policy violation | Stop; show reason to operator |
| ERROR | Judge unreachable | Fail closed |
Sending Better Inputs
Better inputs produce better safety decisions.
Weak:
{ "action": "do payment", "context": "finance" }Better:
{
"action": "Bank transfer $25 to a new external vendor account",
"context": "Treasury payout review before execution",
"tool_name": "send_bank_transfer",
"tool_args_json": "{\"amount\":25,\"recipient\":\"new vendor\"}"
}Example
A runnable example is in examples/mcp-runtime-agent/.
npm install && npm run build
ATBASH_AGENT_PRIVKEY=your_key_here node examples/mcp-runtime-agent/client.mjs