A Model Context Protocol (MCP) server for executing Deno TypeScript/JavaScript code. This server allows LLMs like Claude to run Deno code securely with configurable permissions.
Before using this MCP server, ensure you have:
git clone https://github.com/Timtech4u/deno-mcp.git
cd deno-mcp
npm install
npm run build
Open your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the Deno MCP server configuration:
{
"mcpServers": {
"deno": {
"command": "node",
"args": [
"/absolute/path/to/deno-mcp/dist/index.js"
],
"disabled": false,
"autoApprove": [
"execute_deno_code",
"check_deno_version"
]
}
}
}
Replace /absolute/path/to/deno-mcp
with the actual path where you cloned the repository.
Restart Claude Desktop.
Open your Cline MCP settings file:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Add the Deno MCP server configuration:
{
"mcpServers": {
"deno": {
"command": "node",
"args": [
"/absolute/path/to/deno-mcp/dist/index.js"
],
"disabled": false,
"autoApprove": [
"execute_deno_code",
"check_deno_version"
]
}
}
}
Replace /absolute/path/to/deno-mcp
with the actual path where you cloned the repository.
Restart Cline or reload the window.
Once configured, you can ask Claude to run Deno code in various ways. Here are some examples:
You can run simple Deno code without any special permissions:
Can you run this Deno code for me?
console.log("Hello from Deno!");
console.log("Version:", Deno.version);
console.log("Current directory:", Deno.cwd());
To make HTTP requests, you need to grant network permissions:
Run this Deno code with network permissions:
async function fetchData() {
const response = await fetch("https://jsonplaceholder.typicode.com/todos/1");
const data = await response.json();
console.log("Fetched data:", data);
}
await fetchData();
To read or write files, you need to grant file system permissions:
Run this Deno code with file system permissions:
const text = "Hello, Deno File System!";
await Deno.writeTextFile("./hello.txt", text);
console.log("File written successfully");
const content = await Deno.readTextFile("./hello.txt");
console.log("File content:", content);
You can combine multiple permissions:
Run this Deno code with network and file system permissions:
const response = await fetch("https://jsonplaceholder.typicode.com/todos/1");
const data = await response.json();
await Deno.writeTextFile("./todo.json", JSON.stringify(data, null, 2));
console.log("Todo data saved to file");
You can use Deno's standard library:
Run this Deno code with network permissions:
import { serve } from "https://deno.land/std@0.192.0/http/server.ts";
const handler = (req) => new Response("Hello, Deno Server!");
console.log("HTTP server running on http://localhost:8000");
serve(handler, { port: 8000 });
Executes Deno TypeScript/JavaScript code.
Parameters:
code
(string, required): The Deno code to executepermissions
(array of strings, optional): List of permissions to grant (e.g., "net", "read", "write", "env", "run", etc.)unstable
(boolean, optional): Whether to enable unstable featurestypescript
(boolean, optional): Whether the code is TypeScript (true) or JavaScript (false)Example usage through Claude:
Can you run this Deno code with permissions for network and file system access?
const response = await fetch("https://api.github.com/users/denoland");
const data = await response.json();
await Deno.writeTextFile("./deno-github.json", JSON.stringify(data, null, 2));
console.log("GitHub data for Deno saved to file");
Returns information about the installed Deno version.
Example usage through Claude:
Can you check what version of Deno I have installed?
If you see an error like "Deno is not installed", make sure Deno is installed and available in your system PATH.
If your code fails with permission errors, make sure you're requesting the appropriate permissions:
"net"
"read"
and/or "write"
"env"
"run"
The server has a 30-second timeout for code execution. If your code takes longer than that, it will be terminated.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
{
"mcpServers": {
"deno": {
"env": {},
"args": [
"/absolute/path/to/deno-mcp/dist/index.js"
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.