Akf

io.github.HMAKT99Published by GitHub account HMAKT99v1.6.2Updated Oct 25, 2026

Trust metadata for AI agents — check files before building on them, stamp verified work.

Overview

AI-generated overview

Local MCP server that lets an assistant check, stamp, validate, audit and scan files for AKF trust metadata before building on them.

What you can do
Check and score files: one-line trust check, effective trust score, and security scan for AKF metadata across many formats. Stamp and embed: attach AKF trust metadata to DOCX, PDF, images, Markdown, code and other formats. Validate and extract: check .akf files against the specification and pull out claims, provenance and trust scores. Audit and detect: run compliance audits against frameworks such as EU AI Act, SOX, HIPAA, GDPR, NIST AI RMF and ISO 42001, and run AI-specific threat detections. Create claims and replay recorded probe recipes, optionally executing the recorded command.
When to use it
Useful when several agents or sessions work on the same files and you want to avoid re-verifying work that was already checked, or when you need provenance, trust scores and compliance-style audits attached to documents and code.
Requirements
Runs as a local process over stdio. Needs Python 3.10 or newer, the mcp-server-akf package (pip install mcp-server-akf), and the akf and mcp libraries. Configured by adding a server entry with the python command and the mcp_server_akf module to the client's MCP config. No accounts, API keys or environment variables declared.
Before you install
The replay_file tool with run=true executes the recorded command, which is arbitrary code; only use it on files you trust. Stamping, embedding and creating claims write metadata into files, so work on copies or version-controlled files. Audit results are produced by the tool and should not be treated as formal compliance certification.

Installation

In SourceWeft

  1. Open Akf in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-server-akf

mcp-name: io.github.HMAKT99/akf

MCP (Model Context Protocol) server that exposes 10 AKF tools to AI agents. Any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Windsurf, etc.) can check, stamp, validate, audit, and scan files using the Agent Knowledge Format.

A stamp costs ~15 tokens. Re-verifying costs 15,000. Agents stamp what they verify; the next agent calls check_file and builds on it instead of redoing the work.

Installation

bash
pip install mcp-server-akf

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "akf": {      "command": "python",      "args": ["-m", "mcp_server_akf"]    }  }}

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "akf": {      "command": "python",      "args": ["-m", "mcp_server_akf"]    }  }}

Tools

ToolDescription
check_fileOne-line trust check — can an agent build on this file without re-verifying? (OK / LOW / STALE / UNSTAMPED)
create_claimCreate an AKF claim with trust metadata
validate_fileValidate an .akf file against the spec
scan_fileSecurity scan any file for AKF metadata
trust_scoreCompute effective trust score for a claim
stamp_fileStamp trust metadata onto any file (20+ formats)
audit_fileCompliance audit (EU AI Act, SOX, HIPAA, GDPR, NIST, ISO 42001)
embed_fileEmbed AKF metadata into DOCX, PDF, HTML, images, etc.
extract_fileExtract AKF metadata from any supported format
detect_threatsRun 10 AI-specific security detections

Quick usage

Once configured, ask your AI agent:

"Stamp report.docx with AKF trust metadata, confidence 0.9, evidence 'quarterly review complete'"

The agent will call stamp_file through MCP and attach provenance automatically.

You can also run the server directly for testing:

bash
python -m mcp_server_akf

Verification state in tool results (experimental)

On mcp 2.x, a tool result for a file (any tool called with path) carries that file's verification state in _meta under the vendor key dev.akf/trust:

json
"_meta": {  "dev.akf/trust": {    "v": "1",    "status": "OK",    "trust": 0.7447,    "evidence": ["human_review"],    "agent": "claude-code",    "age_days": 4  }}

status is computed live (OK / LOW / STALE / UNSTAMPED), so a client sees whether the file changed since it was verified. The key is absent when the result isn't about a file. Clients that don't know the key ignore it.

To annotate your own server's results:

python
from mcp_server_akf.meta import TRUST_META_KEY, trust_meta
meta = trust_meta(path)return CallToolResult(content=[...], _meta={TRUST_META_KEY: meta} if meta else None)

To read it in a client:

python
result = await client.call_tool("extract_file", {"path": "report.md"})state = (result.meta or {}).get("dev.akf/trust")if state and state["status"] == "OK":    ...  # verified and unchanged: build on it without re-verifying

Multi-Agent Support

The MCP server works seamlessly with multi-agent orchestration platforms:

  • Agent Identity: Create and verify agent cards via akf agent create / akf agent verify
  • A2A Protocol: Export/import agent cards for cross-platform discovery via akf agent export-a2a
  • Team Certification: Use akf certify --team for per-agent trust breakdowns in CI
  • Delegation: Trust ceilings cap delegate output when agents hand off work
  • Team Streaming: Multi-agent sessions with per-agent claim attribution

Supports: Claude Agent Teams, Copilot Cowork, Codex multi-agent, and any A2A-compatible platform.

Requirements

  • Python >= 3.10
  • akf >= 1.0.0
  • mcp >= 1.0.0

Source: packages/mcp-server-akf/README.md at commit 2a0142e

Tools

11

replay_file

Replay-verify a stamp's falsifiable probe recipe. Default inspects only: shows the recorded command and whether the claim's inputs drifted since issuance. With run=true, EXECUTES the recorded command (arbitrary code — only for files you trust) and returns CONFIRMED / CONFIRMED_DRIFTED (succeeded against diverged inputs) / REFUTED / UNREPLAYABLE.

Parametersrunpathrequired

check_file

One-line trust check before building on a file. Returns OK (fresh stamp, trust above threshold — skip re-verification), LOW (trust below threshold), STALE (modified after stamping or claims expired — re-verify), or UNSTAMPED (no metadata). Use this before re-reading, re-testing, or re-deriving work another agent already verified.

Parameterspathrequiredthreshold

create_claim

Create an AKF claim with trust metadata. Returns a JSON object with the claim, trust score, and provenance.

Parameterssourcecontentrequiredconfidencerequiredai_generated

validate_file

Validate an .akf file against the AKF specification. Returns validity status, validation level (0-3), errors, and warnings.

Parameterspathrequired

scan_file

Security scan any file for AKF trust metadata. Works with .akf, .docx, .pdf, .html, .md, .json, images, and any format with a sidecar.

Parameterspathrequired

trust_score

Compute the effective trust score for a claim using AKF's trust computation engine. Factors in confidence, authority tier, and temporal decay.

Parameterscontentrequiredconfidencerequiredauthority_tier

stamp_file

Stamp AKF trust metadata onto any file. Supports DOCX, PDF, images, Markdown, code, and 20+ formats. Use this after creating or modifying files.

Parameterspathrequiredagentevidenceconfidenceclassification

audit_file

Run compliance audit on an AKF file against regulatory frameworks (EU AI Act, SOX, HIPAA, GDPR, NIST AI RMF, ISO 42001).

Parameterspathrequiredregulation

embed_file

Embed AKF trust metadata into any supported file format (DOCX, PDF, HTML, images, Markdown, etc.).

Parameterspathrequiredsourcecontentrequiredconfidenceclassification

extract_file

Extract AKF trust metadata from any supported file format. Returns claims, classification, provenance, and trust scores.

Parameterspathrequired

detect_threats

Run 10 AI-specific security detections on an AKF file: hallucination risk, knowledge laundering, classification downgrade, trust degradation, and more.

Parameterspathrequired

Version history

2
  1. v1.6.2LatestOct 24, 2026
  2. v1.6.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts