Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moss-mcp

Protocol-level governance for Model Context Protocol (MCP) using ML-DSA-44 post-quantum cryptography.

Overview

MOSS MCP integration signs ALL MCP tool calls with NIST FIPS 204 post-quantum cryptography. By intercepting at the MCP transport layer, MOSS governs every tool invocation regardless of the agent framework.

Approach Coverage Bypassable?
Framework SDKs Per-framework Yes
MCP Integration All tools No

Installation

pip install moss-mcp

Quick Start

from mcp import Client
from moss_mcp import wrap_mcp_client

# Wrap MCP client - all tool calls are now signed
moss_client = wrap_mcp_client(client, agent_id="my-agent")

# Use normally - signing happens automatically
result = await moss_client.call_tool("send_email", {
    "to": "user@example.com",
    "body": "Hello"
})

Integration Options

Option 1: Client Wrapper

from moss_mcp import wrap_mcp_client
moss_client = wrap_mcp_client(client, agent_id="my-agent")

Option 2: MCP Server

from moss_mcp import MOSSMCPServer

server = MOSSMCPServer(agent_id="email-service")

@server.tool()
async def send_email(to: str, body: str) -> str:
    return f"Sent to {to}"

Option 3: Middleware

from moss_mcp import MOSSMCPMiddleware

middleware = MOSSMCPMiddleware(
    agent_id="my-service",
    block_on_policy_violation=True,
)

Configuration

Variable Description Default
MOSS_API_KEY Enterprise API key None (local mode)
MOSS_API_URL API endpoint https://api.mosscomputing.com

Policy Enforcement

from moss_mcp.server import PolicyViolationError

try:
    await moss_client.call_tool("execute_trade", {"amount": 1000000})
except PolicyViolationError as e:
    print(f"Blocked: {e.reason}")

Causal Chaining

result1 = await sign_tool_request_async("analyze_data", {...}, agent_id="agent-1")

result2 = await sign_tool_request_async(
    "make_decision",
    {...},
    agent_id="agent-2",
    parent_sig=result1.signature_id
)

Links

License

MIT License - see LICENSE for details.

About

MOSS integration for Model Context Protocol (MCP) - Protocol-level governance for AI agent tools

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages