ap
Provides zero-Python SQL querying over SQLite database files, enabling agents to inspect and query SQLite data directly.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Install in 10 Seconds, Then Forget About It
No Python, no Node, no Playwright, no Docker, and zero new commands to memorize. One line installs the native ap binary and automatically wires your AI Desktop Assistants, IDEs & CLIs (Claude Desktop, OpenClaw, Hermes, Cursor, Windsurf, VS Code, Claude Code, Codex, OpenCode, Gemini CLI, Qwen Code, Pi, Goose, Antigravity, Grok):
Pinned & verifiable (recommended):
Official MCP Registry:
io.github.xgbtxy/ap(search) — five cross-platform.mcpbbundles with SHA-256 pinned inserver.json.Docker MCP:
glama.json+ rootDockerfile(CI-verified stdio handshake, 37 tools):docker build -t ap-mcp . && docker run -i --rm -v "$PWD:/workspace:ro" ap-mcpCargo:
cargo install --git https://github.com/xgbtxy/ap --tag v2.96.2 --lockedRelease binary + checksum: download from v2.96.2, then verify against
SHA256SUMS(sha256sum -c SHA256SUMS --ignore-missing, orGet-FileHash -Algorithm SHA256on Windows).Antigravity: copy the self-contained
plugin/bundle and runplugin/install.ps1/plugin/install.sh.
Quick one-liner (tracks main, unpinned):
Windows (PowerShell):
curl.exe -fsSL https://raw.githubusercontent.com/xgbtxy/ap/main/install.ps1 | iexmacOS / Linux:
curl -fsSL https://raw.githubusercontent.com/xgbtxy/ap/main/install.sh | shPrefer direct download? Grab the standalone binary (Windows x64
.zip· macOS Apple Silicon · macOS Intel · Linux x64 · Linux ARM64) and runap init. Remove cleanly anytime viaap uninstall.
v2.96.2 Official Antigravity Plugin Bundle: Install the self-contained
plugin/bundle (mcp_config.json--profile core,<15msSessionStartrepo snapshot hook,rules/AGENTS.md,skills/ap-primitives, and 1-commandplugin/install.ps1/plugin/install.sh), plus--max-mem-mb/--max-ram-mbaliases inap-winjob.
v2.95.0 Windows Agent Kit: One-command Windows setup & health audit via
scripts/install-windows-agent-kit.ps1,ap-winjobLow Memory/I/O Priority (--io-low) + EcoQoS process cage,ap-hookquiet_frontier1-line coordinator meter &canonical_path_shieldNTFS junction/symlink resolution. See Windows Agent Kit Benchmarks.
Related MCP server: AKIMCP
Why We Built ap: Fixing Where AI <thinking> Derails
Saving tokens is not the primary goal—it is a natural byproduct.
When we audited 101,108 real tool calls and raw <thinking> traces across coding agents on Windows and macOS, we found that models rarely fail because they "lack intelligence." They get slow, confused, and write sloppy code because 5 real-world bottlenecks hijack their working memory:
Where AI | What Happens Without | How |
1. Reading, Diffing & Searching Code, Data & Binaries(AST, Hashline, Semantic Diff, Archives, PE/ELF, IPC) | Chokes on Word/Excel/PDF/SQLite/ |
|
2. Orientation, Surface, Variants & Browser/API/Win32 QA(Mapping, Deps, HTTP Roles/HAR, WS, Win32) | Blind |
|
3. Safe Creation & Multi-File Refactors(Hashline Anchors, Codex Diffs, AST Codemod & Checkpoints) | Naive find-replace corrupts comments/strings, multi-hunk diffs fail on duplicate blocks, or edits lose BOM/CRLF/modes or lack named checkpoints. |
|
4. OS Quoting Crashes, Resource Cages & Doom Loops(Windows/Mac Shell, Win32 Job Cage, Policy Hooks & Log Noise) | Hits |
|
5. Deep Verification, Structured Memory & Pi Cache(6-Gate QA, AI-Surface, 0.33ms 10K-Rule Memory, Worktree Auto-ID, 22 Pi Patches) | Burns 11k+ schema tokens/turn, misses supply-chain/AI-surface risks, fragments | MCP ( |
Architecture & Direction: Universal Core + On-Demand Harness & Model Adapters
+-------------------------------------------------------------------+
| 3. On-Demand Adapters (Selected per Harness x Model Family) |
| - Harness hooks/MCP wiring: `ap init -a <harness>` / profiles |
| - Declarative profile CLI: `ap profile show|set|recommend|reset` |
| - Optional runtime patches: `ap pi patch` (Pi v1.5+/v1.6) |
| - Model-tier economics: KV-cache TTL keep, sieve limits, |
| `--profile core|deferred` schema slimming |
+-------------------------------------------------------------------+
| 2. Empirical Driver: Real Harness & Model Execution Telemetry |
| - Offline zero-PII process logs (`ap audit --maintainer`) |
| - Pinpoints where real agents stall across harnesses & models |
+-------------------------------------------------------------------+
| 1. Universal Core (`ap` / `ap.exe` Single Pure-Rust Binary) |
| - Model- & harness-agnostic physical primitives: files, AST, |
| binaries/archives, SQLite, HTTP/WS/CDP, OS shield, `ap mcp` |
+-------------------------------------------------------------------+Universal Core First: Keep durable physical primitives—reading/searching code, docs, binaries & archives, Tree-sitter AST navigation & safe patching, OS/shell quoting recovery, SQLite SQL, and browser/API verification—inside one dependency-free Rust core usable everywhere via CLI and
37typedap mcptools.Driven by Multi-Harness & Multi-Model Reality: Prioritize work from empirical execution friction logs across real harnesses (
Claude Code,Codex,Pi,OpenCode,Cursor,Gemini CLI,Antigravity,Grok, etc.) and model tiers via offline, zero-PIIap audit --maintainerrather than speculative prompting.Composed On Demand: End users run Universal
ap+ only the adapters for their chosen harness and model (e.g.,ap init -a <harness>,ap pi patch, or--profile deferred), incurring zero token or runtime tax for unused frameworks and allowing adapters to retire cleanly as upstream hosts or models evolve.Native CLI Layer for Minimal / Freehand-Style Harnesses (Windows & Linux): Built for minimalist agent loops that deliberately avoid MCP tool-schema bloat—giving frontier models zero-prefix CLI observation & editing primitives (
ap sievedisk-filtering,ap read --symbol/--hashline,ap splice) alongsideap-winjobnative Windows process-group timeout/kill and--scrub-secrets(*KEY*/*SECRET*/*TOKEN*) parity.
How Do I Use It? (Zero Workflow Change)
Just talk to your coding agent in plain language—even a 1-sentence beginner request on a
$0free agent works out of the box.Whenever you want to inspect the efficiency gains, run
ap stats(orap doctorfor an environment check):
$ ap stats
[ap stats] Coding-Agent Efficiency & Thinking-Flow Ledger (100% offline)
------------------------------------------------------------------------
Accelerated Agent Steps : 28 actions
Thinking Derailments Healed : 11 Windows/shell crashes prevented before retry loops
1-Shot Edits & Browser Gates : 14 verified (Tree-sitter AST + Headless Edge/Chrome + 0-slop)
Working-Memory Noise Filtered: 612.4 KB -> 19.2 KB (-96.9% log/context clutter)
Byproduct Token Savings : ~186,800 wasted tokens avoidedReal Windows 11 End-to-End Results (Zero Fabrication)
Measured head-to-head on Windows 11 across $0 free coding agents and commercial CLIs on beginner 1-sentence prompts, legacy refactors, non-coding office tasks, and empty-directory random apps:
Coding Agent & Real Task | Without | Code Quality & Self-Correction | Wasted Tokens Avoided |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Coding Agent & Real Task | Without | Code Quality & Self-Correction | Wasted Tokens Avoided |
|
|
|
|
|
|
|
|
|
|
| Zero custom PE/ELF parser needed |
|
|
|
|
|
|
| Zero custom VLQ / diff audit scripts |
|
|
|
|
|
| Mutation Kill Rate: | 6-gate proof receipt cut calls |
|
|
|
|
|
| Test Mutation Kill Rate: | Killed all 3 surviving boundary/logic bugs |
|
|
| Fused 5 verification gates into 1 pass |
|
|
|
|
|
|
| Model ran extra subset-sum fuzzer |
Co-Maintain ap With Your Own AI
ap improves through a 4-Source Recursive Self-Improvement Loop: (1) survey external community issues & mature OSS tools, (2) measure local execution friction (100% offline, zero private data), (3) craft minimal Pure-Rust primitives, and (4) prove real Before-vs-After gains via a reviewer-first PR map:
# Preview your local zero-PII numeric bottlenecks mapped to ap source files (6 harnesses; safe to inspect first):
ap audit --maintainerWant your AI to co-maintain with you? Grab the ready-to-paste prompt in CONTRIBUTING.md (includes privacy-first opt-outs if you prefer not to scan raw local logs + strict anti-misuse guardrails).
Submitting a PR? Use .github/PULL_REQUEST_TEMPLATE.md — it requires an exact
file:symbol/lineChange Map and Before/After table so maintainers can review and merge in minutes.
Zero-Coupling Single Binary: 1 native Rust binary backed by 7 isolated crates (
crates/ap-{atlas,splice,probe,sieve,guard,recall,baton}) with0sibling crate dependencies, bundled SQLite FTS5, 6 compiled Tree-sitter C grammars (Py/TS/JS/Go/Rust/C), and390total idle frontmatter tokens.Reproduce Micro-Benchmarks: Run
ap bench(seebench/results.json).Engineering Docs:
Co-Maintaining
ap& 4-Source Recursive Prompt (CONTRIBUTING.md) | 共同维护指南 (CONTRIBUTING.zh-CN.md) | PR Spec (.github/PULL_REQUEST_TEMPLATE.md)Core R&D Philosophy & Evolution (
docs/HANDBOOK.md) | 中文研发手册 (docs/HANDBOOK.zh-CN.md)System Architecture (
docs/DESIGN.md) | 架构设计 (docs/DESIGN.zh-CN.md)Workflow Playbook (
docs/PLAYBOOK.md) | 实战手册 (docs/PLAYBOOK.zh-CN.md)Pi Runtime Maintenance (
docs/PI_RUNTIME.md) | Pi 运行时维护 (docs/PI_RUNTIME.zh-CN.md)
Privacy, Scope & Responsible Use
100% Local & Offline Telemetry:
ap statsandap audit --maintainerrun strictly locally with zero cloud uploads;ap audit --maintaineremits anonymized numeric friction counters only (never prompts, code, file paths, or credentials).Responsible Engineering Scope & Anti-Misuse:
apis built exclusively for software engineering, debugging, QA verification, and authorized defensive security/configuration hygiene on systems you own or have permission to test. Do not misuse it for unauthorized access or harmful activity.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Your company's tools, memory and Automations for ChatGPT, Claude or any MCP agent. Open source.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI coding agents and local LLMs to store and recall project memory, compact verbose logs, look up code symbols, create and rewind workspace snapshots, detect risky commands and loops, pack context optimally, and draft tokens through MCP tools.102Apache 2.0
- FlicenseNot gradedqualityAmaintenanceExposes a governed suite of 38 tools over a single OAuth-gated MCP endpoint, letting web-based AI clients such as Claude, ChatGPT, and Grok read and edit files, run whitelisted shell commands, search, query SQLite, use Git, automate browsers and DevTools, manage background tasks, reach localhost services, and control the clipboard, notifications, ports, and Postman. This turns remote AI chats into secure operators of a local machine without granting unrestricted shell access.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to perform everyday developer chores as MCP tools — organizing and batch-renaming files, searching contents, hashing, converting timestamps, encoding/decoding, converting CSV and JSON, OCR, clipboard and screenshot access, zipping, running allowlisted commands, and managing processes. Destructive actions default to dry-run previews, and commands, renames, and process kills are constrained by allowlists and PID-plus-name matching so agents stay safe.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables supervised, crash-resilient autonomous AI pair programming through nine MCP tools that checkpoint task progress in an atomic local DAG ledger, keep the machine awake during long runs, summarize repositories within a token budget, count tokens and costs across models, and rotate accounts before quota runs out. All state stays in a sandboxed project-local directory with zero telemetry, so long multi-step agent sessions survive crashes, context limits, and premature stopping.1Apache 2.0