mcpField
M
Mathematical Code Execution

Mathematical Code Execution

Remote
saifs.aiDeveloper Tools1Updated 6d ago

About Mathematical Code Execution

Mathematical Code Execution is a Python-only sandbox for agent hosts that need calculations or simple PDF output. It runs code in an isolated process without network access, filesystem access, or package installation.

Key features

  1. 01Run allow-listed Python code
  2. 02Return stdout, stderr, and exit code
  3. 03Generate one-page PDFs with fpdf
  4. 04Isolated execution without network or filesystem access
  5. 05numpy available; no package installs

Use cases

  1. 01Calculate statistics from supplied data
  2. 02Multiply matrices with numpy
  3. 03Create a one-page PDF summary

MCP support

Exposes the `execute_code` tool to MCP clients through a remote Streamable HTTP server. OAuth 2.1 authentication uses PKCE and dynamic client registration.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://code-execution-mcp.saifs.ai/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

Details

From the project README

Mathematical Code Execution

A Python-only sandbox for agent hosts. The model writes Python that prints a result (or a one-page PDF via preinstalled fpdf); this server runs it in an isolated process with no network, no user filesystem and no package installs. Other languages are refused. numpy is available; scipy and pandas are not.

Registry nameai.saifs/code-execution
Endpointhttps://code-execution-mcp.saifs.ai/mcp
TransportStreamable HTTP (remote, nothing to install)
AuthOAuth 2.1 — PKCE (S256) and dynamic client registration; your client opens a sign-in page on first use
PublisherSAIFS AI

Install

VS Code / GitHub Copilot

Add to .vscode/mcp.json (workspace) or your user mcp.json:

{
  "servers": {
    "saifs-code-execution": {
      "type": "http",
      "url": "https://code-execution-mcp.saifs.ai/mcp"
    }
  }
}

Then start the server from the MCP view and sign in when prompted.

Claude (claude.ai, Desktop)

Settings → Connectors → Add custom connector, and paste:

https://code-execution-mcp.saifs.ai/mcp
Claude Code
claude mcp add --transport http saifs-code-execution https://code-execution-mcp.saifs.ai/mcp
Any other MCP client

Point it at https://code-execution-mcp.saifs.ai/mcp using the Streamable HTTP transport. The server returns 401 with a WWW-Authenticate: Bearer … resource_metadata=… challenge, so OAuth-aware clients sign in automatically.

Tools

ToolWhat it does
execute_codeRuns allow-listed Python and returns stdout, stderr, exit code, and any PDF written with fpdf (output("name.pdf"), download link expires in 1 hour). Non-Python is rejected with a one-line warning.

Example prompts

  • “Run Python to compute the mean and standard deviation of this list and print the result.”
  • “Write a short numpy snippet that multiplies these two matrices and prints the product.”
  • “Generate a one-page PDF invoice summary with fpdf and give me the download link.”

Support

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.