frontmcp
Verified Safeby agentfront
Overview
The CodeCall plugin provides AgentScript-based meta-tools for orchestrating MCP tools, enabling programmatic discovery, description, execution, and invocation of server capabilities within a sandboxed JavaScript environment.
Installation
npx tsx apps/e2e/demo-e2e-codecall/src/main.tsEnvironment Variables
- PORT
- MCP_SESSION_SECRET
- REDIS_URL
- REDIS_HOST
- UPSTASH_REDIS_REST_URL
- UPSTASH_REDIS_REST_TOKEN
- KV_REST_API_URL
- KV_REST_API_TOKEN
- MCP_LLM_API_KEY
- OPENAI_API_KEY
- ANTHROPIC_API_KEY
- GOOGLE_API_KEY
- MISTRAL_API_KEY
- COHERE_API_KEY
- AZURE_OPENAI_API_KEY
- FRONTMCP_SERVERLESS
- MACHINE_ID_PATH
- OPENAPI_BASE_URL
- OPENAPI_SPEC_URL
- STATIC_AUTH_JWT
Security Notes
The CodeCall plugin allows execution of user-provided AgentScript (JavaScript) in a sandboxed VM (`enclave-vm`). While inherently risky, the project implements strong security measures: 1. Sandboxing: Scripts run in `enclave-vm`, preventing direct access to Node.js internals like `process` or `require`. 2. Malicious Pattern Detection: Explicitly blocks use of `eval`, `Function` constructor, and dynamic `import` statements within the VM. 3. Self-Reference Guard: Prevents `codecall` meta-tools (like `codecall:execute`) from calling themselves, mitigating recursive attacks. 4. Tool Access Control: Configurable blacklists/whitelists restrict which tools can be invoked from within AgentScript. 5. Output Sanitization: Limits output size and removes stack traces to prevent data leakage and excessive payload sizes. 6. Script Size Limits: Scripts are constrained by length to prevent resource exhaustion. These comprehensive controls significantly mitigate the risks associated with executing untrusted code, making it reasonably safe for its intended purpose.
Similar Servers
mcp-proxy
A TypeScript streamable HTTP and SSE proxy for MCP servers that use stdio transport.
mcp-server-typescript
Provides a Model Context Protocol (MCP) server to enable AI assistants to access DataForSEO's SEO data APIs through a standardized interface.
boilerplate-mcp-server
Provides a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript to connect AI assistants with external APIs and data sources, exemplified by an IP geolocation tool.
mcp-typescript-template
This project provides a foundational TypeScript template for developing remote Model Context Protocol (MCP) servers with robust tooling and best practices.