Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

deno-mcp-template

MCP.Pizza Chef: phughesmcr

deno-mcp-template is a starter repository designed for developers to easily create and publish MCP servers using the Deno runtime and TypeScript. It provides a streamlined, ready-to-use template with CI/CD workflows, licensing, and deployment configurations, enabling rapid development of MCP servers that integrate with the Model Context Protocol ecosystem.

Use This MCP server To

Bootstrap new MCP servers with Deno and TypeScript Develop and test MCP server implementations rapidly Deploy MCP servers with integrated CI/CD pipelines Create reusable MCP server templates for team projects Publish MCP servers with automated release workflows

README

Deno MCP Template Repo

GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status

Typescript License Repo Size Sponsor

Repo Logo

A simple template for writing MCP servers using Deno, publishing them using JSR.io, and optionally using hosting on Deno Deploy.

The example server also uses Deno KV to implement a simple knowledge graph tool, and allow for session resumability.

‼️ By default this template server calls await Deno.openKv() - all KV functionality will be shared across users who access your server through "command": "deno run -A --unstable-kv jsr:@your-scope/your-package. You probably don't want this in production. Make sure user's can only read what they should have access to!

ℹ️ Deno is required. Use npm install -g deno or curl -fsSL <https://deno.land/install.sh> | sh

Usage

Replace the server name, and the package location in the following examples to correspond to your own MCP server.

You can set HOSTNAME and PORT in a .env if desired.

claude-desktop-config.json using the MCP server published on JSR

{
    "mcpServers": {
        "my-mcp-server": {
            "command": "deno run -A --unstable-kv jsr:@your-scope/your-package"
        },
    }
}

claude-desktop-config.json manually using the HTTP endpoint

Start the server using deno task start.

{
    "mcpServers": {
        "my-mcp-server": {
            "url": "http://localhost:3001/mcp"
        },
    }
}

claude-desktop-config.json using the STDIO server

{
    "mcpServers": {
        "my-mcp-server": {
            "command": "deno run -A --unstable-kv absolute/path/to/main.ts"
        },
    }
}

Compiling to a binary

Run deno task compile.

You can then use your binary like any other MCP server, for example:

{
    "mcpServers": {
        "my-local-mcp-server": {
            "command": "absolute/path/to/binary"
        },
    }
}

See Deno Compile Docs for more information.

Development

⚠️ You must grep this repo for "phughesmcr", "P. Hughes", "github@phugh.es", and "deno-mcp-template", and replace them with your own information.

⚠️ Remember to set any environment variables in both your Github repo settings and your Deno Deploy project settings (if applicable).

⚠️ Remember to check all files in routes/ and static/ as some of these files (e.g. openapi.yaml) will need modifying to match your MCP server's capabilities / endpoints.

ℹ️ The example server runs with deno run -A which enables all of Deno's permissions. You should finetune the permissions before deploying to production.

ℹ️ Run deno task prep to run the formatter, linter, and code checker.

Publishing on JSR

In order for users to be able to run your server from the internet this example uses JSR.io for publishing servers.

JSR is "the open-source package registry for modern JavaScript and TypeScript", and works similarly to NPM.

Publishing your server in this way allows the user to run it using deno run jsr:@your_scope/your_server_name instead of having to clone the repo and set an absolute path.

For this to work, you will need to setup you JSR.io account and replace the relevant values in the codebase to match your package name and scope.

If you do not want to publish on JSR, remove .github/workflows/publish.yml.

Hosting on Deno Deploy

Using Deno Deploy is not necessary if you only want your server to be published through JSR. However, implementing a simple server using Deno Deploy can be useful in several ways. For example, hosting an llms.txt file which describes your server to LLMs; adding an auth route; etc.

For this to work, you will need to setup your Deno Deploy and replace the relevant values in the codebase to match your package name.

If you do not plan on using Deploy, remove .github/workflows/deploy.yml.

DB with Deno KV

"Deno KV is a key-value database built directly into the Deno runtime, available in the Deno.Kv namespace. It can be used for many kinds of data storage use cases, but excels at storing simple data structures that benefit from very fast reads and writes. Deno KV is available in the Deno CLI and on Deno Deploy." - Deno KV Manual

Deno KV can be used without any additional dependencies or installs. Locally it will create a file-based database, and if you're using Deploy it is built right in, with no extra config.

This template server implements the Knowledge Graph Memory Server example, from The ModelContextProtocol Github, using KV to store and retrieve the graph.

Extras

The repo includes the following quality-of-life files which aren't necessary for the server to run but which will enhance your vibecoding:

  • .cursor/rules/ agent rules for Cursor.
  • .github/ adds Github sponsors info to your repo, and other Github features such as workflows.
  • .vscode/ has some recommended extensions and makes Deno the default formatter.
  • vendor/schema.ts is the 2025-03-26 MCP schema from Anthropic.
  • CLAUDE.md is a starter file for Claude Code. Run claude init after your first changes to keep it up-to-date.
  • .cursorignore tells Cursor to exclude files in addition to .gitignore.
  • *.md. These markdown files, e.g. "CODE_OF_CONDUCT.md", add various tabs and tags to you Github repo and help with community management.

More Information

Introducing the Model Context Protocol.

The ModelContextProtocol Github.

Acknowledgements

vendor/schema.ts is the 2025-03-26 MCP schema from Anthropic (MIT License).

License

MIT

deno-mcp-template FAQ

How do I start using the deno-mcp-template?
Clone the repo, install Deno, and follow the README to run and customize your MCP server.
Does this template support automated testing and deployment?
Yes, it includes GitHub Actions workflows for CI, release, deploy, and publish.
Can I customize the MCP server logic in this template?
Absolutely, the template is designed for easy extension and customization of MCP server features.
Is this template limited to any specific MCP server functionality?
No, it is a general-purpose template for any MCP server built with Deno.
What programming language is used in this template?
The template uses TypeScript running on the Deno runtime.
Is there licensing information included?
Yes, the repository includes an open-source license for usage and contributions.
Can this template be used for production MCP servers?
Yes, with proper customization and testing, it supports production-ready MCP server development.