Code Oracle
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Code Oracleverify this patch for cycle issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Oracle
Sub-50ms neuro-symbolic verification for AI coding agents.
Structural AST topology validated by Tarjan SCC and a non-autoregressive decision model (Laya).
The Problem: Autoregressive Verification Overhead
When coding agents (Claude Code, Cursor, OpenCode, Codex) inspect code modifications, they face three operational bottlenecks:
Confirmation Bias: Generative models reviewing their own diffs frequently rationalize their own logic errors.
Latency and Token Overhead: Re-evaluating complete files through a frontier model introduces 2,000 to 6,000 ms of round-trip latency and consumes output tokens on conversational explanations.
Tool Schema Bloat: Standard MCP servers inject sprawling multi-tool schemas into the prompt context on every turn, reducing effective agent window capacity.
Related MCP server: Symbol Delta Ledger
Architecture
Code Oracle decouples code generation from verification. It runs locally as an independent evaluation layer.
Instead of generating conversational critiques, Code Oracle constructs a localized AST graph using Tree-sitter, checks topological invariants symbolically, and evaluates residual drift using Laya (a 421M parameter ModernBERT decision model).
Verification Pipeline
flowchart TD
Agent["š¤ AI Coding Agent / Developer<br/>(Claude Code, Cursor, Antigravity)"]
subgraph Engine ["ā” CODE ORACLE ENGINE (< 50ms)"]
direction TD
Stage1["Stage 1: Tree-sitter & k-Hop TopoSlice<br/>⢠Multi-language AST parsing (< 8ms)<br/>⢠Extracts callers, callees & interfaces<br/>⢠Isolates k-hop neighborhood graph"]
Stage2{"Stage 2: Deterministic Symbolic Gate<br/>Tarjan's SCC & Contract Invariants"}
HardVeto["š« Hard Veto Early Exit (< 25ms)<br/>Instant rejection on cycles & signature drift"]
Stage3["š§ Stage 3: Laya ModernBERT 421M Head<br/>⢠Evaluates linearized Micro-DSL subgraph<br/>⢠In-memory resident CPU inference<br/>⢠Calibrated continuous risk scoring (0.0 - 1.0)"]
Stage1 --> Stage2
Stage2 -- "Cycle / Invariant Breach" --> HardVeto
Stage2 -- "Topologically Valid" --> Stage3
end
Agent -->|"(1) Proposes Patch / Refactor"| Stage1
HardVeto -->|"(2) Fast-Fail Verdict"| Verdict["šÆ Structured Typed Verdict<br/>VERDICT: APPROVED / REJECTED<br/>Risk Score & Invariant Telemetry"]
Stage3 -->|"(2) Calibrated Verdict"| VerdictKey Characteristics
Sub-50ms Target Latency: In-memory execution using ONNX Runtime or MLX on local CPU and Apple Silicon.
Zero Output Token Tax: Emits structured status codes and calibrated probability vectors (
Pass,Fail,Risk Score) without text generation.Lean Tool Surface: Exposes a single endpoint (
verify_patch), avoiding multi-tool schema overhead in agent context.Offline Execution: Runs without external API calls or network egress.
Architectural Targets vs. Frontier LLM Review
Metric | Autoregressive LLM Code Review | Code Oracle (Neuro-Symbolic) |
Response Latency | 2,500 ms to 6,500 ms | < 50 ms (Local In-Memory) |
Output Token Cost | 150 to 500 tokens / check | 0 tokens |
Monetary Cost | $0.003 to $0.02 / call | $0.00 (Local / Offline) |
Verification Method | Probabilistic text generation | Deterministic AST + Calibrated Score |
Context Consumption | Multi-KB schema injection | Single-tool lean schema (< 100 tokens) |
Operational Scope and Boundaries
Code Oracle operates within explicit technical boundaries:
Evaluator, Not Author: Code Oracle does not generate, autocomplete, or refactor code. It evaluates proposed patches against existing syntax and topology.
Syntax Requirement: Patches must produce a valid Tree-sitter AST. Syntactically invalid inputs fail at Stage 1 before invoking the decision model.
Static Topology Bounds: Focuses on structural invariants, dependency cycles, and interface compatibility. It does not replace dynamic test suites, integration environments, or runtime race condition detectors.
Memory Footprint: Requires approximately 1.2 GB of RAM to hold the 421M parameter model in memory for single-pass inference.
Pretrained Model Weights
The fine-tuned Laya ModernBERT 421M decision head weights are hosted on Hugging Face:
š¤ wxsys/code-oracle-laya-421m
Code Oracle automatically downloads and caches these weights to ~/.cache/code_oracle/weights/ on first invocation when --neural is enabled, or reads from local ./weights/ if present.
Roadmap
Architecture Specification & Subgraph Slicing Design
TopoSlice AST Slicer & Incremental Workspace Indexer
Tarjan's SCC Cycle Detector & Deterministic Symbolic Gate
Persistent In-Memory Laya Decision Head & Fine-Tuned Weights (
wxsys/code-oracle-laya-421m)Lean FastMCP Server interface (
verify_patch)Agentic
SKILL.mddistribution for Claude Code, Cursor, and AntigravityGit pre-commit & pre-push verification hook with unblock toggle (
code-oracle hook)Multi-language AST extractors for Tier 1 languages (Python, TypeScript, Go, Rust)
Synthetic mutation and training dataset mining engine (
tools/mine_top_repos.py)Google Colab Multi-Language Fine-Tuning Pipeline (
notebooks/Laya_Code_Oracle_Finetune.ipynb)CPU Thread Auto-Tuning & Hybrid Neuro-Symbolic Latency Optimization
Dead Code & Orphan Symbol Scanner (
code-oracle dead-codevia 0-in-degree graph reachability)Static Performance Anti-Patterns & Resource Leak Detector (
code-oracle perf-lint: nested loop complexity, unclosed handles)Official Git Tagging & GitHub Release pipeline (
v0.1.0)Python Package Wheel Distribution & PyPI Publishing (
pip install code-oracle)Multi-Agent Ecosystem Integrations (Claude Code, Cursor, Antigravity, OpenCode, and Cline sidecars)
(Maybe / Experimental) Synthetic User & Local Load Simulation Plugin (AST endpoint discovery + lightweight concurrent stress tester)
License & Attribution
Distributed under the Apache-2.0 License. See LICENSE for details.
Architect & Maintainer:
Wahyu Febri Tamtomo (@wahyuzero)
Founder of frugaldev.biz.id (Radical AI Efficiency & Frugal Computing).
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Change-aware CI validation and affected-test guidance for coding agents.
Change-aware CI validation and affected-test guidance for coding agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to query a pre-built semantic knowledge graph of code, reducing token usage and tool calls. Supports 16 tools for code exploration, analysis, and context building.5 npm7MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to efficiently query code context via a symbol graph, reducing token usage by up to 20x.534 npm487-
- FlicenseAqualityDmaintenanceProvides AI coding agents with dependency analysis, impact detection, and build verification tools.14-
- AlicenseNot gradedqualityDmaintenanceSupercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.MIT