Skip to main content
Glama

LibXposed MCP Server

License Protocol LibXposed API Cloud Status

A structured, full-spectrum Model Context Protocol (MCP) server providing API references, architectural guides, code scaffolding, and legacy migration tools for modern LibXposed Android development.

Deployed globally on Cloudflare Edge with zero cold start.


Quick Setup

Connect directly to the deployed Cloudflare Edge endpoint without local installation.

IMPORTANT

Transport and Protocol Requirements

  • Endpoint Path: Use the root path (https://libxposed-mcp.ra1nify.workers.dev). Do not append /sse. Modern MCP clients communicate over stateless streamable-http at the root path.

  • Transport Field: Explicit MCP environments (such as DSH) require "transport": "streamable-http".

Client Configuration (DSH, Cursor, Windsurf, Claude Desktop)

{
  "mcpServers": {
    "libxposed": {
      "url": "https://libxposed-mcp.ra1nify.workers.dev",
      "transport": "streamable-http"
    }
  }
}

Web Dashboard: Visit https://libxposed-mcp.ra1nify.workers.dev for server health and tool discovery.


Option B: Local Stdio Mode

Run as a local process via standard input/output.

1. Build Bundle

npm install
npm run build

2. Configure Local Client

{
  "mcpServers": {
    "libxposed": {
      "command": "node",
      "args": ["<PATH_TO_PROJECT>/dist/index.js"]
    }
  }
}

Related MCP server: Android Source Explorer MCP Server

Architecture and Coverage

The server models 100% of all five LibXposed subprojects and legacy migration pathways:

  1. libxposed:api: Core hook interfaces (XposedInterface, XposedModule, Hooker, Chain, Invoker, CtorInvoker, HookHandle, HookBuilder, ExceptionMode, XposedInterfaceWrapper), module lifecycle events, and Javadoc references.

  2. libxposed:helper & helper-ktx: High-throughput reflection caching (Reflector), fluent matching chains (HookBuilder), dex analysis, and idiomatic Kotlin DSL.

  3. libxposed:service: Cross-process communication (RemotePreferences replacing legacy XSharedPreferences), framework IPC bindings (XposedService), target discovery (HookedTarget), hot reload protocols (HotReloadResult), Direct Boot compatibility, and AIDL specifications.

  4. libxposed:lint: API level compatibility constraints (@SinceApi(101/102)), internal API restrictions (@InternalApi), and lint checks.

  5. libxposed:example: Standard project templates (build.gradle.kts, AndroidManifest.xml, proguard-rules.pro, META-INF/xposed/java_init.list, ModuleMain.java, ModuleMainKt.kt).

  6. migration: 1:1 mapping definitions and structural transformation guides from legacy XposedBridge (de.robv.android.xposed.*) to modern LibXposed.


Available MCP Tools

All seven tools operate across both streamable-http and local stdio transports:

Tool Name

Parameters

Description

search_libxposed

query (string), module? (all, api, helper, service, lint, example, migration)

Search across classes, methods, constants, architecture guides, and migration rules.

get_api_doc

className (string), memberName? (string)

Query signatures, parameter specifications, sinceApi constraints, and Javadoc links.

get_helper_guide

topic (all, hook_builder, reflector, kotlin_dsl)

Retrieve HookBuilder patterns, Reflector caching mechanisms, and Kotlin DSL usage.

get_service_guide

topic (all, xposed_service, remote_preferences, hot_reload, direct_boot, aidl)

Access RemotePreferences IPC guides, reactive listener examples, and AIDL definitions.

get_scaffold

type (all, build_gradle, manifest, proguard, entry_list, java_module, kotlin_module)

Generate compile-ready project configurations and module skeletons.

migrate_legacy_code

legacySnippet? (string)

Provide 1:1 migration maps and code conversions from legacy XposedBridge to LibXposed.

check_api_compatibility

version (101, 102, all)

Inspect API 101/102 differences, breaking changes, and @InternalApi enforcement.


Verification and Testing

Execute the test suites to verify server behavior:

# Run stdio tool invocation test
npm test

# Run exhaustive edge-case test suite (34 cases)
npm run test:deep

# Run TypeScript static analysis
npm run typecheck

CI/CD and Deployment

Automated delivery is managed by GitHub Actions (.github/workflows/deploy.yml). Each push to master or main automatically type-checks, builds, and deploys the Cloudflare Worker.

Continuous Deployment Setup:

  1. Navigate to Settings > Secrets and variables > Actions in your GitHub repository.

  2. Add a new secret named CLOUDFLARE_API_TOKEN containing your Cloudflare API token (Workers:Edit permissions).

  3. Pushes to master will deploy directly to Cloudflare Edge using Node.js 22 and Wrangler v4.


License

Licensed under the Apache License 2.0.

Available Tools

7 tools
check_api_compatibilityA

Inspect LibXposed API version requirements (@SinceApi 101 vs 102), breaking changes, and prohibited @InternalApi usage.

Inputs: version (required).

get_api_docA

Retrieve detailed documentation, method signatures, parameters, return types, sinceApi version, and official Javadoc links for LibXposed core API classes.

Inputs: className (required), memberName.

get_helper_guideA

Get comprehensive guides and API references for libxposed:helper, including HookBuilder fluent discovery, Reflector reflection utilities, and Kotlin helper-ktx DSL.

Inputs: topic (required).

get_scaffoldB

Generate standard project scaffolds and configurations for LibXposed modules, including build.gradle.kts, AndroidManifest.xml, ProGuard/R8 rules, entry list, and Java/Kotlin module skeletons.

Inputs: type (required).

get_service_guideB

Get comprehensive guides for libxposed:service, including XposedService, XposedServiceHelper, modern RemotePreferences, HookedTarget process introspection, Hot Reload protocols, Direct Boot rules, and AIDL definitions.

Inputs: topic (required).

migrate_legacy_codeA

Convert legacy XposedBridge / EdXposed code (e.g., handleLoadPackage, findAndHookMethod, XC_MethodHook, XSharedPreferences) into modern, type-safe LibXposed code.

Inputs: legacySnippet.

search_libxposedA

Search across all LibXposed modules (api, helper, service, lint, example, migration) by keyword, class name, method name, or concept.

Inputs: query (required), module.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool has a distinct role: global keyword search, targeted API/helper/service documentation, scaffolding, migration, and compatibility checking. The only mild overlap is between search_libxposed and the get_* documentation tools, since a search may surface the same content, but the descriptions make the intended distinction clear.

    Naming Consistency5/5

    All names are snake_case with a leading verb (search_, get_, migrate_, check_) followed by a clear target. The pattern is predictable throughout and the resource is always obvious from the name.

    Tool Count5/5

    Seven tools is well-scoped for a documentation/guidance server covering a library ecosystem. Each tool maps to a distinct developer need (discover, read docs, scaffold, migrate, verify compatibility) with no filler.

    Completeness4/5

    The surface covers discovery, documentation for core/helper/service modules, scaffolding, migration, and version compatibility, which spans the main developer lifecycle. Minor gaps exist: the lint and example modules are only reachable via generic search, and there is no tool to enumerate modules or API versions directly.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides Android development assistance following NowInAndroid best practices, including architecture patterns, code generation for feature modules/ViewModels/repositories, and searchable documentation for Jetpack Compose and modularization.
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to query real AOSP and AndroidX source code on demand, offering class and method lookup, class member and hierarchy inspection, source-wide text/regex search, and optional LSP-powered cross-file definition, reference, and type resolution from a local offline cache.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI tools to retrieve and navigate actual AOSP and AndroidX source code on demand for accurate framework internals, with tools for class/method lookup, member listing, hierarchy, and source search. Optional LSP features add cross-file definitions, references, and type information.
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Provides AI assistants with on-demand, precise access to real AOSP and AndroidX source code, enabling class and method lookups, class member and hierarchy inspection, source-wide text/regex search, and optional cross-file definition, reference, and type resolution via LSP. Sources are synced locally for instant offline queries against framework internals like the Activity lifecycle, ViewModel restoration, and Compose internals.
      -