@toolsdk.ai/registry 1.0.114 → 1.0.116
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 +169 -26
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +23 -25
- package/dist/domains/config/config-route.d.ts +2 -0
- package/dist/domains/config/config-route.js +31 -0
- package/dist/domains/config/config-schema.d.ts +57 -0
- package/dist/domains/config/config-schema.js +10 -0
- package/dist/domains/config/config-types.d.ts +3 -0
- package/dist/domains/executor/executor-factory.d.ts +9 -0
- package/dist/domains/executor/executor-factory.js +17 -0
- package/dist/domains/executor/executor-types.d.ts +15 -0
- package/dist/domains/executor/local-executor.d.ts +12 -0
- package/dist/domains/executor/local-executor.js +48 -0
- package/dist/domains/executor/sandbox-executor.d.ts +16 -0
- package/dist/domains/executor/sandbox-executor.js +83 -0
- package/dist/domains/package/package-handler.d.ts +17 -0
- package/dist/domains/package/package-handler.js +58 -0
- package/dist/domains/package/package-repository.d.ts +9 -0
- package/dist/domains/package/package-repository.js +26 -0
- package/dist/domains/package/package-route.d.ts +2 -0
- package/dist/{api → domains/package}/package-route.js +38 -52
- package/dist/domains/package/package-schema.d.ts +244 -0
- package/dist/domains/package/package-schema.js +52 -0
- package/dist/domains/package/package-so.d.ts +78 -0
- package/dist/domains/package/package-so.js +61 -0
- package/dist/domains/package/package-so.test.js +378 -0
- package/dist/domains/package/package-types.d.ts +9 -0
- package/dist/domains/sandbox/clients/daytona-client.d.ts +17 -0
- package/dist/domains/sandbox/clients/daytona-client.js +112 -0
- package/dist/domains/sandbox/clients/sandock-client.d.ts +19 -0
- package/dist/domains/sandbox/clients/sandock-client.js +175 -0
- package/dist/domains/sandbox/sandbox-factory.d.ts +8 -0
- package/dist/domains/sandbox/sandbox-factory.js +23 -0
- package/dist/domains/sandbox/sandbox-pool-so.d.ts +25 -0
- package/dist/domains/sandbox/sandbox-pool-so.js +123 -0
- package/dist/domains/sandbox/sandbox-types.d.ts +25 -0
- package/dist/domains/sandbox/sandbox-types.js +1 -0
- package/dist/domains/sandbox/sandbox-utils.d.ts +3 -0
- package/dist/domains/sandbox/sandbox-utils.js +109 -0
- package/dist/domains/search/search-handler.d.ts +47 -0
- package/dist/domains/search/search-handler.js +113 -0
- package/dist/domains/search/search-route.d.ts +2 -0
- package/dist/domains/search/search-route.js +101 -0
- package/dist/domains/search/search-schema.d.ts +384 -0
- package/dist/domains/search/search-schema.js +99 -0
- package/dist/domains/search/search-so.d.ts +55 -0
- package/dist/{search/search-service.js → domains/search/search-so.js} +200 -297
- package/dist/shared/config/environment.d.ts +16 -0
- package/dist/shared/config/environment.js +41 -0
- package/dist/shared/schemas/common-schema.d.ts +249 -0
- package/dist/{schema.js → shared/schemas/common-schema.js} +37 -80
- package/dist/shared/schemas/index.d.ts +1 -0
- package/dist/shared/schemas/index.js +1 -0
- package/dist/shared/scripts-helpers/index.d.ts +60 -0
- package/dist/shared/scripts-helpers/index.js +61 -0
- package/dist/shared/utils/file-util.d.ts +1 -0
- package/dist/shared/utils/file-util.js +5 -0
- package/dist/shared/utils/index.d.ts +5 -0
- package/dist/shared/utils/index.js +5 -0
- package/dist/shared/utils/mcp-client-util.d.ts +31 -0
- package/dist/shared/utils/mcp-client-util.js +79 -0
- package/dist/shared/utils/package-util.d.ts +6 -0
- package/dist/shared/utils/package-util.js +53 -0
- package/dist/shared/utils/promise-util.d.ts +1 -0
- package/dist/shared/utils/promise-util.js +14 -0
- package/dist/{utils.d.ts → shared/utils/response-util.d.ts} +6 -2
- package/dist/{utils.js → shared/utils/response-util.js} +1 -6
- package/dist/shared/utils/string-util.d.ts +1 -0
- package/dist/shared/utils/string-util.js +25 -0
- package/dist/shared/utils/validation-util.d.ts +12 -0
- package/dist/shared/utils/validation-util.js +99 -0
- package/indexes/categories-list.json +1 -0
- package/indexes/packages-list.json +6 -0
- package/package.json +39 -3
- package/packages/developer-tools/neurolink.json +23 -0
- package/README.dev.md +0 -195
- package/dist/api/package-handler.d.ts +0 -18
- package/dist/api/package-handler.js +0 -73
- package/dist/api/package-route.d.ts +0 -2
- package/dist/api/package-so.d.ts +0 -19
- package/dist/api/package-so.js +0 -223
- package/dist/api/package.test.js +0 -19
- package/dist/helper.d.ts +0 -74
- package/dist/helper.js +0 -312
- package/dist/sandbox/mcp-sandbox-client.d.ts +0 -16
- package/dist/sandbox/mcp-sandbox-client.js +0 -229
- package/dist/sandbox/mcp-sandbox-client.test.js +0 -491
- package/dist/schema.d.ts +0 -806
- package/dist/search/search-route.d.ts +0 -3
- package/dist/search/search-route.js +0 -305
- package/dist/search/search-service.d.ts +0 -120
- package/dist/search/search.test.js +0 -100
- package/dist/types.d.ts +0 -28
- /package/dist/{api/package.test.d.ts → domains/config/config-types.js} +0 -0
- /package/dist/{sandbox/mcp-sandbox-client.test.d.ts → domains/executor/executor-types.js} +0 -0
- /package/dist/{search/search.test.d.ts → domains/package/package-so.test.d.ts} +0 -0
- /package/dist/{types.js → domains/package/package-types.js} +0 -0
package/README.md
CHANGED
|
@@ -6,35 +6,70 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://www.producthunt.com/products/toolsdk-ai)
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|

|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
🚀 **Open-source**, **production-ready**, and **developer-friendly** registry for 4108+ Model Context Protocol (MCP) servers, plugins, and AI agent tools.
|
|
13
|
+
|
|
14
|
+
Perfect for **AI automation**, **chatbot development**, **LLM integrations**, and **enterprise AI deployments**.
|
|
13
15
|
|
|
14
16
|
---
|
|
15
17
|
|
|
16
18
|
</div>
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
## 🌟 Why Awesome MCP Registry?
|
|
21
|
+
|
|
22
|
+
**Awesome MCP Registry** is the most comprehensive, self-hosted registry for Model Context Protocol (MCP) servers and AI agent tools. Built for developers, teams, and enterprises who need full control over their AI infrastructure.
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
### 🎯 Key Features
|
|
21
25
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
26
|
+
- 🔐 **Private & Self-Hosted** - Deploy your own secure MCP registry with Docker in minutes
|
|
27
|
+
- 🤖 **4108+ AI Tools** - Largest curated collection of MCP servers for Claude, LLMs, and AI agents
|
|
28
|
+
- ⚡ **Remote Execution** - Run MCP tools in isolated sandbox environments via REST API
|
|
29
|
+
- 🔍 **Powerful Search** - Fast, full-text search powered by Meilisearch
|
|
30
|
+
- 📦 **NPM Integration** - Use as a TypeScript/Node.js SDK in your projects
|
|
31
|
+
- 🛠️ **Developer-Friendly** - OpenAPI/Swagger documentation, structured JSON configs
|
|
32
|
+
- 🐳 **Docker Ready** - Production-grade deployment with Docker Compose
|
|
33
|
+
- 🔌 **Plugin System** - Extensible architecture for custom integrations
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
### 💡 Use Cases
|
|
27
36
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
37
|
+
- 🏢 **Enterprise AI Teams** - Deploy private MCP registry for your organization
|
|
38
|
+
- 🤖 **AI Agent Development** - Build and test AI agents with verified MCP tools
|
|
39
|
+
- 💬 **Chatbot Builders** - Integrate LLM-powered chatbots with MCP servers
|
|
40
|
+
- 🔧 **Developer Tools** - Access automation tools, APIs, and integrations
|
|
41
|
+
- 🚀 **CI/CD Automation** - Execute MCP tools in your deployment pipelines
|
|
31
42
|
|
|
32
43
|
---
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
45
|
+
## 📦 What You Get
|
|
46
|
+
|
|
47
|
+
This open-source registry provides:
|
|
48
|
+
|
|
49
|
+
- 📚 **Structured Database** - 4108+ validated MCP servers with metadata
|
|
50
|
+
- 🔗 **Multiple Formats** - JSON, npm package, and generated documentation
|
|
51
|
+
- 🌐 **REST API** - Query and execute tools remotely
|
|
52
|
+
- 📖 **Auto-Generated Docs** - Always up-to-date README and API documentation
|
|
53
|
+
|
|
54
|
+
**Available as:**
|
|
55
|
+
|
|
56
|
+
- 📄 `README.md` - Human-readable documentation
|
|
57
|
+
- 📦 [npm package](https://www.npmjs.com/package/@toolsdk.ai/registry) - TypeScript/JavaScript SDK
|
|
58
|
+
- 🔗 [packages-list.json](https://toolsdk-ai.github.io/awesome-mcp-registry/indexes/packages-list.json) - Raw data API
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 📚 Table of Contents
|
|
63
|
+
|
|
64
|
+
- [🎥 Video: How to submit a MCP server in JSON file?](https://www.youtube.com/watch?v=J_oaDtCoVVo)
|
|
65
|
+
- [🚀 Quick Start](#quick-start)
|
|
66
|
+
- [🐳 Docker Self-Hosting](#-docker-self-hosting)
|
|
67
|
+
- [📦 Install via Package Manager](#install-via-package-manager)
|
|
68
|
+
- [📄 Submit New MCP Servers](#submit-new-mcp-servers)
|
|
69
|
+
- [📖 Development Guide](./docs/DEVELOPMENT.md)
|
|
70
|
+
- [🤝 Contributing Guide](./docs/guide.md)
|
|
71
|
+
- [⭐ Awesome MCP Servers](#mcp-servers)
|
|
72
|
+
|
|
38
73
|
- [Uncategorized](#uncategorized)
|
|
39
74
|
- [Aggregators](#aggregators)
|
|
40
75
|
- [Art & Culture](#art-and-culture)
|
|
@@ -71,30 +106,118 @@ This registry leverages structured JSON configs to generate:
|
|
|
71
106
|
|
|
72
107
|
## 🚀 Quick Start
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
### 🐳 Self-Hosted MCP Registry with Docker
|
|
110
|
+
|
|
111
|
+
Deploy your own **private MCP registry** in 5 minutes! Get a production-ready AI agent tool registry with full-text search, REST API, and secure sandbox execution.
|
|
112
|
+
|
|
113
|
+
Perfect for **AI developers**, **LLM teams**, and **enterprises** building with Claude, Anthropic, and other AI platforms.
|
|
114
|
+
|
|
115
|
+
#### ⚡ Quick Deploy (2 Steps)
|
|
116
|
+
|
|
117
|
+
**Step 1: Configure Sandbox Environment**
|
|
118
|
+
|
|
119
|
+
- Get your Sandock API Key from https://sandock.ai (for secure remote code execution)
|
|
120
|
+
- Edit `.env` and set: `SANDOCK_API_KEY=your-api-key-here`
|
|
121
|
+
|
|
122
|
+
**Step 2: Launch with Docker Compose**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
docker compose up -d
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
That's it! Your self-hosted MCP registry is now running with:
|
|
129
|
+
- 🔍 **Full-text search** (Meilisearch)
|
|
130
|
+
- 🌐 **REST API** with OpenAPI documentation
|
|
131
|
+
- 🛡️ **Sandbox execution** for AI agent tools
|
|
132
|
+
|
|
133
|
+
#### 🎉 Access Your Private AI Tool Registry
|
|
134
|
+
|
|
135
|
+
- 🌐 **Web Interface**: http://localhost:3003
|
|
136
|
+
- 📚 **Swagger API Docs**: http://localhost:3003/swagger
|
|
137
|
+
- 🔍 **Search & Execute** 4108+ MCP tools remotely
|
|
138
|
+
- 🤖 **Integrate** with your AI agents, chatbots, and LLM applications
|
|
139
|
+
|
|
140
|
+
#### 💻 Remote Tool Execution Example
|
|
141
|
+
|
|
142
|
+
Execute any MCP tool via REST API - perfect for AI automation, chatbot integrations, and serverless deployments:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
curl -X POST http://localhost:3003/api/v1/packages/run \
|
|
146
|
+
-H "Content-Type: application/json" \
|
|
147
|
+
-d '{
|
|
148
|
+
"packageName": "@modelcontextprotocol/server-everything",
|
|
149
|
+
"toolKey": "echo",
|
|
150
|
+
"inputData": {
|
|
151
|
+
"message": "Hello from Awesome MCP Registry!"
|
|
152
|
+
},
|
|
153
|
+
"envs": {}
|
|
154
|
+
}'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Use Cases:**
|
|
158
|
+
- 🤖 Build AI agents with remote tool execution
|
|
159
|
+
- 💬 Power chatbots with MCP server integrations
|
|
160
|
+
- 🚀 Create serverless AI workflows
|
|
161
|
+
- 🔧 Automate tasks with LLM-powered tools
|
|
162
|
+
|
|
163
|
+
> 📖 For advanced deployment options and configuration, see the [DEVELOPMENT documentation](./docs/DEVELOPMENT.md#4--quick-start-with-docker).
|
|
164
|
+
|
|
165
|
+
<a id="install-via-package-manager"></a>
|
|
166
|
+
|
|
167
|
+
### 📦 Install as NPM Package (TypeScript/Node.js SDK)
|
|
168
|
+
|
|
169
|
+
Use the MCP Registry as a TypeScript/JavaScript SDK in your AI agent, chatbot, or LLM integration projects:
|
|
75
170
|
|
|
76
171
|
```bash
|
|
77
172
|
npm install @toolsdk.ai/registry
|
|
78
173
|
```
|
|
79
174
|
|
|
80
|
-
#### Use
|
|
175
|
+
#### Use in TypeScript/JavaScript Projects
|
|
176
|
+
|
|
177
|
+
Perfect for AI agent development, chatbot builders, and LLM tool integrations:
|
|
81
178
|
|
|
82
179
|
```ts
|
|
83
180
|
import mcpServerLists from '@toolsdk.ai/registry/indexes/packages-lists.json';
|
|
84
181
|
```
|
|
85
182
|
|
|
86
|
-
####
|
|
183
|
+
#### 🌐 Access via Public API (No Installation Required)
|
|
184
|
+
|
|
185
|
+
Fetch the complete MCP server registry programmatically - ideal for AI applications, integrations, and automation:
|
|
87
186
|
|
|
88
187
|
```bash
|
|
89
188
|
curl https://toolsdk-ai.github.io/awesome-mcp-registry/indexes/packages-list.json
|
|
90
189
|
```
|
|
91
190
|
|
|
92
191
|
```ts
|
|
93
|
-
// JavaScript
|
|
94
|
-
|
|
192
|
+
// JavaScript/TypeScript - Fetch API
|
|
193
|
+
const mcpServers = await (
|
|
194
|
+
await fetch('https://toolsdk-ai.github.io/awesome-mcp-registry/indexes/packages-list.json')
|
|
195
|
+
).json();
|
|
196
|
+
|
|
197
|
+
// Use for AI agent tool discovery, LLM integrations, etc.
|
|
198
|
+
console.log(mcpServers);
|
|
95
199
|
```
|
|
96
200
|
|
|
97
|
-
|
|
201
|
+
```python
|
|
202
|
+
# Python - For AI/ML projects
|
|
203
|
+
import requests
|
|
204
|
+
|
|
205
|
+
mcp_servers = requests.get(
|
|
206
|
+
'https://toolsdk-ai.github.io/awesome-mcp-registry/indexes/packages-list.json'
|
|
207
|
+
).json()
|
|
208
|
+
|
|
209
|
+
# Perfect for LangChain, CrewAI, AutoGen integrations
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
<a id="submit-new-mcp-servers"></a>
|
|
213
|
+
|
|
214
|
+
## 🤝 Contribute Your MCP Server
|
|
215
|
+
|
|
216
|
+
Help grow the world's largest open-source MCP registry! Share your AI tools, plugins, and integrations with the community.
|
|
217
|
+
|
|
218
|
+
### How to Submit
|
|
219
|
+
|
|
220
|
+
**1. Create JSON Config** - Simple, structured format:
|
|
98
221
|
|
|
99
222
|
```json
|
|
100
223
|
{
|
|
@@ -114,15 +237,34 @@ console.log(await(await fetch('https://toolsdk-ai.github.io/awesome-mcp-registry
|
|
|
114
237
|
}
|
|
115
238
|
```
|
|
116
239
|
|
|
117
|
-
|
|
240
|
+
**2. Submit via Pull Request**
|
|
241
|
+
|
|
242
|
+
- [Fork this repository](https://github.com/toolsdk-ai/awesome-mcp-registry/fork)
|
|
243
|
+
- Create `your-mcp-server.json` in [packages/uncategorized](./packages/uncategorized)
|
|
244
|
+
- Submit a PR and join 4108+ MCP servers!
|
|
245
|
+
|
|
246
|
+
**3. Get Discovered**
|
|
247
|
+
|
|
248
|
+
Your MCP server will be:
|
|
249
|
+
- ✅ Listed in the registry
|
|
250
|
+
- 🔍 Searchable via REST API
|
|
251
|
+
- 📦 Available in npm package
|
|
252
|
+
- 🌐 Featured on our website
|
|
253
|
+
|
|
254
|
+
📖 **Detailed Guide**: [Contributing Documentation](./docs/guide.md)
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
<a id="mcp-servers"></a>
|
|
118
259
|
|
|
119
|
-
|
|
260
|
+
## 📋 MCP Servers Directory
|
|
120
261
|
|
|
121
|
-
|
|
262
|
+
**4108+ AI Agent Tools, LLM Integrations & Automation Servers**
|
|
122
263
|
|
|
123
|
-
|
|
264
|
+
- ✅ **Validated & Tested** (709) - Production-ready MCP servers
|
|
265
|
+
- ⚙️ **Community Contributed** (3399) - Requires configuration
|
|
124
266
|
|
|
125
|
-
|
|
267
|
+
Browse by category: Developer Tools, AI Agents, Databases, Cloud Platforms, APIs, and more!
|
|
126
268
|
|
|
127
269
|
|
|
128
270
|
|
|
@@ -1786,6 +1928,7 @@ Enhance your development workflow with tools for coding and environment manageme
|
|
|
1786
1928
|
- [❌ @fiveohhwon/workflows-mcp](https://github.com/fiveohhwon/workflows-mcp): Provides workflow management and automation through step-by-step execution with branching logic, conditional operations, template variables, and state persistence for complex multi-step processes like code reviews and data pipelines. (node)
|
|
1787
1929
|
- [❌ autodocument](https://github.com/pars-doe/autodocument): Automatically generates documentation, test plans, and code reviews for software repositories through a bottom-up analysis approach that respects .gitignore rules and handles existing file updates. (node)
|
|
1788
1930
|
- [❌ gdb-debugger](https://github.com/yywz1999/gdb-mcp-server): Integrates GDB with AI capabilities to provide interactive debugging assistance for C/C++ applications, enabling breakpoint management, memory examination, and execution flow analysis during debugging sessions. (python)
|
|
1931
|
+
- [❌ @juspay/neurolink](https://github.com/juspay/neurolink): Universal AI development platform unifying 12+ providers (OpenAI, Anthropic, Google, Bedrock, Azure) with built-in MCP support, multi-provider failover, and production-ready enterprise features (node)
|
|
1789
1932
|
- [❌ clojars-dependency-versions](https://github.com/bigsy/clojars-mcp-server): Retrieves information related to Clojure dependency management. (node)
|
|
1790
1933
|
- [❌ react-analyzer](https://github.com/azer/react-analyzer-mcp): Enables parsing and analysis of React component structures, props, and state management patterns for code review, debugging, and understanding complex React codebases (node)
|
|
1791
1934
|
- [❌ ansible](https://github.com/tarnover/mcp-sysoperator): Integrates with Ansible to enable infrastructure automation through direct execution of playbooks, ad-hoc commands, inventory management, and AWS resource operations for DevOps workflows (node)
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
3
|
import { serve } from "@hono/node-server";
|
|
4
4
|
import { swaggerUI } from "@hono/swagger-ui";
|
|
5
5
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
dotenv.config({ path: path.resolve(process.cwd(), ".env.local") });
|
|
13
|
-
dotenv.config({ path: path.resolve(process.cwd(), ".env") });
|
|
6
|
+
import { configRoutes } from "../domains/config/config-route";
|
|
7
|
+
import { packageRoutes } from "../domains/package/package-route";
|
|
8
|
+
import { searchRoutes } from "../domains/search/search-route";
|
|
9
|
+
import { SearchSO } from "../domains/search/search-so";
|
|
10
|
+
import { getServerPort, isSearchEnabled } from "../shared/config/environment";
|
|
11
|
+
import { getDirname } from "../shared/utils";
|
|
14
12
|
const initializeSearchService = async () => {
|
|
15
13
|
try {
|
|
16
|
-
await
|
|
14
|
+
await SearchSO.getInstance();
|
|
17
15
|
console.log("🔍 Search service initialized");
|
|
18
16
|
}
|
|
19
17
|
catch (error) {
|
|
@@ -21,22 +19,20 @@ const initializeSearchService = async () => {
|
|
|
21
19
|
console.log("💡 Install and start MeiliSearch to enable enhanced search features");
|
|
22
20
|
}
|
|
23
21
|
};
|
|
22
|
+
// Load search.html content
|
|
23
|
+
const __dirname = getDirname(import.meta.url);
|
|
24
|
+
const searchHtmlPath = join(__dirname, "../domains/search/search.html");
|
|
25
|
+
const searchHtmlContent = readFileSync(searchHtmlPath, "utf-8");
|
|
24
26
|
const app = new OpenAPIHono();
|
|
27
|
+
// Domain routes
|
|
25
28
|
app.route("/api/v1", packageRoutes);
|
|
26
|
-
|
|
29
|
+
app.route("/api/v1/config", configRoutes);
|
|
30
|
+
if (isSearchEnabled()) {
|
|
27
31
|
initializeSearchService().catch(console.error);
|
|
28
|
-
app.route("/api/v1", searchRoutes);
|
|
32
|
+
app.route("/api/v1/search", searchRoutes);
|
|
29
33
|
}
|
|
30
|
-
app.get("/",
|
|
31
|
-
|
|
32
|
-
const htmlPath = path.join(__dirname, "..", "search", "search.html");
|
|
33
|
-
const html = await fs.readFile(htmlPath, "utf8");
|
|
34
|
-
return c.html(html);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
console.error("Failed to load home page:", error);
|
|
38
|
-
return c.text("MCP Registry API Server is running!");
|
|
39
|
-
}
|
|
34
|
+
app.get("/", (c) => {
|
|
35
|
+
return c.html(searchHtmlContent);
|
|
40
36
|
});
|
|
41
37
|
app.get("/api/meta", async (c) => {
|
|
42
38
|
try {
|
|
@@ -50,6 +46,7 @@ app.get("/api/meta", async (c) => {
|
|
|
50
46
|
return c.json({ version: "unknown" });
|
|
51
47
|
}
|
|
52
48
|
});
|
|
49
|
+
// OpenAPI documentation
|
|
53
50
|
app.doc("/api/v1/doc", {
|
|
54
51
|
openapi: "3.0.0",
|
|
55
52
|
info: {
|
|
@@ -57,6 +54,7 @@ app.doc("/api/v1/doc", {
|
|
|
57
54
|
title: "MCP Registry API",
|
|
58
55
|
},
|
|
59
56
|
});
|
|
57
|
+
// Swagger UI
|
|
60
58
|
app.get("/swagger", swaggerUI({ url: "/api/v1/doc" }));
|
|
61
59
|
app.notFound((c) => {
|
|
62
60
|
return c.json({ success: false, code: 404, message: "[Registry API] Route not found" }, 404);
|
|
@@ -69,10 +67,10 @@ app.onError((err, c) => {
|
|
|
69
67
|
message: `[Registry API] Internal server error, errMsg: ${err.message}`,
|
|
70
68
|
}, 500);
|
|
71
69
|
});
|
|
72
|
-
const port =
|
|
73
|
-
console.log(`Server is running on: http://localhost:${port}`);
|
|
70
|
+
const port = getServerPort();
|
|
74
71
|
serve({
|
|
75
72
|
fetch: app.fetch,
|
|
76
73
|
port,
|
|
77
74
|
});
|
|
75
|
+
console.log(`🚀 Server is running on http://localhost:${port}`);
|
|
78
76
|
export default app;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { createRoute, OpenAPIHono } from "@hono/zod-openapi";
|
|
3
|
+
import { getDirname } from "../../shared/utils/file-util";
|
|
4
|
+
import { createResponse, createRouteResponses } from "../../shared/utils/response-util";
|
|
5
|
+
import { configSchemas } from "./config-schema";
|
|
6
|
+
const __dirname = getDirname(import.meta.url);
|
|
7
|
+
export const configRoutes = new OpenAPIHono();
|
|
8
|
+
const featuredRoute = createRoute({
|
|
9
|
+
method: "get",
|
|
10
|
+
path: "/featured",
|
|
11
|
+
responses: createRouteResponses(configSchemas.FeaturedResponseSchema),
|
|
12
|
+
});
|
|
13
|
+
configRoutes.openapi(featuredRoute, async (c) => {
|
|
14
|
+
const featuredPath = path.join(__dirname, "../../../config/featured.mjs");
|
|
15
|
+
const featuredModule = await import(`file://${featuredPath}`);
|
|
16
|
+
const featured = featuredModule.default;
|
|
17
|
+
const response = createResponse(featured);
|
|
18
|
+
return c.json(response, 200);
|
|
19
|
+
});
|
|
20
|
+
const categoriesRoute = createRoute({
|
|
21
|
+
method: "get",
|
|
22
|
+
path: "/categories",
|
|
23
|
+
responses: createRouteResponses(configSchemas.CategoriesResponseSchema),
|
|
24
|
+
});
|
|
25
|
+
configRoutes.openapi(categoriesRoute, async (c) => {
|
|
26
|
+
const categoriesPath = path.join(__dirname, "../../../config/categories.mjs");
|
|
27
|
+
const categoriesModule = await import(`file://${categoriesPath}`);
|
|
28
|
+
const categories = categoriesModule.default;
|
|
29
|
+
const response = createResponse(categories);
|
|
30
|
+
return c.json(response, 200);
|
|
31
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const configSchemas: {
|
|
3
|
+
FeaturedResponseSchema: z.ZodObject<{
|
|
4
|
+
success: z.ZodBoolean;
|
|
5
|
+
code: z.ZodNumber;
|
|
6
|
+
message: z.ZodString;
|
|
7
|
+
} & {
|
|
8
|
+
data: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
success: boolean;
|
|
11
|
+
code: number;
|
|
12
|
+
message: string;
|
|
13
|
+
data?: string[] | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
success: boolean;
|
|
16
|
+
code: number;
|
|
17
|
+
message: string;
|
|
18
|
+
data?: string[] | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
CategoriesResponseSchema: z.ZodObject<{
|
|
21
|
+
success: z.ZodBoolean;
|
|
22
|
+
code: z.ZodNumber;
|
|
23
|
+
message: z.ZodString;
|
|
24
|
+
} & {
|
|
25
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
key: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
description: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
name: string;
|
|
31
|
+
key: string;
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
key: string;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
}>, "many">>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
success: boolean;
|
|
40
|
+
code: number;
|
|
41
|
+
message: string;
|
|
42
|
+
data?: {
|
|
43
|
+
name: string;
|
|
44
|
+
key: string;
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
success: boolean;
|
|
49
|
+
code: number;
|
|
50
|
+
message: string;
|
|
51
|
+
data?: {
|
|
52
|
+
name: string;
|
|
53
|
+
key: string;
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { BaseResponseSchema, CategoryConfigSchema } from "../../shared/schemas/common-schema";
|
|
3
|
+
export const configSchemas = {
|
|
4
|
+
FeaturedResponseSchema: BaseResponseSchema.extend({
|
|
5
|
+
data: z.array(z.string()).optional(),
|
|
6
|
+
}).openapi("FeaturedResponse"),
|
|
7
|
+
CategoriesResponseSchema: BaseResponseSchema.extend({
|
|
8
|
+
data: z.array(CategoryConfigSchema).optional(),
|
|
9
|
+
}).openapi("CategoriesResponse"),
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MCPSandboxProvider } from "../sandbox/sandbox-types";
|
|
2
|
+
import type { ToolExecutor } from "./executor-types";
|
|
3
|
+
/**
|
|
4
|
+
* Executor Factory
|
|
5
|
+
* Creates appropriate executor based on sandbox provider configuration
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExecutorFactory {
|
|
8
|
+
static create(provider: MCPSandboxProvider): ToolExecutor;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LocalExecutor } from "./local-executor";
|
|
2
|
+
import { SandboxExecutor } from "./sandbox-executor";
|
|
3
|
+
/**
|
|
4
|
+
* Executor Factory
|
|
5
|
+
* Creates appropriate executor based on sandbox provider configuration
|
|
6
|
+
*/
|
|
7
|
+
// biome-ignore lint/complexity/noStaticOnlyClass: Factory pattern
|
|
8
|
+
export class ExecutorFactory {
|
|
9
|
+
static create(provider) {
|
|
10
|
+
if (provider === "LOCAL") {
|
|
11
|
+
console.log("[ExecutorFactory] Creating LocalExecutor");
|
|
12
|
+
return new LocalExecutor();
|
|
13
|
+
}
|
|
14
|
+
console.log(`[ExecutorFactory] Creating SandboxExecutor with provider: ${provider}`);
|
|
15
|
+
return new SandboxExecutor(provider);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
export interface ToolExecuteRequest {
|
|
3
|
+
packageName: string;
|
|
4
|
+
toolKey: string;
|
|
5
|
+
inputData: Record<string, unknown>;
|
|
6
|
+
envs?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Tool Executor Interface
|
|
10
|
+
* Unified abstraction for local and sandbox execution
|
|
11
|
+
*/
|
|
12
|
+
export interface ToolExecutor {
|
|
13
|
+
executeTool(request: ToolExecuteRequest): Promise<unknown>;
|
|
14
|
+
listTools(packageName: string): Promise<Tool[]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { ToolExecuteRequest, ToolExecutor } from "./executor-types";
|
|
3
|
+
/**
|
|
4
|
+
* Local Executor
|
|
5
|
+
* Executes MCP tools in local environment
|
|
6
|
+
*/
|
|
7
|
+
export declare class LocalExecutor implements ToolExecutor {
|
|
8
|
+
private readonly packageRepository;
|
|
9
|
+
constructor();
|
|
10
|
+
executeTool(request: ToolExecuteRequest): Promise<unknown>;
|
|
11
|
+
listTools(packageName: string): Promise<Tool[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { getDirname } from "../../shared/utils/file-util";
|
|
3
|
+
import { getMcpClient } from "../../shared/utils/mcp-client-util";
|
|
4
|
+
import { PackageRepository } from "../package/package-repository";
|
|
5
|
+
/**
|
|
6
|
+
* Local Executor
|
|
7
|
+
* Executes MCP tools in local environment
|
|
8
|
+
*/
|
|
9
|
+
export class LocalExecutor {
|
|
10
|
+
constructor() {
|
|
11
|
+
const __dirname = getDirname(import.meta.url);
|
|
12
|
+
const packagesDir = path.join(__dirname, "../../../packages");
|
|
13
|
+
this.packageRepository = new PackageRepository(packagesDir);
|
|
14
|
+
}
|
|
15
|
+
async executeTool(request) {
|
|
16
|
+
const mcpServerConfig = this.packageRepository.getPackageConfig(request.packageName);
|
|
17
|
+
const { client, closeConnection } = await getMcpClient(mcpServerConfig, request.envs || {});
|
|
18
|
+
try {
|
|
19
|
+
const result = await client.callTool({
|
|
20
|
+
name: request.toolKey,
|
|
21
|
+
arguments: request.inputData,
|
|
22
|
+
});
|
|
23
|
+
console.log(`[LocalExecutor] Tool ${request.toolKey} executed successfully`);
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
await closeConnection();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async listTools(packageName) {
|
|
31
|
+
const mcpServerConfig = this.packageRepository.getPackageConfig(packageName);
|
|
32
|
+
const mockEnvs = {};
|
|
33
|
+
if (mcpServerConfig.env) {
|
|
34
|
+
Object.keys(mcpServerConfig.env).forEach((key) => {
|
|
35
|
+
mockEnvs[key] = "mock_value";
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const { client, closeConnection } = await getMcpClient(mcpServerConfig, mockEnvs);
|
|
39
|
+
try {
|
|
40
|
+
const { tools } = await client.listTools();
|
|
41
|
+
console.log(`[LocalExecutor] Tools list retrieved successfully for package ${packageName}`);
|
|
42
|
+
return tools;
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
await closeConnection();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { MCPSandboxProvider } from "../sandbox/sandbox-types";
|
|
3
|
+
import type { ToolExecuteRequest, ToolExecutor } from "./executor-types";
|
|
4
|
+
/**
|
|
5
|
+
* Sandbox Executor
|
|
6
|
+
* Executes MCP tools in sandbox environment
|
|
7
|
+
*/
|
|
8
|
+
export declare class SandboxExecutor implements ToolExecutor {
|
|
9
|
+
private readonly provider;
|
|
10
|
+
private readonly sandboxPool;
|
|
11
|
+
private readonly packageRepository;
|
|
12
|
+
private readonly localExecutor;
|
|
13
|
+
constructor(provider: MCPSandboxProvider);
|
|
14
|
+
executeTool(request: ToolExecuteRequest): Promise<unknown>;
|
|
15
|
+
listTools(packageName: string): Promise<Tool[]>;
|
|
16
|
+
}
|