Skip to main content
Glama

M2M Sentinel SDK & MCP Server

Official multi-language client library, Model Context Protocol (MCP) server, and Coinbase AgentKit ActionProvider for M2M Sentinel — deterministic EVM bytecode capability observations and common-proxy resolution for autonomous applications operating on Base. Callers own transaction policy.

This export labels npm 1.2.8 as a local release candidate, not a verified published artifact. This candidate version does not establish registry publication or installability. The install commands below use the last-verified npm release 1.2.7.

npm version PyPI version License: MIT Smithery


Try Base USDC without a wallet or API key

This quickstart uses Base USDC, a published allowlisted sample at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. The response contains factual capability evidence and limitations, not a safety guarantee or transaction advice. The live demo can be rate limited (HTTP 429 with Retry-After) or unavailable when upstream evidence sources fail (HTTP 503).

curl --fail-with-body https://api.m2msentinel.com/v1/demo/audit/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
npm install m2m-sentinel-sdk@1.2.7
const { M2MSentinelClient } = require('m2m-sentinel-sdk');
(async () => {
  const client = new M2MSentinelClient();
  const result = await client.demoAudit('0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913');
  console.log(JSON.stringify(result, null, 2));
})().catch((error) => { console.error(error.message); process.exitCode = 1; });
pip install m2m-sentinel==1.2.7
from m2m_sentinel import M2MSentinelClient

client = M2MSentinelClient()
result = client.demo_audit("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913")
print(result)

Other addresses receive only the public preview. Full /v1/audit/:address analysis remains protected by an API key or an explicitly authorized x402 payment; the demo never pays silently. The client does not automatically retry or fall back to a protected route after a demo error. The source SDK export includes a runnable no-credential JavaScript example at examples/try_public_demo.js; it is not included in the last-verified npm 1.2.7 artifact.


Related MCP server: Crest Counterparty Intelligence

⚡ 1. Model Context Protocol (MCP) Server

Connect M2M Sentinel directly to Claude Desktop, Cursor, Windsurf, or any MCP-compliant LLM agent.

Option A: 1-Click via Smithery

npx -y @smithery/cli mcp add M2M-Sentinel/m2m-sentinel-sdk --client claude

Option B: Local Stdio (claude_desktop_config.json)

{
  "mcpServers": {
    "m2m-sentinel": {
      "command": "npx",
      "args": ["-y", "m2m-sentinel-sdk@1.2.7"],
      "env": {
        "M2M_SENTINEL_API_KEY": ""
      }
    }
  }
}

Option C: Remote Streamable HTTP

  • Current MCP endpoint: https://api.m2msentinel.com/mcp

  • Legacy HTTP+SSE compatibility: https://api.m2msentinel.com/sse with messages at https://api.m2msentinel.com/messages


🤖 2. Coinbase AgentKit Integration

import { AgentKit } from "@coinbase/agentkit";
import { m2mSentinelActionProvider } from "m2m-sentinel-sdk";

const agentKit = await AgentKit.from({
  walletProvider,
  actionProviders: [
    m2mSentinelActionProvider({
      apiKey: process.env.M2M_SENTINEL_API_KEY
    })
  ]
});

📦 3. JavaScript / TypeScript Client

Authenticated SDK quickstart

npm install m2m-sentinel-sdk@1.2.7
const { M2MSentinelClient } = require('m2m-sentinel-sdk');

const client = new M2MSentinelClient({ apiKey: process.env.M2M_SENTINEL_API_KEY });

async function main() {
const audit = await client.auditContract('0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913');
console.log('Proxy Detected:', audit.audit.proxyResolution.isProxy);
console.log('Proxy Target:', audit.audit.proxyResolution.targetAddress);
console.log('Capabilities:', audit.audit.verdict.executableCapabilities);
console.log('Evidence:', audit.audit.dissection.capabilities);
}

main().catch(console.error);

🛡️ Base Account wallet_sendCalls Guard

The public SDK includes guardWalletSendCalls, a customer-side execution-identity boundary for Base Account / EIP-5792 batches. It preflights the anchor call and evaluates its caller policy before scheduling any remaining call, then pins remaining calls to the first trusted block identity in waves of at most four. Each settled wave is validated and policy-checked in ascending request-index order before a later wave starts; a failure or rejection stops later scheduling. The original detached request is forwarded only after all checks pass. It does not sign, broadcast, custody funds, infer inner UserOperation semantics, or make a safety claim. See examples/base_account_paymaster_guard.js for a no-network fixture.


🐍 4. Python Client

pip install m2m-sentinel==1.2.7
from m2m_sentinel import M2MSentinelClient

client = M2MSentinelClient()
result = client.demo_audit("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913")
print(result)

Transaction-specific preflight example

The public repository includes a standalone, mock-only transaction boundary example at examples/transaction_preflight.js. From this repository root, run:

node examples/transaction_preflight.js

It observes one caller-supplied Base transaction, passes the observation to a caller-owned policy, and reaches only a mock signing/send callback. It refuses to continue on unverified evidence, unresolved execution, an observation mismatch, or a missing Diamond selector mapping. It never signs or sends a transaction; optional live mode uses only a caller-supplied API-key header and remains the caller's responsibility.


💳 5. Autonomous x402 Micropayments (Headless M2M)

import { x402SignerClient } from "m2m-sentinel-sdk";

const client = new x402SignerClient({
  walletSigner: myAgentWallet,
  baseUrl: "https://api.m2msentinel.com"
});

const result = await client.request("/v1/audit/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913");

📜 License

MIT License. Copyright (c) 2026 M2M Sentinel.

Available Tools

6 tools
m2m_audit_contractA
Read-onlyIdempotent

Inspect static bytecode capabilities (e.g. mint, pause, freeze, upgradeability slots), common proxy target resolution, and coverage index for a single Base contract address. Factual capability observation only, not a safety or exploitability guarantee. Distinguishable from m2m_get_service_status (infrastructure status) and legacy score-only endpoints.

Inputs: address (required).

m2m_get_dex_liquidityA
Read-onlyIdempotent

Fetch aggregate pool reserve, depth, and volume metrics across tracked Base DEX liquidity pools. Reports tracked-pool metrics only and does not filter by individual trading pair; contrast with m2m_get_token_price, which observes token spot prices.

Inputs: no named parameters.

m2m_get_gas_metricsA
Read-onlyIdempotent

Fetch current Base gas price in wei/gwei with RPC provenance for the upstream observation. Read-only telemetry; does not inspect contract code, return token/DEX pricing, or authorize or submit transactions.

Inputs: no named parameters.

m2m_get_service_statusA
Read-onlyIdempotent

Fetch operational status, upstream Base RPC quorum status, and persistence availability for M2M Sentinel infrastructure. Does not return blockchain or market telemetry.

Inputs: no named parameters.

m2m_get_token_priceA
Read-onlyIdempotent

Fetch the median Base DEX spot price in USD across up to five deepest indexed pools, with contract address, decimals, and pool provenance for one allowlisted token symbol (e.g. USDC, WETH, AERO). Does not return historical price series; contrast with m2m_get_dex_liquidity, which returns aggregate pool reserve depth rather than an asset price.

Inputs: symbol (required).

m2m_get_whale_signalsA
Read-onlyIdempotent

Fetch up to 50 tracked recent high-value ERC-20 transfer signals on Base with transaction hashes, token/sender/receiver addresses, amounts, and valuation provenance. Observes large on-chain transfer events without query parameter limits; does not inspect contract bytecode or query DEX pricing.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: contract auditing, gas metrics, DEX liquidity, token price, whale signals, and service status. Descriptions explicitly contrast overlapping tools (e.g., token price vs. liquidity) to eliminate ambiguity.

    Naming Consistency5/5

    All tools follow a consistent m2m_ verb_noun pattern using snake_case (e.g., audit_contract, get_gas_metrics). The only variation is the verb (audit vs. get), but that is appropriate given the different action.

    Tool Count5/5

    6 tools is well-scoped for a blockchain monitoring server, covering contract auditing, gas, liquidity, price, whale signals, and service status. Each tool earns its place with no redundancy.

    Completeness5/5

    The tool surface fully covers the server's stated purpose of read-only blockchain telemetry and monitoring. It includes all essential data types (gas, price, liquidity, whale activity, contract audit, and status) with no obvious dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      basescope is a read-only onchain safety layer for AI agents: it answers "is this token/contract/approval safe?" on Base and EVM chains (honeypot/rug checks, risky-approval detection, verified-source lookup, balances, ENS/Basenames, gas, prices), with no private keys and no required API keys.
      13
      6 npm
      MIT