Deno MCP Template Repo
A template repo for writing and publishing MCP servers using Deno.
phughesmcr
README
Deno MCP Template Repo

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 SSE endpoint
Start the server using deno task start.
{
"mcpServers": {
"my-mcp-server": {
"url": "http://localhost:3001/sse"
},
}
}
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/mcp.jsonadds the MCP server to 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.tsis the 2025-03-26 MCP schema from Anthropic.CLAUDE.mdis a starter file for Claude Code. Runclaude initafter your first changes to keep it up-to-date..cursorignoretells 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor
Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.