npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arifos/mcp

v0.3.0

Published

arifOS MCP Client — TypeScript types and minimal client for Constitutional AI Governance (L2 Skills Adapter)

Readme

@arifos/mcp

L2 Skills Adapter — TypeScript client for the arifOS Constitutional AI Governance System.

F4 CLARITY: This package is a CABLE, not the KERNEL.
Governance authority resides exclusively in the PyPI arifos package.
This npm package only provides TypeScript types and a thin MCP transport client.


Installation

npm install @arifos/mcp
# or
pnpm add @arifos/mcp
# or
yarn add @arifos/mcp

Quick Start

HTTP Mode (Remote VPS)

import { createClient, ENDPOINTS } from '@arifos/mcp';

const client = await createClient({
  transport: 'http',
  endpoint: ENDPOINTS.VPS,  // https://arifosmcp.arif-fazil.com/mcp
});

await client.connect();

// Start a governed session
const { session_id } = await client.anchorSession('My research task');
console.log('Session:', session_id);

// Execute governed reasoning
const result = await client.reasonMind('What is quantum computing?');
console.log('Verdict:', result.verdict);  // SEAL | PARTIAL | SABAR | VOID | 888_HOLD
console.log('Floors passed:', result.floors.passed.length);

await client.disconnect();

stdio Mode (Local)

⚠️ SECURITY: Never hardcode secrets. Load from .env or a secrets manager.

import { createClient } from '@arifos/mcp';

const client = await createClient({
  transport: 'stdio',
  env: {
    // Load from environment — never commit these values
    ARIFOS_GOVERNANCE_SECRET: process.env.ARIFOS_GOVERNANCE_SECRET!,
    DATABASE_URL: process.env.DATABASE_URL!,
  },
});

await client.connect();
// ... use client
await client.disconnect();

Architecture

┌─────────────────────────────────────┐
│  Your Application (JS/TS)           │
│  ┌─────────────────────────────┐    │
│  │  @arifos/mcp (L2 Adapter)   │    │
│  │  ├── types.ts (mirrors)     │    │
│  │  ├── client.ts (transport)  │    │
│  │  └── langchain.ts (stub)    │    │
│  └───────────┬─────────────────┘    │
└──────────────┼──────────────────────┘
               │ MCP Protocol
┌──────────────▼──────────────────────┐
│  arifos (PyPI) — THE KERNEL         │
│  ├── core/ (13 Floors, Trinity)     │
│  ├── arifos_aaa_mcp/ (MCP server)   │
│  └── VAULT999 (immutable ledger)    │
└─────────────────────────────────────┘

Key Principle: This package has ZERO governance logic. All constitutional enforcement (F1-F13) happens server-side in the Python kernel. The npm client is a transport client that passes through whatever the kernel decides.


API Reference

createClient(config)

Create an MCP client connection to arifOS.

interface ArifOSClientConfig {
  transport: 'stdio' | 'http';
  endpoint?: string;          // Required for http
  env?: Record<string, string>; // Required for stdio
  timeout?: number;           // Default: 60000ms
  debug?: boolean;
}

Client Methods

| Method | Description | | :--- | :--- | | client.connect() | Establish MCP connection | | client.disconnect() | Close connection | | client.anchorSession(context?) | Start new governed session | | client.reasonMind(query, context?) | Execute 333_MIND reasoning | | client.apexJudge(action, risk_level?) | Get 888_APEX judgment | | client.callTool(name, params) | Call any of 13 canonical tools | | client.listTools() | Discover available tools |

Types

import type { 
  Verdict,        // 'SEAL' | 'PARTIAL' | 'SABAR' | 'VOID' | '888_HOLD'
  FloorCode,      // 'F1' | 'F2' | ... | 'F13'
  Stage,          // '000_INIT' | ... | '999_VAULT'
  VerdictEnvelope,
  ArifOSMetadata,
} from '@arifos/mcp';

Compatibility Matrix

| @arifos/mcp | Node.js | arifOS (PyPI) | Transport | Status | | :--- | :--- | :--- | :--- | :--- | | 0.2.0 | ≥18 | ≥2026.3.1 | HTTP/SSE | 🔄 Current | | 0.1.1 | ≥18 | 2026.2.22 | HTTP/SSE | ✅ Tested | | 0.1.0 | ≥18 | 2026.2.17 | HTTP/SSE | ✅ Stable |

Notes:

  • All versions tested against production VPS endpoint (arifosmcp.arif-fazil.com)
  • stdio transport tested locally with arifos>=2026.2.17
  • Verdicts observed: SEAL, PARTIAL, SABAR, VOID, HOLD, 888_HOLD

The 13 Canonical Tools

All tools return a VerdictEnvelope with { verdict, stage, session_id, floors, ... }.

Note on 888_HOLD: This verdict indicates an irreversible action requiring human approval. The call may remain pending until a human sovereign signs off. Handle this as an async event, not a timeout.

Governance Spine (8 tools)

| Tool | Stage | Purpose | | :--- | :--- | :--- | | anchor_session | 000_INIT | Session ignition & injection defense | | reason_mind | 333_MIND | AGI cognition & causal tracing | | recall_memory | 444_PHOENIX | Associative memory recall | | simulate_heart | 555_HEART | Stakeholder impact analysis | | critique_thought | 666_CRITIQUE | Self-critique & bias detection | | apex_judge | 888_APEX | Sovereign verdict + governance_token | | eureka_forge | 777_FORGE | Sandboxed action execution | | seal_vault | 999_VAULT | Immutable ledger commit |

Utility Tools (5 tools, read-only)

| Tool | Purpose | | :--- | :--- | | search_reality | Web grounding | | fetch_content | URL retrieval | | inspect_file | Filesystem inspection | | audit_rules | Governance rule audit | | check_vital | System health |


Error Handling

import { ArifOSError } from '@arifos/mcp';

try {
  await client.reasonMind('...');
} catch (error) {
  if (error instanceof ArifOSError) {
    console.log(error.code);   // 'CONNECTION_FAILED' | 'INVALID_RESPONSE' | ...
    console.log(error.stage);  // Stage where error occurred
    console.log(error.floor);  // Floor that triggered error (if any)
  }
}

Development

# Install dependencies
pnpm install

# Build
pnpm run build

# Type check
pnpm run typecheck

# Test
pnpm test

License

AGPL-3.0-only — Same as arifOS kernel.


Links

Ditempa Bukan Diberi — Forged, Not Given