@mafdet/mcp 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/tools.js +20 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,11 +8,24 @@ It does **not** run model inference — you keep calling Mafdet AI models throug
|
|
|
8
8
|
each tool's normal OpenAI-compatible endpoint. This server only exposes
|
|
9
9
|
read-only account and documentation helpers.
|
|
10
10
|
|
|
11
|
+
## What Mafdet AI is
|
|
12
|
+
|
|
13
|
+
Mafdet AI is an OpenAI-compatible AI gateway: one API key and one base URL reach
|
|
14
|
+
models from several providers, billed by usage. Any tool or SDK that speaks the
|
|
15
|
+
OpenAI API works by pointing its base URL and key at Mafdet AI.
|
|
16
|
+
|
|
17
|
+
- Base URL: `https://api.mafdet.ai/v1`
|
|
18
|
+
- Endpoints: `/chat/completions`, `/embeddings`, `/audio/speech`
|
|
19
|
+
- Providers: Google (Gemini), Kimi (Moonshot), Qwen, DeepSeek
|
|
20
|
+
- 30 models as of August 2026. The catalogue changes, so the authoritative list
|
|
21
|
+
with current prices is [`models.json`](https://docs.mafdet.ai/models.json)
|
|
22
|
+
- Docs: <https://docs.mafdet.ai>
|
|
23
|
+
|
|
11
24
|
## Tools
|
|
12
25
|
|
|
13
26
|
| Tool | Needs a key | What it does |
|
|
14
27
|
| --- | --- | --- |
|
|
15
|
-
| `list_models` | no | List Mafdet AI models with provider, tier,
|
|
28
|
+
| `list_models` | no | List Mafdet AI models with provider, tier, per-1M-token pricing, and a `[preview]` / `[beta]` marker for models the provider has not declared generally available |
|
|
16
29
|
| `search_docs` | no | Search the Mafdet AI documentation (titles, URLs, summaries) |
|
|
17
30
|
| `get_balance` | yes | Your organization's wallet: balance, bonus, frozen, available |
|
|
18
31
|
| `get_usage_summary` | yes | Requests, tokens, and charge over the last N days (1–90) |
|
package/dist/tools.js
CHANGED
|
@@ -53,6 +53,14 @@ export async function listModels(config, args = {}) {
|
|
|
53
53
|
display_name: m.displayName,
|
|
54
54
|
provider: m.provider,
|
|
55
55
|
tier: m.accessTier,
|
|
56
|
+
// GEMMOD-003: endpoint + content modalities (additive; defaults when absent).
|
|
57
|
+
api_surface: m.apiSurface ?? "CHAT_COMPLETIONS",
|
|
58
|
+
input_modalities: Array.isArray(m.inputModalities)
|
|
59
|
+
? m.inputModalities
|
|
60
|
+
: ["TEXT"],
|
|
61
|
+
output_modalities: Array.isArray(m.outputModalities)
|
|
62
|
+
? m.outputModalities
|
|
63
|
+
: ["TEXT"],
|
|
56
64
|
input_per_1m_micro_usd: String(m.inputPricePer1mMicroUsd ?? "0"),
|
|
57
65
|
output_per_1m_micro_usd: String(m.outputPricePer1mMicroUsd ?? "0"),
|
|
58
66
|
context_length: m.contextLength,
|
|
@@ -62,9 +70,18 @@ export async function listModels(config, args = {}) {
|
|
|
62
70
|
if (models.length === 0) {
|
|
63
71
|
return ok("No models matched the filter.");
|
|
64
72
|
}
|
|
65
|
-
const lines = models.map((m) =>
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
const lines = models.map((m) => {
|
|
74
|
+
// The catalogue marks non-GA models in the display name, and the docs
|
|
75
|
+
// site derives its badge from the same string. Without this the rendered
|
|
76
|
+
// line shows only model_id, so an agent reading this list cannot tell a
|
|
77
|
+
// preview model from a GA one.
|
|
78
|
+
const stage = /\((preview|beta)\)/i.exec(String(m.display_name ?? ""));
|
|
79
|
+
return (`- ${m.model_id} (${m.provider}, ${m.tier})` +
|
|
80
|
+
`${stage ? ` [${stage[1].toLowerCase()}]` : ""}` +
|
|
81
|
+
`${m.trial ? " [trial]" : ""}${m.deprecated ? " [deprecated]" : ""}` +
|
|
82
|
+
`${m.output_modalities.includes("IMAGE") ? " [image-out]" : ""}` +
|
|
83
|
+
` — in ${money(m.input_per_1m_micro_usd)}/1M, out ${money(m.output_per_1m_micro_usd)}/1M, ctx ${m.context_length}`);
|
|
84
|
+
});
|
|
68
85
|
return ok(`Mafdet AI models (${models.length}):\n${lines.join("\n")}`);
|
|
69
86
|
}
|
|
70
87
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mafdet/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Mafdet AI MCP server — read-only account tools (models, balance, usage, subscription, docs) for Claude Code, Cursor, Codex, OpenCode, and Claude Desktop.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|