@kernel-labs/mcp-sandbox
Version:
MCP Sandbox on E2B
48 lines (31 loc) • 1.55 kB
Markdown
'center'><b>Run Model Context Protocol (MCP) servers in E2B's sandbox environment</b></p>
<div align="center">
[](https://www.npmjs.com/package/@netglade/mcp-sandbox)
[](https://opensource.org/licenses/MIT)
```bash
npm install @kernel-labs/mcp-sandbox
```
```javascript
import { startMcpSandbox } from '@kernel-labs/mcp-sandbox';
// Start the MCP sandbox
const mcpSandbox = await startMcpSandbox({
command: 'npx -y @modelcontextprotocol/server-brave-search',
apiKey: 'e2b_****',
templateName: 'your-template' // Optional
});
// Get the MCP server URL to connect your AI assistant
const mcpUrl = mcpSandbox.getUrl();
console.log("MCP server URL:", mcpUrl);
```
1. **MCP Server Execution**: Uses [supergateway](https://github.com/supercorp-ai/supergateway) to run stdio-based MCP servers over SSE (Server-Sent Events)
2. **Sandbox Environment**: Runs in [E2B](https://e2b.dev)'s secure sandbox environment, providing isolated execution
3. **Tool Integration**: Seamlessly connects AI assistants with real-world tools and data sources
4. **Browser Support**: Everything runs directly in the browser without local dependencies
Do not open PRs before having discussed issue in GH. Saves everyone time!
[ ](LICENSE)
<p align=