Skip to content

Repository files navigation

Mada Chat

English · 简体中文

A small, native chat client for people who already have API keys.

Mada Chat connects your phone directly to the model provider you choose. There is no Mada account, no hosted backend, and no second inbox for your conversations. Add a provider, pick a model, and start chatting.

What it does

  • Connects to OpenAI Responses-compatible and Anthropic Messages-compatible APIs
  • Lets you add custom providers, base URLs, headers, and model lists
  • Streams text, reasoning, and tool calls as they happen
  • Renders Markdown, code blocks, search results, images, and file attachments
  • Keeps conversations on the device in SQLite
  • Stores API keys separately in the platform's secure storage
  • Includes light and dark themes, plus English and Simplified Chinese
  • Ships with a built-in web search tool that can be turned off

The app is deliberately narrow in scope. It does not have accounts, cloud sync, subscriptions, workspaces, voice features, or an analytics backend.

Data and privacy

Provider requests go from the device to the configured API endpoint. Mada Chat does not proxy them through its own server.

Data Stored in
API keys Expo SecureStore
Conversations and messages Local SQLite database
Providers, models, theme, language, and tool settings Local SQLite database

If web search is enabled and used, the search query is sent to Exa's public MCP endpoint. Normal model requests are subject to the privacy policy of the provider and endpoint you configure.

Supported APIs

Mada Chat currently speaks two wire protocols:

  • OpenAI Responses — OpenAI and services that implement the Responses API
  • Anthropic Messages — Anthropic and compatible services

Compatibility depends on the provider's implementation. An endpoint that only supports OpenAI Chat Completions is not enough; it needs Responses API support. Model capabilities such as vision, files, tools, and reasoning can be set per model.

Run it locally

You will need Node.js, Corepack, and either an Android or iOS development environment.

corepack enable
yarn install
yarn start

Useful commands:

yarn android          # open the Expo app on Android
yarn ios              # open the Expo app on iOS
yarn android:native   # build and run the native Android project
yarn ios:native       # generate/build and run the native iOS project

Before opening a pull request:

yarn typecheck
yarn lint
yarn test
yarn test:shared

Repository layout

src/                  Mobile UI, state, storage, tools, and platform bridge
packages/core/        Shared chat and provider types
packages/protocols/   OpenAI Responses and Anthropic Messages adapters
packages/tools/       Tool registry and execution
packages/config/      Shared configuration helpers
android/              Native Android project

The main state machine lives in src/state/chatController.ts. UI screens subscribe to it through a small platform bridge, while protocol-specific request and streaming code stays under packages/protocols.

Project status

Mada Chat is usable, but still young. The phone layout is the focus today; tablet adaptation, cloud sync, voice, and realtime conversations are not on the current roadmap.

Issues and focused pull requests are welcome. If you are adding a provider, please target one of the existing protocols or keep the protocol boundary clean enough for others to reuse.

License

Apache License 2.0

Mada Chat is an independent project and is not affiliated with OpenAI, Anthropic, or Exa. Any API fees are charged by the provider you configure.

About

A native, local-first BYOK chat client for iOS and Android

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages