open-index/open-npm huggingface dataset:
npm package: @mandatez/mcp
Description: MCP server for MandateZ — AI agent trust infrastructure via Model Context Protocol
Latest version: 0.1.0

# @mandatez/mcp

MCP (Model Context Protocol) server for [MandateZ](https://mandatez.com) — the neutral trust infrastructure layer for AI agents.

Gives any MCP-compatible AI client (Claude Desktop, Cursor, Windsurf) direct access to MandateZ agent registration, event tracking, trust scoring, policy enforcement, and audit trails.

## Tools

| Tool | Description |
|------|-------------|
| `register_agent` | Generate an Ed25519 keypair and register a new agent |
| `track_event` | Log a cryptographically signed event to the audit trail |
| `get_trust_profile` | Compute trust score (0–100) and grade for an agent |
| `check_policy` | Evaluate an action against policy rules (allowed/blocked/flagged) |
| `get_audit_trail` | Retrieve the last N events for an agent |

## Setup

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "mandatez": {
      "command": "npx",
      "args": ["@mandatez/mcp"],
      "env": {
        "SUPABASE_URL": "your-supabase-url",
        "SUPABASE_ANON_KEY": "your-supabase-anon-key",
        "MANDATEZ_OWNER_ID": "your-owner-id"
      }
    }
  }
}
```

### Cursor

Add to your `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "mandatez": {
      "command": "npx",
      "args": ["@mandatez/mcp"],
      "env": {
        "SUPABASE_URL": "your-supabase-url",
        "SUPABASE_ANON_KEY": "your-supabase-anon-key",
        "MANDATEZ_OWNER_ID": "your-owner-id"
      }
    }
  }
}
```

### Windsurf

Add to your Windsurf MCP config:

```json
{
  "mcpServers": {
    "mandatez": {
      "command": "npx",
      "args": ["@mandatez/mcp"],
      "env": {
        "SUPABASE_URL": "your-supabase-url",
        "SUPABASE_ANON_KEY": "your-supabase-anon-key",
        "MANDATEZ_OWNER_ID": "your-owner-id"
      }
    }
  }
}
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `SUPABASE_URL` | Yes | Your Supabase project URL |
| `SUPABASE_ANON_KEY` | Yes | Your Supabase anonymous key |
| `MANDATEZ_OWNER_ID` | No | Owner ID for agents (defaults to `"default-owner"`) |

## Usage Examples

Once configured, ask your AI assistant:

- *"Register a new agent called data-processor"*
- *"Track a read event on emails for agent ag_abc123"*
- *"What's the trust score for agent ag_abc123?"*
- *"Check if agent ag_abc123 is allowed to export from api/stripe"*
- *"Show me the last 20 events for agent ag_abc123"*

## How It Works

This MCP server wraps [`@mandatez/sdk`](https://www.npmjs.com/package/@mandatez/sdk) and exposes its capabilities over the Model Context Protocol via stdio transport. Every event is cryptographically signed with Ed25519, stored in Supabase, and contributes to the agent's trust score.

## License

MIT
npm package: @mandatez/sdk
Description: MandateZ SDK — cryptographic identity, event signing, and policy enforcement for AI agents
Latest version: 0.1.2

# MandateZ

**Every agent needs a mandate.**

MandateZ is the open, cross-vendor trust infrastructure for AI agents. Cryptographic identity, policy enforcement, human oversight, and tamper-proof audit logs — for any agent framework.

## The Problem

AI agents act autonomously. There is no standard way to prove what they did, enforce what they can do, or produce compliance audit trails. MandateZ solves all three.

## Install

```bash
npm install @mandatez/sdk
```

## Usage

```typescript
import { generateAgentIdentity, MandateZClient } from '@mandatez/sdk';

const identity = await generateAgentIdentity();
const client = new MandateZClient({
  agentId: identity.agent_id,
  ownerId: 'your_org_id',
  privateKey: identity.private_key,
  supabaseUrl: process.env.SUPABASE_URL!,
  supabaseAnonKey: process.env.SUPABASE_ANON_KEY!,
});

const event = await client.track({
  action_type: 'read',
  resource: 'emails',
});
// → signed, validated, emitted to your event stream
```

## What You Get

- **Agent Identity** — Ed25519 keypair per agent, unique `ag_` prefixed IDs
- **Signed Events** — every action produces a cryptographically signed, tamper-proof event
- **Policy Engine** — allow/block/flag rules with wildcard resource matching
- **Human Oversight** — pause execution, alert via Slack/webhook, auto-block on timeout
- **Compliance Reports** — JSON + PDF audit trail export
- **Framework Integrations** — LangChain, n8n, with more coming

## Integrations

### LangChain

```typescript
import { MandateZLangChainCallback } from '@mandatez/sdk';

const callback = new MandateZLangChainCallback(client);
const chain = new ChatOpenAI({ callbacks: [callback] });
```

### n8n

```typescript
import { MandateZN8nHook } from '@mandatez/sdk';

const hook = new MandateZN8nHook(client);
await hook.beforeExecution('wf_123', 'HTTP Request', inputData);
await hook.afterExecution('wf_123', 'HTTP Request', outputData, true);
```

## Architecture

Everything flows from one spine: the **Agent Event Stream**.

```
Agent Action → Policy Engine → Oversight Gate → Sign (Ed25519) → Emit to Stream
```

Every surface — SDK, dashboard, compliance engine, directory — reads the same stream. One data layer. No duplication.

## Documentation

- [Quickstart](https://mandatez.mintlify.app/quickstart)
- [SDK Reference](https://mandatez.mintlify.app/sdk/track)
- [Protocol Specification](./protocol/SPEC.md)

## Project Structure

```
packages/sdk/          → @mandatez/sdk (open source, free forever)
apps/dashboard/        → Next.js event monitoring dashboard
protocol/              → Open protocol specification
docs/                  → Documentation (Mintlify)
```

## License

MIT
npm package: @mandel59/erq
Description: Erq - Easy Relational Query Language
Author: Ryusei Yamaguchi
Latest version: 0.4.1

# Erq - Easy Relational Query Language

## Introduction

Erq is an alternative query language for relational databases. It is designed to be easy to learn and use, while being as expressive and powerful as SQL.

I originally used SQLite to analyze my own kanji database. However, the verbose and cumbersome syntax of SQL prevented me from doing ad hoc analysis quickly. So I created Erq, which simplifies the syntax of SQL.

## Quickstart

See [Quickstart](./doc/quickstart.md) for installation instructions, CLI examples, and a minimal `.erq` script.

## Usage

Erq CLI works like SQLite CLI. You can use it to query SQLite databases.

Basically, you can use Erq CLI like this:

```shell
erq your_database.db <your_query.erq >your_output.txt
```

Or you can use it interactively:

```shell
erq your_database.db
```

## Debug Logging

Erq writes debug information to `stderr`. You can opt into specific groups by setting the `ERQ_DEBUG` environment variable to a space- or comma-separated list of categories.

Available categories include:

- `sql` – SQL statements generated during script execution or imports
- `script` – script-specific helpers such as loop conditions
- `import` – SQL emitted when loading external data sources
- `lifecycle` – parent/child process lifecycle events
- `ipc` – IPC messages (e.g. completer results)
- `stack` – stack traces for caught exceptions
- `preprocess` – interpolation details while expanding ERQ expressions
- `general` – legacy bucket that enables all historical debug output

You can combine categories (e.g. `ERQ_DEBUG=sql,stack`) or use `1`, `true`, or `all` to enable every debug message.

During an interactive session you can inspect or change the same setting with the `.debug` dot command, for example `.debug sql stack` to enable only SQL and stack trace logging or `.debug off` to disable it again.

## Dot Commands

Inside the interactive CLI you can enter dot-prefixed utility commands. Use `.help` to list them or `.help COMMAND` to see detailed usage. Tab completion now suggests dot command names as well as arguments such as `.format` modes or `.debug` categories.

## Syntax Comparison with SQL

See [Syntax Comparison with SQL](./doc/syntax-comparison.md).