Skip to content

Commit 0f70f84

Browse files
Sort feature badges in canonical order on clients page
Features in the `supports` prop are now sorted based on the `FEATURES` array order before rendering. This ensures badges display consistently (Resources → Prompts → Tools → Discovery → Instructions → ...) regardless of how they are listed in each client definition. Also moves "Instructions" earlier in the canonical order, placing it after "Discovery" and before "Sampling". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ad0e745 commit 0f70f84

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

docs/clients.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ description: "A list of applications that support MCP integrations"
55

66
{/* prettier-ignore-start */}
77

8-
export const FEATURES = ["Resources", "Prompts", "Tools", "Discovery", "Sampling", "Roots", "Elicitation", "Instructions", "Tasks", "Apps"];
8+
export const FEATURES = ["Resources", "Prompts", "Tools", "Discovery", "Instructions", "Sampling", "Roots", "Elicitation", "Tasks", "Apps"];
99

1010
export const FEATURE_COLORS = {
1111
Resources: "blue",
1212
Prompts: "blue",
1313
Tools: "blue",
14+
Instructions: "purple",
15+
Discovery: "purple",
1416
Sampling: "green",
1517
Roots: "green",
1618
Elicitation: "green",
17-
Instructions: "purple",
18-
Discovery: "purple",
1919
Tasks: "orange",
2020
Apps: "orange",
2121
};
@@ -156,6 +156,12 @@ export const McpClient = ({ name, homepage, supports, sourceCode, instructions,
156156
sourceCode ??= homepage;
157157
}
158158

159+
const features = (supports ?? "").split(", ").sort((a, b) => {
160+
const featureA = a.split(" (")[0];
161+
const featureB = b.split(" (")[0];
162+
return FEATURES.indexOf(featureA) - FEATURES.indexOf(featureB);
163+
});
164+
159165
const instructionsLinks = Array.isArray(instructions)
160166
? <>
161167
<strong>Configuration instructions:</strong>{" "}
@@ -203,14 +209,14 @@ export const McpClient = ({ name, homepage, supports, sourceCode, instructions,
203209
#
204210
</a>
205211
</div>
206-
{supports && (
212+
{features.length > 0 && (
207213
<div className="flex items-baseline gap-1.5 mt-2 text-base">
208214
<span className="inline-flex items-center h-[1lh]">
209215
{'\u200B'}<Icon icon="check" iconType="solid" size={18} />
210216
</span>
211217
<strong>Supports:</strong>
212218
<span className="flex flex-wrap gap-1">
213-
{supports.split(", ").map(feature => (
219+
{features.map(feature => (
214220
<Badge key={feature} shape="pill" stroke color={FEATURE_COLORS[feature.split(" (")[0]] || "gray"}>
215221
{feature}
216222
</Badge>

0 commit comments

Comments
 (0)