Gene Library Courses Download Pricing Contact Sign in
riza logo
developer-tools Official Website

Riza MCP Server – Secure Code Interpreter

Riza provides a hosted MCP server and a local MCP server package for giving AI agents access to its Code Interpreter API. Agents can execute generated code in isolated Riza environments instead of running untrusted code on local or production infrastructure.

#code-execution#sandbox#mcp

Overview

Riza is a code execution platform for safely running untrusted code, including code generated by LLMs. Its MCP integration connects AI agents to the Riza Code Interpreter so they can execute snippets and, through the local package, work with saved Riza tools without embedding code execution directly inside the agent host.

What the MCP server enables

Riza documents a hosted remote MCP server at https://mcp.riza.io/code-interpreter for standards-compliant MCP clients. This remote server lets an agent call Riza's code interpreter as an external tool using a Riza API key. Riza also maintains the @riza-io/riza-mcp package, which wraps the Riza API and exposes tools for creating, fetching, executing, editing, and listing saved Riza tools.

The underlying Code Interpreter API is designed for executing untrusted code in isolated environments. Riza documentation describes support for languages such as Python, JavaScript, Ruby, and PHP, with examples for data analysis, data extraction, and other LLM-generated code workflows. This makes the MCP server useful when an assistant needs to calculate, transform data, test short scripts, or automate repeatable code-based tasks without relying on the user's machine.

When to use it

Use the Riza MCP server when an AI agent needs code execution as part of its workflow: analyzing uploaded data, computing exact answers, transforming structured text, extracting data from documents or web pages, or maintaining reusable Riza tools. It is especially useful when generated code is not fully trusted and should be executed in Riza rather than in an IDE, desktop client, application server, or production environment.

Connection and authentication

The hosted remote MCP endpoint uses https://mcp.riza.io/code-interpreter and requires an Authorization: Bearer header containing a Riza API key. The local stdio server is started with npx @riza-io/riza-mcp and expects the RIZA_API_KEY environment variable. API keys should be created in the Riza dashboard, stored as secrets, and scoped operationally according to the client environment where the MCP server is configured.

Key considerations

Code execution should still be treated as a sensitive capability. Riza isolates execution, but clients should avoid sending unnecessary secrets or private data into generated code. Riza's documentation notes interpreter-specific behavior such as read-only filesystems in runtime environments and network access being blocked by default unless allowed through request parameters. Choose the hosted endpoint when a remote MCP-capable client is available; choose the local stdio package when using desktop or IDE clients that launch local MCP servers.

Supported Transports

streamable_http

URL: https://mcp.riza.io/code-interpreter

stdio

Command: npx

Args:

  • @riza-io/riza-mcp

Frequently Asked Questions

When should an AI agent use the Riza MCP server?
Use it when an agent needs to execute generated code safely, such as for calculations, data analysis, extraction workflows, or code-backed transformations that should not run on the user's local or production machine.
What does the Riza MCP server add to an AI agent's capabilities?
It gives the agent access to Riza's Code Interpreter through MCP, allowing code execution in isolated Riza environments. The local package also exposes operations for creating, fetching, executing, editing, and listing saved Riza tools.
What languages and workflows are supported by Riza's code execution platform?
Riza documentation describes support for executing Python, JavaScript, Ruby, and PHP. Documented workflows include data analysis, data extraction, and other cases where LLMs write code that needs to be executed safely.
How is authentication configured for the Riza MCP server?
Both the hosted remote endpoint and local server require a Riza API key. Remote clients send it as an Authorization bearer token, while the local stdio package expects the key in the RIZA_API_KEY environment variable.
Which transport should be used for the Riza MCP server?
Use the hosted streamable HTTP endpoint when the MCP client supports remote servers and bearer headers. Use the local stdio package with npx when the client launches local MCP servers, such as desktop or IDE configurations.