# InMargin > Open-source writing assistant for the Mac and Windows. It reads the text field you are typing in (Slack, Mail, the browser, any app) through the system's accessibility API (macOS Accessibility, Windows UI Automation), underlines what could be better, and gives a hint before the answer. Any language, any OpenAI-compatible model, prompts in plain text files. What you send becomes a writing memory (samples, mistakes, recurring patterns, per language) that agents read through an MCP server and apps through an API and a TypeScript SDK. Self-hostable (server AGPL-3.0, app and packages MIT). ## Use it from an agent - MCP server at `/mcp`: streamable HTTP, OAuth 2.1 protected resource. Tools: check_text, rewrite_text, writing_profile, list_patterns, list_mistakes, search_writing, get_sample. ## Build on it - OpenAPI spec at `/v1/openapi.json`: check, rewrite, samples, issues, patterns, stats. - TypeScript SDK: `@inmargin/sdk`, a typed method per operation. ## Run it - [Source and docs](https://github.com/inmargin/inmargin#readme): the desktop app (Tauri, Rust; macOS and Windows), the server (Bun, Postgres, Redis).