Skip to content

feat(mcp): add default-enabled stdio query server - #1

Merged
MG1937 merged 1 commit into
MG1937:devfrom
TsingShui:feat/mcp
Oct 19, 2026
Merged

MG1937 merged 1 commit into
MG1937:devfrom
TsingShui:feat/mcp

Conversation

@TsingShui

Copy link
Copy Markdown
Contributor

Summary

  • Add a default-enabled, optional mcp feature and a rust_ASC mcp stdio server for CodeMode and standard MCP clients.
  • Expose four read-only tools: getclass, listclass, getmanifest, and findrefs, with typed schemas, structured results/errors, and absolute local input paths.
  • Bound query concurrency and support cooperative cancellation. Share input normalization and analysis with the CLI while preserving its direct string-output path.
  • Document installation and a generic client configuration. Existing CLI commands and CI configuration are unchanged; --no-default-features excludes MCP and its dedicated dependencies.

Validation

  • Release tests: 67 passed with default features; 57 passed with --no-default-features.
  • Explicit MCP feature check: cargo check --locked --no-default-features --features mcp.
  • Clippy: cargo clippy --all-targets --locked -- -A clippy::uninit_vec (allowance for the existing loader implementation).
  • Real Pi CodeMode smoke test, including concurrent queries and structured errors.
  • CLI output equivalence against upstream on two real APKs, with and without MCP enabled.
  • cargo install --path . --locked verified using an isolated installation root.

Scope

Queries are stateless and return complete results: no HTTP/SSE, server-side JavaScript, CLI subprocess wrapper, export, cache, or pagination. Cancellation is cooperative; this does not add hard deadlines or parser crash isolation.

Expose getclass, listclass, getmanifest and findrefs as typed, read-only MCP tools using direct Rust queries. Support stateless requests, bounded concurrency and cooperative cancellation without changing CLI result allocation paths.

Share query input normalization between CLI and MCP. Add protocol and output regression tests, feature gating and concise Pi CodeMode documentation.
@MG1937
MG1937 changed the base branch from main to dev October 19, 2026 11:10
@MG1937
MG1937 merged commit 16f8c17 into MG1937:dev Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants