Get the FREE Ultimate OpenClaw Setup Guide →

deno -template

A template repo for writing and publishing local, remote, DXT, and binary MCP servers using Deno.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phughesmcr-deno-mcp-template deno run -A /absolute/path/to/main.ts \
  --env DEN0="Path to the main server entry (replace with actual path)"

How to use

This MCP server template provides a ready-to-extend Deno-based MCP server with the standard MCP transports (STDIO and HTTP) and a fleshed-out project structure. It ships with built-in features such as rate limiting, CORS, session management, TLS support, structured logging, and a persistent Deno KV state store. The codebase is organized to be approachable for contributors and AI agents, with sandboxed execution for untrusted code and a modular layout for prompts, resources, tools, and task workflows. You can run the server locally via STDIO or expose it over HTTP, and you can publish or deploy in several formats (JSR package, native binary, or Deno Deploy) from the same source tree.

How to install

Prerequisites:

  • Deno installed on your system
  • Git for cloning the template
  • Optional: Node.js/npm if you plan to work with tooling or publish assets

Step-by-step:

  1. Install Deno (if needed):
  2. Clone the template repository or create a project from the template: gh repo clone phughesmcr/deno-mcp-template cd deno-mcp-template
  3. Install dependencies if your template uses a package manager or needs setup tasks (see package.json or deno.json):
    • In this template, use Deno tasks defined in deno.json (see setup task below).
  4. Run the one-time setup to rename placeholders and finalize configuration: deno task setup
  5. Start the server (STDIO + HTTP on localhost:3001 by default): deno task start
  6. (Optional) Run in development mode with MCP Inspector for interactive testing: deno task dev

Note: Adjust the entry path in your mcp_config to point to your main.ts once you customize the template for your project.

Additional notes

Tips and common considerations:

  • The template emphasizes a dual transport model (STDIO and HTTP). If you deploy to a different environment, ensure the HTTP port and host are configured to your target environment.
  • Default entry path in the example should be updated to your actual main.ts or equivalent bootstrap file.
  • When publishing as a JSR package or compiling a binary, follow the platform-specific tasks documented in the repository (compile:all, dxt:all, etc.).
  • You can customize tools, prompts, resources, and task workflows under the src/mcp/ directories; keep barrel exports in src/mcp/mod.ts aligned with your additions.
  • If you expand or modify environment-sensitive features (secrets, TLS, KV stores), make sure to configure the appropriate env vars and secret management practices for your deployment target.

Related MCP Servers

Sponsor this space

Reach thousands of developers