axint
The Axint MCP server helps AI agents generate native Swift code for Apple platforms (App Intents, SwiftUI, WidgetKit, and app scaffolds) from minimal TypeScript or JSON input, reducing token usage significantly.
Scaffold TypeScript intents (
axint_scaffold): Generate a starter TypeScript intent file by providing a PascalCase name, description, optional domain, and optional parameters.Compile TypeScript to Swift (
axint_compile): Convert a full TypeScriptdefineIntent()definition into a native Swift App Intent, with optional Info.plist and.entitlementsXML fragments.Validate TypeScript definitions (
axint_validate): Dry-run validation of TypeScript intent code returning diagnostics, error codes, and fix suggestions without generating Swift output.Compile from minimal JSON (
axint_compile_from_schema): Skip TypeScript entirely — send ~20 tokens of JSON to generate Swift for intents, SwiftUI views, WidgetKit widgets, or full app scaffolds. The most token-efficient mode for AI agents.List bundled templates (
axint_list_templates): Discover available built-in reference templates by ID.Fetch template source (
axint_template): Retrieve the full TypeScript source of a specific bundled template (e.g.,send-message,create-event).
Compiles TypeScript definitions into native Apple platform code including App Intents for Siri, SwiftUI views, WidgetKit widgets, and full app scaffolds for iOS/macOS development.
Generates production-ready Swift code for iOS applications including App Intents, SwiftUI views, WidgetKit widgets, and complete app scaffolds from TypeScript definitions.
Compiles TypeScript definitions into native macOS application components including App Intents, SwiftUI views, settings scenes, and full app scaffolds.
Provides the runtime environment for the Axint compiler and MCP server, enabling compilation of Apple platform code from TypeScript/JSON definitions.
Hosts the Axint compiler package (@axintai/compiler) for installation and distribution of the Apple platform code generation tools.
Supports Python as an input language alongside TypeScript and JSON, feeding into the same intermediate representation for Apple platform code generation.
Generates idiomatic, production-ready Swift code with native type fidelity (int → Int, double → Double, date → Date, etc.) from TypeScript/JSON/Python definitions.
Compiles TypeScript definitions using the TypeScript compiler API (same as tsc) with full type fidelity into native Apple platform Swift code.
Generates Xcode-compatible Swift code, plist files, and entitlements for Apple platform development that can be directly integrated into Xcode projects.
The compression layer for AI agents on Apple
AI coding agents pay per token. Apple's API surfaces — App Intents, SwiftUI, WidgetKit — are verbose. A single widget requires a TimelineEntry, a TimelineProvider, an EntryView, and a Widget struct before you've written a line of business logic.
Axint compresses all of that. One TypeScript definition compiles to idiomatic, production-ready Swift with zero boilerplate. An intent compresses ~4×. A view compresses ~4×. A widget compresses 13×.
┌───────────────────────────────────────────┐
│ defineIntent() defineView() │ TypeScript / Python / JSON
│ defineWidget() defineApp() │
└───────────────────┬───────────────────────┘
│ axint compile
┌─────────┼─────────┐─────────┐
▼ ▼ ▼ ▼
┌────────┐ ┌───────┐ ┌────────┐ ┌──────┐
│ .swift │ │ .swift│ │ .swift │ │.swift│
│ .plist │ │ │ │ │ │ │
│ .entl. │ │ │ │ │ │ │
└────────┘ └───────┘ └────────┘ └──────┘
App Intent SwiftUI WidgetKit App
for Siri View Widget ScaffoldRelated MCP server: xcode-mcp
Why Axint
Four Apple surfaces, one compiler. App Intents, SwiftUI views, WidgetKit widgets, and full app scaffolds all compile from the same pipeline.
Real TypeScript AST parser. Uses the TypeScript compiler API (same as
tsc), not regex. Full type fidelity and diagnostics with line/column spans.MCP-native with JSON schema mode. Thirteen tools exposed to any MCP client. The
axint.schema.compiletool accepts minimal JSON (~20 tokens) and returns compiled Swift — AI agents skip TypeScript entirely and save even more tokens.Native type fidelity.
int → Int,double → Double,date → Date,url → URL,duration → Measurement<UnitDuration>. Default values and optionality preserved end-to-end.150 diagnostic codes (
AX000–AX999) with fix suggestions and color-coded output. Intent, entity, view, widget, app, Swift concurrency, and Live Activities validators each have dedicated error ranges.Sub-millisecond compile. The axint.ai playground runs the full compiler in-browser with zero server round-trip.
500 tests. Parser, validator, generator, emit paths, views, widgets, apps, watch mode, sandbox, MCP, Swift concurrency, and Live Activities — all covered.
Cross-language IR. The intermediate representation is language-agnostic JSON. TypeScript, Python, and raw JSON all feed into the same generator. New language frontends plug in without touching the Swift emitter.
Apache 2.0, no CLA. Fork it, extend it, ship it.
Quick start
npm install -g @axint/compiler
# Or run without installing
npx @axint/compiler compile my-intent.ts --stdoutIntent
import { defineIntent, param } from "@axint/compiler";
export default defineIntent({
name: "CreateEvent",
title: "Create Calendar Event",
description: "Creates a new event in the user's calendar.",
domain: "productivity",
params: {
title: param.string("Event title"),
date: param.date("Event date"),
duration: param.duration("Event duration", { default: "1h" }),
location: param.string("Location", { required: false }),
},
});View
import { defineView, prop, state, view } from "@axint/compiler";
export default defineView({
name: "EventCard",
props: {
title: prop.string(),
date: prop.date(),
},
state: {
isExpanded: state.boolean(false),
},
body: [
view.vstack({ alignment: "leading", spacing: 8 }, [
view.text("entry.title"),
view.conditional("isExpanded", [view.text("entry.date")]),
]),
],
});Widget
import { defineWidget, entry, view } from "@axint/compiler";
export default defineWidget({
name: "EventCountdown",
displayName: "Event Countdown",
description: "Shows time until the next event.",
families: ["systemSmall", "systemMedium"],
entry: {
eventName: entry.string("Untitled"),
minutesUntil: entry.int(0),
},
body: [
view.vstack({ alignment: "center", spacing: 4 }, [
view.text("entry.eventName"),
view.text("entry.minutesUntil"),
]),
],
});App
import { defineApp, scene, storage } from "@axint/compiler";
export default defineApp({
name: "WeatherApp",
scenes: [
scene.windowGroup("WeatherDashboard"),
scene.settings("SettingsView", { platform: "macOS" }),
],
appStorage: {
useCelsius: storage.boolean("use_celsius", true),
lastCity: storage.string("last_city", "Cupertino"),
},
});Compile any of them:
axint compile my-intent.ts --out ios/Intents/
axint compile my-view.ts --out ios/Views/
axint compile my-widget.ts --out ios/Widgets/
axint compile my-app.ts --out ios/App/Watch mode
For iterative development, axint watch recompiles on every save:
axint watch ./intents/ --out ios/Intents/ --emit-info-plist --emit-entitlements
axint watch my-intent.ts --out ios/Intents/ --format --swift-build150ms debounce, inline errors, and optional swift build after each successful compile.
MCP server
Axint ships with axint-mcp, a Model Context Protocol server for Claude Desktop, Claude Code, Cursor, Windsurf, and any MCP client.
{
"mcpServers": {
"axint": {
"command": "axint-mcp",
"args": []
}
}
}Thirteen tools (dotted names — legacy underscore aliases still work):
Tool | What it does |
| Generate a complete feature package from a description |
| Suggest Apple-native features for a given domain |
| Generate a starter TypeScript intent from a description |
| Full pipeline: TypeScript → Swift + plist + entitlements |
| Dry-run validation with diagnostics |
| Minimal JSON → Swift (token-saving mode for AI agents) |
| Validate existing Swift against Axint's build-time rules |
| Auto-fix mechanical Swift errors (concurrency, Live Activities) |
| List bundled reference templates |
| Return the source of a specific template |
| Get a quick-start guide for Axint |
| Create a new intent from parameters |
| Create a new widget from parameters |
The schema mode is the key optimization for agents — instead of generating TypeScript and then compiling, agents send ~20 tokens of JSON and get compiled Swift back directly.
Diagnostics
150 diagnostic codes across eight validators:
Range | Domain |
| Compiler / Parser |
| Intent |
| Swift output |
| View |
| Widget |
| App |
| Swift build rules |
| Swift 6 concurrency |
| Live Activities |
error[AX100]: Intent name "sendMessage" must be PascalCase
--> src/intents/messaging.ts:5:9
= help: rename to "SendMessage"See docs/ERRORS.md for the full reference.
Supported type mappings
TypeScript | Swift | Default value support |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| — |
|
| ✓ (e.g. |
|
| — |
|
| ✓ |
Try it in your browser
No install required: axint.ai/#playground runs the entire compiler in-browser with zero server round-trip.
Requirements
Node.js 22+
Any OS: macOS, Linux, Windows
Xcode 15+ (only to ship the generated Swift to an Apple platform)
Project structure
axint/
├── src/
│ ├── core/ # Parser, validator, generator, compiler, types, IR
│ ├── sdk/ # defineIntent(), defineView(), defineWidget(), param/prop/state/entry helpers
│ ├── mcp/ # MCP server (13 tools including JSON schema mode)
│ ├── cli/ # axint CLI (compile, watch, validate, eject, init, xcode)
│ └── templates/ # Intent template registry (25 templates)
├── python/ # Python SDK with native Swift codegen
├── extensions/ # Claude Code, Codex, Cursor, Windsurf, Zed, JetBrains, Xcode
├── spm-plugin/ # Xcode SPM build plugin
├── tools/ # swift-syntax helper binary (POC)
├── tests/ # 500 vitest tests
├── examples/ # Example definitions
└── docs/ # Error reference, research, assetsContributing
We review PRs within 48 hours. Good places to start:
Browse
good first issueissuesAdd a template for a common use case
Improve diagnostics with better fix suggestions
See CONTRIBUTING.md. Apache 2.0, no CLA.
Roadmap
See ROADMAP.md. Highlights:
Four compilation targets: intents, views, widgets, apps
MCP server with JSON schema mode (6 tools)
91 diagnostic codes with fix suggestions
--watchmode with--swift-buildVS Code / Cursor extension
Python SDK with native Swift codegen
SPM build plugin for Xcode + Xcode project plugin
axint ejectfor zero-dependency Swift outputCross-language IR bridge (TS, Python, JSON)
defineApp()— full app scaffold compilationdefineExtension()— app extension compilationAxint Cloud (hosted compilation)
License
Apache 2.0 — fork it, extend it, ship it. No CLA.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/agenticempire/axint'
If you have feedback or need assistance with the MCP directory API, please join our Discord server