ArchGuard MCP

v1.0.0
io.github.yashwant938/arch-guard-mc Checked 8 hours ago Published 12 days ago

Architecture drift auditor (Tarjan SCC), zero-downtime SQL guardian & distributed-systems math.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

audit_code_snippet

Audit source files for circular dependencies (Tarjan SCC), coupling metrics (Ca/Ce/I), and 12 production reliability/security/SOLID anti-patterns (N+1 loops, missing HTTP timeouts, unbounded caches, check-then-act races, missing idempotency keys, SQL/command injection). Returns health score + Mermaid graph.

ParameterTypeDescription
files *array
maxFileLinesinteger

check_migration_safety

Audit PostgreSQL/MySQL/SQLite DDL migrations for production table locks and rolling-deploy breaks, generating a 3-phase Expand-Contract plan.

ParameterTypeDescription
sql *string
dialectstring

estimate_system_capacity

Compute exact distributed systems capacity math: avg/peak QPS, storage, bandwidth Gbps, Redis RAM, shard count & bottleneck, Little's Law concurrency. Supports Big Tech presets or custom inputs.

ParameterTypeDescription
avgLatencyMsnumber
avgReadBytesnumber
avgWriteBytesnumber
cacheHitRationumber
daunumber
mediaBytesPerWritenumber
peakMultipliernumber
presetstring
readWriteRationumber
replicationFactornumber
retentionYearsnumber
writesPerUserPerDaynumber

simulate_quorum_and_tail_latency

Verify Dynamo quorum (W+R>N), Raft fault tolerance, and Jeff Dean fanout tail-latency amplification (1-(1-p)^K) with hedged RPC comparison.

ParameterTypeDescription
fanoutCountinteger
readQuoruminteger
replicationFactorinteger
singleNodeP50Msnumber
singleNodeP99Msnumber
singleNodeSlowProbabilitynumber
writeQuoruminteger

simulate_consistent_hashing

Run deterministic FNV-1a+fmix32 consistent hashing ring simulation measuring load skew & scale-out key remapping % vs modulo hashing.

ParameterTypeDescription
nodeCountinteger
sampleKeysinteger
virtualNodesinteger

recommend_architecture

Generate a Staff-level distributed system architecture blueprint from workload traits (consistency, R/W ratio, contention, real-time need, latency SLO).

ParameterTypeDescription
consistencystring
contentionLevelstring
dataModelstring
latencySloMsnumber
readWriteProfilestring
realtimeNeedstring
scaleTierstring