Skip to main content
Glama
Android Development MCP Server

Android Development MCP Server

by dpconde

[WIP] Android Development MCP Server

A Model Context Protocol (MCP) server that provides Android development assistance following NowInAndroid best practices. This server can be used with any MCP-compatible AI tool (Claude, GPT, Gemini, etc.).

Features

Tools Available

Tool

Description

get_quick_reference

Quick overview of patterns and available tools

get_architecture_reference

Full architecture documentation (Data, Domain, UI layers)

get_compose_patterns

Jetpack Compose UI patterns

get_modularization_guide

Module structure and dependencies

get_gradle_setup

Build configuration and convention plugins

get_testing_patterns

Testing approach with test doubles

generate_feature_module

Generate complete feature module code

generate_viewmodel

Generate ViewModel with UiState

generate_repository

Generate offline-first repository

search_documentation

Search across all documentation

Related MCP server: Android Source Explorer MCP Server

Quick Start

# Build and run with Docker Compose
docker-compose up -d

# Or build and run manually
docker build -t android-dev-mcp .
docker run -d -p 3000:3000 --name android-mcp android-dev-mcp

The server will be available at:

  • SSE endpoint: http://localhost:3000/sse

  • Health check: http://localhost:3000/health

Option 2: Local Development

# Install dependencies
npm install

# Build
npm run build

# Run in SSE mode (for network access)
npm start -- --sse

# Or run in stdio mode (for local CLI)
npm start

Connecting AI Clients

Claude Desktop

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux/Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "android-dev": {
      "transport": "sse",
      "url": "http://localhost:3000/sse"
    }
  }
}

Claude Code

claude mcp add android-dev --transport sse --url http://localhost:3000/sse

Other MCP Clients

Configure your MCP client with:

  • Transport: SSE

  • URL: http://localhost:3000/sse

Example Usage

Once connected, you can ask your AI assistant questions like:

  • "What's the recommended architecture for an Android app?"

  • "Generate a feature module for user-profile with package com.myapp"

  • "Show me the ViewModel pattern from NowInAndroid"

  • "How do I set up offline-first data sync?"

  • "Generate a repository for the Task entity"

  • "Search documentation for navigation"

API Endpoints

Endpoint

Method

Description

/sse

GET

SSE connection for MCP

/messages

POST

Message handling

/health

GET

Health check

Environment Variables

Variable

Default

Description

PORT

3000

Server port

MCP_TRANSPORT

sse

Transport mode (sse or stdio)

NODE_ENV

production

Node environment

Project Structure

android-dev-mcp/
├── src/
│   └── index.ts          # Main server code
├── references/           # Documentation files
│   ├── architecture.md
│   ├── compose-patterns.md
│   ├── gradle-setup.md
│   ├── modularization.md
│   └── testing.md
├── dist/                 # Compiled JavaScript
├── Dockerfile
├── docker-compose.yml
├── package.json
└── tsconfig.json

Extending the Server

Adding New Tools

Edit src/index.ts and add a new tool:

server.tool(
  "my_new_tool",
  "Description of what the tool does",
  {
    param1: {
      type: "string",
      description: "Parameter description",
    },
  },
  async ({ param1 }) => ({
    content: [{ type: "text", text: `Result for ${param1}` }],
  })
);

Adding New Documentation

  1. Add markdown files to references/

  2. Create a loader function in src/index.ts

  3. Register a new tool to expose it

License

MIT

References

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • 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.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI tools to retrieve and search actual AOSP and AndroidX source code on demand, including class lookup, method extraction, class members, hierarchy, source search, and optional cross-file navigation via LSP. It provides precise, offline-ready access to framework internals such as Activity lifecycle, ViewModel restoration, and Compose internals.
      -