-
Notifications
You must be signed in to change notification settings - Fork 1.9k
WIP: feat(agent-infra): add mcp-hub #1286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for agent-tars-docs canceled.
|
|
|
||
| // If disabling, update config | ||
| if (disable) { | ||
| serverConfig.disabled = true; |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
user controlled input
| const { code, server_name } = req.query; | ||
|
|
||
| try { | ||
| if (!code || !server_name) { |
Check failure
Code scanning / CodeQL
User-controlled bypass of security check High
action
user-provided value
| const { code, server_name } = req.query; | ||
|
|
||
| try { | ||
| if (!code || !server_name) { |
Check failure
Code scanning / CodeQL
User-controlled bypass of security check High
action
user-provided value
| false, | ||
| ); | ||
| res.write( | ||
| `<script>updateStatus("error", "${error.message.replace(/"/g, '\\"')}");</script>`, |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
| } | ||
|
|
||
| logger.debug(`Executing command: ${command}`); | ||
| const { stdout } = await execPromise(command, { |
Check warning
Code scanning / CodeQL
Indirect uncontrolled command line Medium
environment variable
This command depends on an unsanitized
environment variable
| // File output | ||
| if (this.enableFileLogging) { | ||
| try { | ||
| fs.appendFileSync(this.logFile, message + '\n'); |
Check warning
Code scanning / CodeQL
Network data written to file Medium
Untrusted data
Write to file system depends on
Untrusted data
✅ Deploy Preview for tarko canceled.
|
This pull request introduces a complete example integration suite for MCP Hub, including documentation, a Node.js client, and core infrastructure for the MCP Hub server package. The main changes focus on making MCP Hub easier to use and integrate with other tools, providing clear usage patterns, and improving development workflows.
New Examples and Documentation
README.mdin theexamplesdirectory, detailing MCP Hub architecture, client responsibilities, API endpoints, event system, best practices, and troubleshooting. This helps new users understand how to integrate with MCP Hub and manage its lifecycle.node-client.js) that demonstrates server lifecycle management, event handling via SSE, tool/resource invocation, and robust error handling. This serves as both a reference implementation and a practical integration point for Node.js environments.Core Infrastructure for MCP Hub
src/utils/cli.ts) for MCP Hub, supporting flexible configuration, robust argument parsing, and auto-shutdown features. This makes it easy to start and manage MCP Hub servers from the command line.src/utils/dev-watcher.ts) to support hot-reloading and file change tracking during development, improving developer experience for MCP Hub plugin and server authors.package.json,rslib.config.ts) to enable publishing, building, and testing MCP Hub as a standalone npm package, including dependency management and build scripts. [1] [2]Minor Codebase Cleanup
WorkspaceHeader.tsxfile, likely as part of general code hygiene.References:
[1] [2] [3] [4] [5] [6] [7]