# io.github.shivam-app-developers/ai-optimizer (npm · @ai-optimizer/core)

MCP server that cuts AI coding agent token usage via framework-aware context optimization

- Trust score: 78/100 (medium)
- Change this week: +32
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@ai-optimizer/core`: 78/100 (this document), [markdown](https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core.md), [page](https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core)

## Channel facts

- Registry: `npm`
- Package: `@ai-optimizer/core`
- Version: `0.1.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (96 of 100), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (96 of 100), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to shivam-app-developers/ai-optimizer).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 57 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 71/100
  - AI-judged instruction clarity (good).
  - Tool/resource definitions use about 954 tokens (~86/item across 11 items; 11 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 23/100
  - Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add shivam-app-developers-ai-optimizer -- npx -y @ai-optimizer/core
```

### Codex

```bash
codex mcp add shivam-app-developers-ai-optimizer -- npx -y @ai-optimizer/core
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "shivam-app-developers-ai-optimizer": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@ai-optimizer/core"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add shivam-app-developers-ai-optimizer --command npx --arg -y --arg @ai-optimizer/core
```

### Hermes

```yaml
mcp_servers:
  shivam-app-developers-ai-optimizer:
    command: "npx"
    args: ["-y", "@ai-optimizer/core"]
```

### Other

```json
{
  "mcpServers": {
    "shivam-app-developers-ai-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "@ai-optimizer/core"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-02 (score 78, +42)

- [security improvement] Provenance: unverified → pass
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security] The attested source repository moved: shivam-app-developers/ai-optimizer
- [functional regression] Security disclosure: fail → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Schema quality: unverified → good
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Stability: unverified → 0.20
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] License: unverified → pass
- [functional] Licence: MIT

### 2026-08-01 (score 36, +10)

- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] Capabilities: pass → unverified

### 2026-07-31 (score 26, −20)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 46, +22)

- [functional improvement] Tool coverage: unverified → 100

### 2026-07-28 (score 24, −22)

- [functional regression] Tool coverage: 100 → unverified
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 46)

First indexed and scored.

## MCP tools (11)

### `optimized_read_file` (~121 tokens)

Read file (token-optimized)

Read a file from the workspace with framework-aware filtering. Skips files matching framework ignore patterns or .gitignore. Use this instead of the built-in Read tool to reduce token usage. Optionally pass startLine/endLine (1-indexed, inclusive) to read only a slice. Detected frameworks: javascript

Input parameters:

- `endLine` (integer): 1-indexed end line (inclusive)
- `path` (string, required): Path to the file, relative to the project root
- `startLine` (integer): 1-indexed start line (inclusive)

### `optimized_list_files` (~89 tokens)

List files (token-optimized)

List files in a directory with framework-aware ignore filtering. Skips node_modules, .venv, build/, dist/, generated files, etc. Optionally pass a glob pattern to narrow results. Detected frameworks: javascript

Input parameters:

- `directory` (string): Directory to list, relative to project root
- `pattern` (string): Optional glob pattern to filter results, e.g. "**/*.ts"

### `optimized_grep` (~119 tokens)

Grep across files (token-optimized)

Search file contents for a regex, scoped by directory and optional file glob, applying framework-aware ignore filters. Skips files larger than 2MB and caps at 100 matches. Detected frameworks: javascript

Input parameters:

- `directory` (string): Directory to search, relative to project root
- `filePattern` (string): Optional glob pattern to filter files, e.g. "**/*.ts"
- `flags` (string): Regex flags, e.g. "i" for case-insensitive
- `pattern` (string, required): Regex pattern to search for

### `optimized_diagnostics` (~103 tokens)

Get LSP diagnostics for a file (token-optimized)

Returns errors and warnings from the language server for a single file, plus narrow code slices around each diagnostic. Use this BEFORE calling optimized_read_file when the agent is trying to fix an error — it returns ~10 lines of context around each issue instead of the whole file. Detected frameworks: javascript

Input parameters:

- `contextLines` (integer): Lines of context around each diagnostic (default 10)
- `path` (string, required): Path to the file, relative to project root

### `read_symbol` (~166 tokens)

Read a symbol body via LSP (no whole-file read)

Resolves a symbol name (e.g. "UserRepository.getUser", "users::repository::get") via the language server's workspace/symbol API and returns just the symbol body. Use this when you need a function or class definition but not the rest of the file. Falls back to no-match when the LSP can't resolve the symbol. Detected frameworks: javascript

Input parameters:

- `contextLines` (integer): Lines of context to include before + after each symbol body
- `includeImports` (boolean): Prepend leading imports / package / use lines from the file
- `maxMatches` (integer): Cap on number of symbol matches returned (default 5)
- `query` (string, required): Symbol name, optionally container-qualified (Foo.bar / Foo::bar / Foo#bar)

### `strip_bash_noise` (~67 tokens)

Strip noise from shell command output (token-optimized)

Removes ANSI color codes, npm/maven/gradle progress lines, JVM reflective-access warnings, and collapses carriage-return progress bars. Pass the raw stdout/stderr from a Bash tool call here BEFORE keeping it in context.

Input parameters:

- `output` (string, required): Raw shell output to clean

### `get_optimizer_config` (~53 tokens)

Get optimizer config

Returns the merged effective configuration: defaults overridden by user-global config, then project .optimizerrc.json, then env vars. Use to check whether scheduling, work-stealing, telemetry, etc. are currently enabled.

### `set_optimizer_config` (~93 tokens)

Set optimizer config (writes to project .optimizerrc.json)

Writes a partial config patch to the project-level .optimizerrc.json (merging with whatever is already there). User-global config and env vars are NOT modified — those are managed out-of-band. Behavior-changing flags (scheduling, workStealing, telemetry) require explicit opt-in via this tool — they are off by default.

Input parameters:

- `patch` (object, required): Partial OptimizerConfig to merge into project config

### `budget_status` (~87 tokens)

Show conversation/day budget status

Reports the current per-session and per-day token consumption against configured caps. Caps are set via budgetCaps in .optimizerrc.json or AI_OPTIMIZER_BUDGET_PER_SESSION / AI_OPTIMIZER_BUDGET_PER_DAY env vars. When a cap is exceeded, optimized_read_file / list_files / grep / diagnostics refuse new calls until reset or until UTC midnight (day cap).

### `budget_reset` (~27 tokens)

Reset budget counters

Zeroes the per-session and per-day token counters. Use after intentionally clearing a budget breach.

### `optimizer_status` (~29 tokens)

Optimizer status

Returns active framework packs, detected project type, gitignore status, and cumulative token savings for this session.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core#diagnostics

## Score history

- 2026-08-03: 78
- 2026-08-02: 78
- 2026-08-01: 36
- 2026-07-31: 26
- 2026-07-30: 46
- 2026-07-28: 24
- 2026-07-27: 46

## Links

- npm package: https://www.npmjs.com/package/@ai-optimizer/core
- Socket report: https://socket.dev/npm/package/@ai-optimizer/core
- Repository: https://github.com/shivam-app-developers/ai-optimizer
- Changelog RSS feed: https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core/changelog.json
- HTML version of this page: https://verifymcp.io/servers/shivam-app-developers-ai-optimizer/ai-optimizer-core
