io.github.0xmortuex/mort-mcp

السجل الرسمي أدوات المطورين

Write, type-check and run Mort code, with language spec and stdlib lookup.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package mort-mcp
Claude Code
claude mcp add mort-mcp -e 'MORT_HOME=<MORT_HOME>' -- uvx mort-mcp==0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "mort-mcp": {
            "command": "uvx",
            "args": [
                "mort-mcp==0.1.0"
            ],
            "env": {
                "MORT_HOME": "<MORT_HOME>"
            }
        }
    }
}

متغيرات البيئة

  • MORT_HOME Path to a checkout of github.com/0xmortuex/Mort (enables docs and examples)

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. mort-mcp
  2. Install
  3. Tools
  4. Tests
  5. License

mort-mcp

Let an AI agent write a language it has never seen.

Mort is a statically typed systems language that compiles to C. It's the language MORT OS is written in. No model has Mort in its training data, so an agent asked to write it will guess Rust-like syntax and get it wrong.

mort-mcp gives the agent what a human newcomer would use: a fast type checker with precise errors, a way to run programs, the language spec to search, and the exact signatures of the standard library.

> mort_check
FAILED:
error: <source>:4:1: argument 1 of 'strings.starts_with' expects []const u8, got *u8
        if strings.starts_with("mortos", "mort") {

> mort_std strings
// First byte offset of `needle` in `text`, or None if it does not occur.
pub fn index_of(text: []const u8, needle: []const u8) -> Option<u64>;
...

> mort_run
[exit 0]
1

Install

You need the Mort compiler. The simplest setup is a checkout, which also brings the docs and examples:

git clone https://github.com/0xmortuex/Mort
pip install mort-mcp ziglang     # ziglang = zero-install C backend for mort_run
claude mcp add mort --env MORT_HOME=/path/to/Mort -- mort-mcp

Without MORT_HOME, mort-mcp uses a mortc on your PATH (pip install git+https://github.com/0xmortuex/Mort). Checking, running and std lookup all work that way. mort_docs and mort_examples need the checkout.

Tools

ToolWhat it does
mort_checkType-check source text or files without building. Fast, and needs no C compiler. Returns diagnostics as file:line:col with the source line.
mort_runCompile and run, with stdin, args and a timeout. Reports output and exit code.
mort_emit_cShow the generated C. freestanding=True shows the kernel-mode output.
mort_formatFormat with the official formatter (mortc fmt).
mort_stdList std modules, or show one module's public API: exact signatures, struct fields and doc comments.
mort_docsSearch the language specification and reference docs, e.g. "resource struct cleanup" or "integer overflow".
mort_examplesList or read the compiler's example programs.
mort_versionCompiler and language version, and where the compiler was found.

Every tool calls mortc through its command-line interface, and reads std signatures and docs from the installed compiler. Answers therefore match the version you're running, even as the language changes.

Tests

pip install ".[test]" "ruff==0.16.0" "mypy==2.3.0" ziglang
ruff check src tests && mypy --strict src
MORT_HOME=/path/to/Mort pytest tests

Without MORT_HOME, only the unit tests and the MCP handshake test run. CI checks out the latest Mort and also runs every night, so a change to the compiler's CLI or docs layout shows up as a failing build.

License

MIT

الأسئلة الشائعة

ما هو io.github.0xmortuex/mort-mcp؟

Write, type-check and run Mort code, with language spec and stdlib lookup.

كيف أثبّت io.github.0xmortuex/mort-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add mort-mcp -e 'MORT_HOME=<MORT_HOME>' -- uvx mort-mcp==0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.0xmortuex/mort-mcp إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.0xmortuex/mort-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.0xmortuex/mort-mcp؟

ينشره 0xmortuex. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.