Skip to content

Commit 08b5b8c

Browse files
authored
Merge pull request #58 from mcp-agents-ai/feat/leixu/mcp_server_categories
Feat/leixu/mcp server categories - filtering servers by "official integrations" "reference servers" and "community servers"
2 parents 7f2f879 + a7eee75 commit 08b5b8c

File tree

1,851 files changed

+15811
-1844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,851 files changed

+15811
-1844
lines changed

client/src/components/ServerList.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ interface PaginatedResponse {
1414

1515
interface ServerListProps {
1616
isRecommended?: boolean;
17+
isOfficialIntegration?: boolean;
18+
isReferenceServer?: boolean;
19+
isCommunityServer?: boolean;
1720
initialPageSize?: number;
1821
categoryKey?: string;
1922
searchKeyword?: string;
@@ -22,6 +25,9 @@ interface ServerListProps {
2225

2326
export function ServerList({
2427
isRecommended,
28+
isOfficialIntegration,
29+
isReferenceServer,
30+
isCommunityServer,
2531
initialPageSize = 6,
2632
categoryKey,
2733
searchKeyword,
@@ -58,7 +64,10 @@ export function ServerList({
5864
page: page,
5965
size: size,
6066
search_for: searchKeyword || undefined,
61-
isRecommended: isRecommended !== undefined ? isRecommended : undefined
67+
isRecommended: isRecommended !== undefined ? isRecommended : undefined,
68+
isOfficialIntegration: isOfficialIntegration !== undefined ? isOfficialIntegration : undefined,
69+
isReferenceServer: isReferenceServer !== undefined ? isReferenceServer : undefined,
70+
isCommunityServer: isCommunityServer !== undefined ? isCommunityServer : undefined
6271
})
6372
});
6473

@@ -83,7 +92,7 @@ export function ServerList({
8392

8493
useEffect(() => {
8594
fetchServers(currentPage, pageSize);
86-
}, [categoryKey, language, searchKeyword, isRecommended, pageSize, currentPage]);
95+
}, [categoryKey, language, searchKeyword, isRecommended, isOfficialIntegration, isReferenceServer, isCommunityServer, pageSize, currentPage]);
8796

8897
// Reset animation state when new data is loaded
8998
useEffect(() => {

client/src/locale/de.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
},
5050
"serverCount": "Verfügbare MCP-Server",
5151
"recommendedServers": "Empfohlene Server",
52+
"officialIntegrations": "Offizielle Integrationen",
53+
"referenceServers": "Referenz-Server",
5254
"otherServers": "Andere Server",
5355
"loadMore": "Mehr laden",
5456
"of": "von",
@@ -90,6 +92,9 @@
9092
"server": "Server",
9193
"servers": "Server",
9294
"recommended": "Empfohlen",
95+
"officialIntegration": "Offizielle Integration",
96+
"referenceServer": "Referenz-Server",
97+
"communityServer": "Community-Server",
9398
"siteName": "MCP Agents Hub",
9499
"viewAll": "Alle anzeigen"
95100
},
@@ -116,7 +121,10 @@
116121
"noResults": "Keine Server gefunden, die Ihrer Suche entsprechen",
117122
"tryDifferent": "Versuchen Sie einen anderen Suchbegriff oder durchsuchen Sie alle Server in dieser Kategorie",
118123
"clearAndShowAll": "Suche löschen und alle Server anzeigen",
119-
"recommendedOnly": "Nur empfohlene"
124+
"recommendedOnly": "Nur empfohlene",
125+
"officialIntegrationOnly": "Nur offizielle Integration",
126+
"referenceServerOnly": "Nur Referenz-Server",
127+
"communityServerOnly": "Nur Community-Server"
120128
},
121129
"submit": {
122130
"title": "Ihren MCP-Server einreichen",

client/src/locale/en.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
},
5050
"serverCount": "MCP servers available",
5151
"recommendedServers": "Recommended Servers",
52+
"officialIntegrations": "Official Integrations",
53+
"referenceServers": "Reference Servers",
5254
"otherServers": "Other Servers",
5355
"loadMore": "Load More",
5456
"of": "of",
@@ -90,6 +92,9 @@
9092
"server": "Server",
9193
"servers": "Servers",
9294
"recommended": "Recommended",
95+
"officialIntegration": "Official Integration",
96+
"referenceServer": "Reference Server",
97+
"communityServer": "Community Server",
9398
"siteName": "MCP Hub",
9499
"viewAll": "View All"
95100
},
@@ -117,7 +122,10 @@
117122
"noResults": "No servers found matching your search",
118123
"tryDifferent": "Try a different search term or browse all servers in this category",
119124
"clearAndShowAll": "Clear search and show all servers",
120-
"recommendedOnly": "Recommended only"
125+
"recommendedOnly": "Recommended only",
126+
"officialIntegrationOnly": "Official Integration only",
127+
"referenceServerOnly": "Reference Server only",
128+
"communityServerOnly": "Community Server only"
121129
},
122130
"submit": {
123131
"title": "Submit Your MCP Server",

client/src/locale/es.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
},
4848
"serverCount": "Servidores MCP disponibles",
4949
"recommendedServers": "Servidores Recomendados",
50+
"officialIntegrations": "Integraciones Oficiales",
51+
"referenceServers": "Servidores de Referencia",
5052
"otherServers": "Otros Servidores",
5153
"loadMore": "Cargar Más",
5254
"of": "de",
@@ -88,6 +90,9 @@
8890
"server": "Servidor",
8991
"servers": "Servidores",
9092
"recommended": "Recomendado",
93+
"officialIntegration": "Integración Oficial",
94+
"referenceServer": "Servidor de Referencia",
95+
"communityServer": "Servidor Comunitario",
9196
"siteName": "MCP Hub",
9297
"viewAll": "Ver Todo"
9398
},
@@ -115,7 +120,10 @@
115120
"noResults": "No se encontraron servidores que coincidan con su búsqueda",
116121
"tryDifferent": "Intente con un término de búsqueda diferente o explore todos los servidores en esta categoría",
117122
"clearAndShowAll": "Borrar búsqueda y mostrar todos los servidores",
118-
"recommendedOnly": "Solo recomendados"
123+
"recommendedOnly": "Solo recomendados",
124+
"officialIntegrationOnly": "Solo integración oficial",
125+
"referenceServerOnly": "Solo servidor de referencia",
126+
"communityServerOnly": "Solo servidor comunitario"
119127
},
120128
"submit": {
121129
"title": "Enviar Su Servidor MCP",

client/src/locale/ja.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
},
4949
"serverCount": "利用可能なMCPサーバー",
5050
"recommendedServers": "おすすめサーバー",
51+
"officialIntegrations": "公式インテグレーション",
52+
"referenceServers": "リファレンスサーバー",
5153
"otherServers": "その他のサーバー",
5254
"loadMore": "もっと読み込む",
5355
"of": "/",
@@ -89,6 +91,9 @@
8991
"server": "サーバー",
9092
"servers": "サーバー",
9193
"recommended": "おすすめ",
94+
"officialIntegration": "公式インテグレーション",
95+
"referenceServer": "リファレンスサーバー",
96+
"communityServer": "コミュニティサーバー",
9297
"siteName": "MCP Hub",
9398
"viewAll": "すべて表示"
9499
},
@@ -116,7 +121,10 @@
116121
"noResults": "検索に一致するサーバーが見つかりません",
117122
"tryDifferent": "別の検索語を試すか、このカテゴリ内のすべてのサーバーを閲覧してください",
118123
"clearAndShowAll": "検索をクリアしてすべてのサーバーを表示",
119-
"recommendedOnly": "おすすめのみ"
124+
"recommendedOnly": "おすすめのみ",
125+
"officialIntegrationOnly": "公式インテグレーションのみ",
126+
"referenceServerOnly": "リファレンスサーバーのみ",
127+
"communityServerOnly": "コミュニティサーバーのみ"
120128
},
121129
"submit": {
122130
"title": "MCPサーバーを提出",

client/src/locale/zh-hans.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
},
4848
"serverCount": "个MCP服务器可用",
4949
"recommendedServers": "推荐服务器",
50+
"officialIntegrations": "官方集成",
51+
"referenceServers": "参考服务器",
5052
"otherServers": "其他服务器",
5153
"loadMore": "加载更多",
5254
"of": "",
@@ -88,6 +90,9 @@
8890
"server": "服务器",
8991
"servers": "服务器",
9092
"recommended": "推荐",
93+
"officialIntegration": "官方集成",
94+
"referenceServer": "参考服务器",
95+
"communityServer": "社区服务器",
9196
"siteName": "MCP 智能体中心",
9297
"viewAll": "查看全部"
9398
},
@@ -115,7 +120,10 @@
115120
"noResults": "未找到与您的搜索匹配的服务器",
116121
"tryDifferent": "尝试使用不同的搜索词或浏览此类别中的所有服务器",
117122
"clearAndShowAll": "清除搜索并显示所有服务器",
118-
"recommendedOnly": "仅显示推荐"
123+
"recommendedOnly": "仅显示推荐",
124+
"officialIntegrationOnly": "仅显示官方集成",
125+
"referenceServerOnly": "仅显示参考服务器",
126+
"communityServerOnly": "仅显示社区服务器"
119127
},
120128
"submit": {
121129
"title": "提交您的 MCP 服务器",

client/src/locale/zh-hant.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
},
4848
"serverCount": "MCP 伺服器服務可用個數",
4949
"recommendedServers": "推薦的 MCP 伺服器服務",
50+
"officialIntegrations": "官方整合",
51+
"referenceServers": "參考伺服器",
5052
"otherServers": "其他 MCP 伺服器服務",
5153
"loadMore": "讀取更多",
5254
"of": "",
@@ -88,6 +90,9 @@
8890
"server": "伺服器",
8991
"servers": "伺服器",
9092
"recommended": "推薦",
93+
"officialIntegration": "官方整合",
94+
"referenceServer": "參考伺服器",
95+
"communityServer": "社區伺服器",
9196
"siteName": "MCP Agents 中心",
9297
"viewAll": "查看全部"
9398
},
@@ -114,7 +119,10 @@
114119
"noResults": "未找到與您的搜尋匹配的伺服器",
115120
"tryDifferent": "嘗試使用不同的搜尋詞或瀏覽此類別中的所有伺服器",
116121
"clearAndShowAll": "清除搜尋並顯示所有伺服器",
117-
"recommendedOnly": "僅顯示推薦"
122+
"recommendedOnly": "僅顯示推薦",
123+
"officialIntegrationOnly": "僅顯示官方整合",
124+
"referenceServerOnly": "僅顯示參考伺服器",
125+
"communityServerOnly": "僅顯示社區伺服器"
118126
},
119127
"submit": {
120128
"title": "提交您的 MCP 伺服器",

client/src/pages/Home.tsx

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export function Home() {
1717
const [categories, setCategories] = useState<string[]>([]);
1818
const [isLoadingCategories, setIsLoadingCategories] = useState(true);
1919
const [categoryCounts, setCategoryCounts] = useState<Record<string, number>>({});
20+
const [officialIntegrationCount, setOfficialIntegrationCount] = useState(0);
21+
const [referenceServerCount, setReferenceServerCount] = useState(0);
2022

2123
useEffect(() => {
2224
const loadServers = async () => {
@@ -89,6 +91,55 @@ export function Home() {
8991
fetchCategoryCounts();
9092
}, [categories, language, isLoadingCategories]);
9193

94+
// Fetch counts for official integrations and reference servers
95+
useEffect(() => {
96+
const fetchSpecialCounts = async () => {
97+
try {
98+
// Fetch official integration count
99+
const officialResponse = await fetch(`/v1/hub/search_servers`, {
100+
method: 'POST',
101+
headers: {
102+
'Content-Type': 'application/json'
103+
},
104+
body: JSON.stringify({
105+
locale: language || 'en',
106+
page: 1,
107+
size: 1,
108+
isOfficialIntegration: true
109+
})
110+
});
111+
112+
if (officialResponse.ok) {
113+
const officialData = await officialResponse.json();
114+
setOfficialIntegrationCount(officialData.totalItems);
115+
}
116+
117+
// Fetch reference server count
118+
const referenceResponse = await fetch(`/v1/hub/search_servers`, {
119+
method: 'POST',
120+
headers: {
121+
'Content-Type': 'application/json'
122+
},
123+
body: JSON.stringify({
124+
locale: language || 'en',
125+
page: 1,
126+
size: 1,
127+
isReferenceServer: true
128+
})
129+
});
130+
131+
if (referenceResponse.ok) {
132+
const referenceData = await referenceResponse.json();
133+
setReferenceServerCount(referenceData.totalItems);
134+
}
135+
} catch (error) {
136+
console.error('Error fetching special server counts:', error);
137+
}
138+
};
139+
140+
fetchSpecialCounts();
141+
}, [language]);
142+
92143
const handleSearch = (query: string) => {
93144
if (query.trim()) {
94145
// Redirect to the listing page with the search keyword
@@ -207,6 +258,46 @@ export function Home() {
207258
/>
208259
</div>
209260

261+
{/* Official Integrations - using ServerList component */}
262+
<div className="mt-16">
263+
<div className="flex justify-between items-center mb-4">
264+
<h3 className="text-xl font-semibold text-gray-900">
265+
{t('home.officialIntegrations') || 'Official Integrations'}{officialIntegrationCount > 0 ? ` (${officialIntegrationCount})` : ''}
266+
</h3>
267+
<Link
268+
to={`/listing/all?page=1&size=12&isOfficialIntegration=true`}
269+
className="text-indigo-600 hover:text-indigo-800 text-sm font-medium flex items-center"
270+
>
271+
{t('common.viewAll') || 'View All'}
272+
<ChevronRight size={16} className="ml-1" />
273+
</Link>
274+
</div>
275+
<ServerList
276+
isOfficialIntegration={true}
277+
initialPageSize={6}
278+
/>
279+
</div>
280+
281+
{/* Reference Servers - using ServerList component */}
282+
<div className="mt-16">
283+
<div className="flex justify-between items-center mb-4">
284+
<h3 className="text-xl font-semibold text-gray-900">
285+
{t('home.referenceServers') || 'Reference Servers'}{referenceServerCount > 0 ? ` (${referenceServerCount})` : ''}
286+
</h3>
287+
<Link
288+
to={`/listing/all?page=1&size=12&isReferenceServer=true`}
289+
className="text-indigo-600 hover:text-indigo-800 text-sm font-medium flex items-center"
290+
>
291+
{t('common.viewAll') || 'View All'}
292+
<ChevronRight size={16} className="ml-1" />
293+
</Link>
294+
</div>
295+
<ServerList
296+
isReferenceServer={true}
297+
initialPageSize={6}
298+
/>
299+
</div>
300+
210301
{/* Categories section - showing all categories in a unified style */}
211302
<div className="mt-16">
212303
<h2 className="text-2xl font-bold text-gray-900 mb-8 text-center">

0 commit comments

Comments
 (0)