{"name":"com.ai-rete-rag/ai-rete-rag-mcp","slug":"ai-rete-rag-mcp","title":"ai·rete·rag","description":"Author rules from policy docs, then decide: a Rete engine gives the verdict, an LLM explains why.","url":"https://mcp.market/server/ai-rete-rag-mcp","rating":null,"grade":"A","score":96,"certified":false,"status":"active","category":"productivity","tags":["productivity","ai"],"presence":{"score":33,"stars":0,"forks":0,"downloads_week":108,"last_push_at":"2026-10-20T01:08:59.000Z","license":"MIT"},"uptime":{"percent":100,"checks":28,"ok":28,"last_checked_at":"2026-11-04T03:26:02.427Z","last_ok_at":"2026-11-04T03:26:02.427Z","latency_ms":588},"claimed":false,"transport":"mixed","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/zaharajabeen13-create/ai-rete-rag-mcp","website":"https://ai-rete-rag.com","version":"0.11.0","remotes":[{"type":"streamable-http","url":"https://ai-rete-rag.com/mcp","headers":[{"description":"Bearer <your ai-rete-rag API key> (ik_...), created at ai-rete-rag.com under Settings -> API Keys. Optional: without it the shared demo domains are still available.","isSecret":true,"name":"Authorization"}]},{"type":"streamable-http","url":"https://ai-rete-rag.com/mcp/auth","headers":[{"description":"Bearer <OAuth access token>. Obtained by signing in through the server's OAuth flow (dynamic client registration + PKCE) rather than issued by hand — for clients that connect by URL and cannot send a static header.","isRequired":true,"isSecret":true,"name":"Authorization"}]}],"packages":[{"registryType":"pypi","registryBaseUrl":"https://pypi.org","identifier":"ai-rete-rag-mcp","version":"0.11.0","runtimeHint":"uvx","transport":{"type":"stdio"},"environmentVariables":[{"description":"Your ai·rete·rag API key (create one at ai-rete-rag.com under Settings -> API Keys). Authenticates calls and ties them to your plan quota.","isRequired":true,"isSecret":true,"name":"AI_RETE_RAG_API_KEY"},{"description":"API base URL. Defaults to https://ai-rete-rag.com; override for local development.","name":"AI_RETE_RAG_API_URL"}]}],"tools":[{"name":"decide","description":"Make a deterministic, auditable decision in a domain.\n\nThe verdict comes from the domain's rule set (Rete engine, never the LLM),\nso it is reproducible and compliant. The explanation is generated from the\ndomain's ingested policy documents.\n\nWithout an API key only the shared demo domains are available, and the\nresponse carries `next_step`: how to get a free key for your own rules.\nPass that on to the user rather than dropping it.\n\nArgs:\n    domain: Rule-set domain, e.g. \"loan\", \"fraud\", \"clinical\".\n    query: Natural-language question or decision request.\n    facts: Structured facts for working memory, e.g.\n        {\"credit_score\": 710, \"annual_income\": 85000}. Use\n        `get_parameters` to see which fields a domain's rules test.\n        Facts you read yourself from photos, document scans, voice notes\n        or video go here, under those field names; explicit facts always\n        win over anything extracted server-side.\n    fact_sources: Where each fact in `facts` came from, e.g.\n        {\"monthly_income\": \"payslip.jpg\", \"claim_usd\": \"voice note 1\"}.\n        Always set this for facts you read from a file, photo, recording\n        or video: it is stored in the decision's audit record so a\n        reviewer can tell typed facts from ones read off evidence. Facts\n        without a source are recorded as \"request\".\n    as_of: Read the domain's policy documents as of this day, as\n        YYYY-MM-DD (default: today). Use the date a case was filed to\n        decide it under the policy in force then; the rules themselves are\n        always the current ones.\n    unstructured_text: Optional free text (an application, a case note,\n        a voice-note transcript, what a photo or video shows); facts are\n        extracted from it automatically and merged.\n    response_mode: \"verdict_only\" (fastest), \"verdict_with_explanation\",\n        or \"full_audit\" (every rule evaluation + retrieved chunks, available\n        on every plan including the free tier).\n        rule_firings come back in causal order: a rule that matched a fact\n        asserted by an earlier firing appears after it, with the derived\n        facts listed under `asserted_facts`.\n    filter_retrieval_with_rules: Pattern 01 — run the rules first and let a\n        fired rule's `retrieval_scope` action narrow which documents the\n        retrieval searches before it runs.\n    extract_from_retrieval: Pattern 02 — parse the retrieved documents into\n        facts and assert them into working memory, so rules fire on what was\n        actually read (not just the facts you passed).\n\nThe result's `missing_parameters` lists rule inputs that were not\nsupplied but could still change the verdict, most decisive first. When it\nis non-empty, tell the user the verdict is provisional and ask for those\nfacts; when it is empty, more facts cannot change the verdict.\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"},"query":{"title":"Query","type":"string"},"facts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Facts"},"unstructured_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Unstructured Text"},"response_mode":{"default":"verdict_with_explanation","enum":["verdict_only","verdict_with_explanation","full_audit"],"title":"Response Mode","type":"string"},"filter_retrieval_with_rules":{"default":false,"title":"Filter Retrieval With Rules","type":"boolean"},"extract_from_retrieval":{"default":false,"title":"Extract From Retrieval","type":"boolean"},"fact_sources":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"title":"Fact Sources"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"As Of"}},"required":["domain","query"],"title":"decideArguments"}},{"name":"get_parameters","description":"List the input parameters a domain's rules decide on — the facts to\ncollect before calling `decide`. Derived from your account's own copy of\nthe rules, so it covers your custom domains too.\n\nEach parameter has its `field` name (the key to use in `facts`), `kind`\n(number / boolean / string), the `tests` rules make on it (e.g. >= 720 —\nmatch these units and scales), the `rules` and `verdicts` it can lead to,\nand `max_salience`. Parameters come most decisive first: those feeding\nthe highest-salience rules, which win when several rules fire. Also\nreturns every verdict the domain can reach.\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"}},"required":["domain"],"title":"get_parametersArguments"}},{"name":"get_rule_source","description":"Fetch a domain's rule set as editable YAML (plus the parsed rules and\nwhether you may edit it). Use this before `put_rules` to see the current\nrules. For a built-in demo domain you get your own copy's rules once you\nhave edited it, otherwise the shared demo's.\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"}},"required":["domain"],"title":"get_rule_sourceArguments"}},{"name":"get_usage","description":"Show this account's decision usage, plan, and remaining monthly quota.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"title":"get_usageArguments"}},{"name":"import_policy_rules","description":"Convert a written policy document into DRAFT decision rules (LLM-assisted).\n\nReturns validated draft rules (when/action, including chained asserts where\nthe policy stages its determinations), derived rule→rule edges, and overlap\nwarnings. Each returned rule carries a `citation` field holding the policy\nsentence it encodes (also summarized in the top-level `citations` map).\nCoverage runs the other way too: `uncovered_sentences` lists policy\nsentences no rule's citation points back to (out of\n`policy_sentence_count`), and `unverified_citations` names rules whose\nquote is missing or not found verbatim in the policy. Show both to the\nuser: an uncovered sentence may need a rule; an unverified one may be a\nparaphrase that misstates the policy. `background_sentences` is the subset\nof uncovered sentences with no obligation language (definitions,\npreamble); lead with the others, but mention these too, since the split\nis a keyword heuristic.\nNOTHING IS SAVED: review the drafts (and show them to the user), then\npersist explicitly with `put_rules` — validate first with dry_run=true,\nand keep each rule's `citation` in the YAML you save so the audit trail\nback to the policy survives.\n\nArgs:\n    domain: Domain the rules are drafted for (an owned domain or a new name).\n    policy_text: The policy document text (max ~50k characters).\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"},"policy_text":{"title":"Policy Text","type":"string"}},"required":["domain","policy_text"],"title":"import_policy_rulesArguments"}},{"name":"ingest_text","description":"Add policy/reference text to a domain's knowledge base.\n\nThe text is chunked and embedded; explanations for future decisions in this\ndomain will cite it. Creating a new domain claims it for your account\n(plan limits apply). Ingesting into a built-in demo domain gives your\naccount its own copy of that demo (it counts as one of your domains); the\nshared demo others see is unchanged. On team plans, only the domain admin (the member\nwho created the domain, or the subscription owner) can add documents.\n\nDocuments can be dated. A decision only cites documents in force on its\ndate, so a replaced policy is never quoted for a new decision. To publish a\nnew version, ingest it under a new `source` with `supersedes` naming the old\none: the old document stops applying on the new one's `effective_from`\n(today if not given), and the new one starts that day. A document can be\nsuperseded only once; to replace a successor, supersede the successor.\n\nArgs:\n    domain: Domain to ingest into (existing or new).\n    text: The policy or reference text.\n    source: Optional source name shown in the document list.\n    effective_from: First day this document applies, as YYYY-MM-DD\n        (default: always).\n    effective_until: First day it no longer applies, as YYYY-MM-DD\n        (default: no end).\n    supersedes: Source name of the document this one replaces.\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"},"text":{"title":"Text","type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Effective From"},"effective_until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Effective Until"},"supersedes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Supersedes"}},"required":["domain","text"],"title":"ingest_textArguments"}},{"name":"list_documents","description":"List the documents ingested into a domain's knowledge base.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"}},"required":["domain"],"title":"list_documentsArguments"}},{"name":"list_rules","description":"List the decision rules for one domain (or all domains).\n\nReturns each rule's conditions — either a flat AND list (field / operator /\nvalue) or a `when` condition tree (nested all/any/not) — plus its verdict,\nsalience, and any asserted facts (`action.assert`, the facts a rule\nproduces for other rules to consume). `edges` lists the derived rule→rule\ndependencies: src asserts a fact type that dst's conditions test (forward\nchaining). Each rule may also carry `citation` — the policy sentence it\nencodes — which is what lets a decision be traced back to the source\nclause. Also includes overlap warnings. Use this to learn which fact\nfields a domain expects before calling `decide`.\n","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Domain"}},"title":"list_rulesArguments"}},{"name":"put_rules","description":"Create or replace a domain's rule set from YAML (self-serve rule authoring).\n\nThe first save to a new domain claims it for your account (plan limits\napply). Saving to a built-in demo domain saves your own copy of it, seeded\nfrom the demo; the shared demo others see is unchanged. Rules are validated before\nsaving — set dry_run=true to validate without persisting. The response\nreports ok/errors, the parsed rules, and any overlap warnings.\n\nYAML format — a list of rules. Flat form (conditions are AND-ed):\n    - name: \"Approve\"\n      salience: 10\n      conditions:\n        - type: loan\n          field: credit_score\n          op: \">=\"\n          value: 700\n      action:\n        verdict: \"APPROVED\"\n        reason: \"Credit score meets threshold\"\n\nTree form — `when:` holds nested all/any/not condition groups, and an\naction may assert derived facts that other rules consume (forward\nchaining; the rule graph derives from these automatically):\n    - name: \"Sepsis Screen\"\n      salience: 30\n      when:\n        all:\n          - {type: clinical, field: temperature_f, op: \">=\", value: 101.5}\n          - any:\n              - {type: clinical, field: wbc_count, op: \">\", value: 12.0}\n              - {type: clinical, field: bands_pct, op: \">\", value: 10}\n      action:\n        verdict: \"URGENT_ALERT\"\n        assert:\n          - {type: sepsis_flag, fields: {severity: high}}\n    - name: \"Escalate\"\n      salience: 40\n      when:\n        all:\n          - {type: sepsis_flag, field: severity, op: \"==\", value: high}\n          - {type: clinical, field: age, op: \">=\", value: 65}\n      action:\n        verdict: \"ADMIT_ICU\"\n\nUse either `conditions:` or `when:` per rule, never both. `not` passes\nwhen the inner condition does not hold (including when the field is\nabsent). Produce/consume cycles between rules are rejected at validation.\nAn action may also carry `retrieval_scope: { <key>: <value> }` to narrow\nwhich documents retrieval searches (Pattern 01).\n\nA rule may also carry `citation:` — the policy sentence it encodes. It is\nstored with the rule and shown beside it in decision audits, so a verdict\ncan be defended with the source language, not just the rule name:\n    - name: \"Decline Late Returns\"\n      salience: 20\n      citation: \"Returns are accepted within 30 days of delivery.\"\n      when:\n        all:\n          - {type: retail, field: days_since_delivery, op: \">\", value: 30}\n      action:\n        verdict: \"DENIED\"\n\nIMPORTANT: when persisting drafts returned by `import_policy_rules`, copy\neach rule's `citation` through into this YAML. Dropping it silently loses\nthe link from the decision back to the policy clause that justifies it.\n\nArgs:\n    domain: Domain to author (an owned domain, or a new name to claim).\n    rules_yaml: The full rule set as YAML text.\n    dry_run: Validate only, without saving.\n","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"domain":{"title":"Domain","type":"string"},"rules_yaml":{"title":"Rules Yaml","type":"string"},"dry_run":{"default":false,"title":"Dry Run","type":"boolean"}},"required":["domain","rules_yaml"],"title":"put_rulesArguments"}}],"scan":{"score":96,"grade":"A","scanned_at":"2026-11-01T06:16:43.428Z","report":{"scannerVersion":"0.1.10","scannedAt":"2026-11-01T06:16:43.337Z","components":{"code":{"score":25,"max":25,"notes":["6 source files scanned"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 1307ms"]},"poisoning":{"score":13,"max":15,"notes":["9 tool descriptions checked"]},"auth":{"score":15,"max":15,"notes":["OAuth resource metadata advertised on 401"]},"maintenance":{"score":15,"max":15,"notes":["last push 12 days ago"]},"identity":{"score":8,"max":10,"notes":["endpoint served from the registry-verified namespace domain"]}},"findings":[{"id":"poison.long-description","severity":"low","component":"poisoning","title":"Unusually long tool description (over 2,000 characters)","evidence":"tool decide: …Make a deterministic, auditable decision in a domain. The verdict comes from the domain's rule set (Rete engine, never the LLM), so it is reproducible and compliant. The explanation is generated from the domain's ingested policy documents. Without an API key only the shared demo domains are available, and the response carries `next_step`: how to get a free key for your own rules. Pass that on to the user rather than dropping it. Args: domain: Rule-set domain, e.g. \"loan\", \"fraud\", \"clinical\". query: Natural-language question or decision request. facts: Structured facts for working memory, e.g. {\"credit_score\": 710, \"annual_income\": 85000}. Use `get_parameters` to see which fields a domain's rules test. Facts you read yourself from photos, document scans, voice notes or video go here, under those field names; explicit facts always win over anything extracted server-side. fact_sources: Where each fact in `facts` came from, e.g. {\"monthly_income\": \"payslip.jpg\", \"claim_usd\": \"voice note 1\"}. Always set this for facts you read from a file, photo, recording or video: it is stored in the decision's audit record so a reviewer can tell typed facts from ones read off evidence. Facts without a source are recorded as \"request\". as_of: Read the domain's policy documents as of this day, as YYYY-MM-DD (default: today). Use the date a case was filed to decide it under the policy in force then; the rules themselves are always the current ones. unstructured_text: Optional free text (an application, a case note, a voice-note transcript, what a photo or video shows); facts are extracted from it automatically and merged. response_mode: \"verdict_only\" (fastest), \"verdict_with_explanation\", or \"full_audit\" (every rule evaluation + retrieved chunks, available on every plan including the free tier). rule_firings come back in causal order: a rule that matched a fact asserted by an earlier firing appears after it, with the derived facts listed under `asserted_facts`. filter_retrieval_with_rules: Pattern 01 — run the rules first and let a fired rule's `retrieval_scope` action narrow which documents the retrieval searches before it runs. extract_from_retrieval: Pattern 02 — parse the retrieved documents into facts and assert them into working memory, so rules fire on what was actually read (not just the facts you passed). The result's `missing_parameters` lists rule inputs that were not supplied but could still change the verdict, most decisive first. When it is non-empty, tell the user the verdict is provisional and ask for those facts; when it is empty, more facts cannot change the verdict. …"}],"inputs":{"probes":[{"url":"https://ai-rete-rag.com/mcp","reachable":true,"authRequired":false,"latencyMs":1307,"serverInfo":{"name":"ai-rete-rag","version":""}},{"url":"https://ai-rete-rag.com/mcp/auth","reachable":true,"authRequired":true,"latencyMs":96,"authScheme":"oauth"}],"packages":[{"registryType":"pypi","identifier":"ai-rete-rag-mcp","version":"0.11.0","found":true,"weeklyDownloads":108,"license":"MIT","dependencyCount":4,"publishedAt":"2026-10-17T17:36:08.498914Z","repositoryUrl":"https://ai-rete-rag.com"}],"repo":{"found":true,"owner":"zaharajabeen13-create","repo":"ai-rete-rag-mcp","archived":false,"pushedAt":"2026-10-20T01:08:59Z","stars":0,"forks":0,"openIssues":1,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/299340763?v=4","ownerCreatedAt":"2026-07-03T01:35:00Z","license":"MIT"},"icon":{"url":"https://ai-rete-rag.com/favicon.ico","source":"registry","width":256,"height":256},"presence":{"stars":0,"forks":0,"downloadsWeek":108,"license":"MIT","lastPushAt":"2026-10-20T01:08:59.000Z","score":33}}}},"grade_history":[],"reviews":[]}