Time Complexity MCP: Static Analysis Tool Feeds Big-O Complexity to AI Coding Agents

Time Complexity MCP is an MCP server that performs static analysis on code to determine Big-O time complexity, then feeds those values directly to AI coding agents. The tool bypasses the token consumption and potential inaccuracies that occur when frontier models attempt to analyze complexity themselves.
How It Works
The server parses code into Abstract Syntax Trees (ASTs) using tree-sitter, then analyzes them to detect:
- Loop nesting patterns
- Recursion patterns
- Known standard library costs
It reports per-function Big-O complexity with line annotations that AI agents can access as a tool.
What It Detects
The tool identifies specific complexity patterns:
.contains()inside aforloop → O(n²).sort()with.indexOf()in the comparator → O(n² log n)- Branching recursion like fibonacci → O(2ⁿ)
- Constant-bound loops like
for i in range(10)→ O(1)
Supported Languages
The tool currently supports JavaScript, TypeScript, Python, Java, Kotlin, and Dart.
Real-World Application
The developer ran the tool on its own codebase and found:
- O(n³) in the directory scanner
- O(n²) in the formatting utils
These issues were fixed based on the tool's own report, demonstrating practical self-improvement.
Availability
Time Complexity MCP is open source with prebuilt releases available at https://github.com/Luzgan/time-complexity-mcp.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude-voice: Local TTS with Word Highlighting for Claude Code
Claude-voice is a Python tool that adds local text-to-speech with real-time word highlighting to Claude Code's voice mode. It uses Kokoro TTS (82M parameters) running fully locally without API keys.

Signet: Open-Source Memory Layer for AI Coding Agents Hits 80% F1 on LoCoMo
Signet is an open-source memory system for AI coding agents that achieves 80% F1 on the LoCoMo benchmark, compared to 41% for standard RAG. It extracts memories after each session and injects relevant context before prompts, running locally with SQLite.

Agent Memory Protocol (AMP): Open Spec for Interoperable AI Agent Memory on Top of MCP
AMP defines a standard interface for persistent memory in MCP-compatible agents with six core verbs: encode, recall, forget, consolidate, pin, and stats. Includes compliance test suite and reference implementation.

Testing Local LLMs for Autonomous Code Generation: Quality vs. Speed Benchmark
A developer built a harness to test local LLMs on real Go code generation tasks, measuring compilation success, field extraction accuracy, and throughput. Results compare models across quality and speed.