project

project is a cursor rule for Cursor from phughesmcr/deno-mcp-template. It costs 3,007 tokens per session, scanned A, original, MIT.

A project-level guide for developing a Deno-based MCP server. It documents commands, code organization, HTTP behavior, and how separate protocol connections are managed.

In plain words
What is it for?
Use it when starting, testing, formatting, or changing the server, its host application, HTTP layer, or MCP resources and tools.
Why use it?
It gives an agent the project's development rules in one place, reducing guesses about which commands, folders, and patterns to use.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/phughesmcr/deno-mcp-template/project
Clone the repo
git clone --depth 1 https://github.com/phughesmcr/deno-mcp-template

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for project

README.md
[![agentmods](https://agentmods.dev/badge/rules/phughesmcr/deno-mcp-template/project.svg)](https://agentmods.dev/rules/phughesmcr/deno-mcp-template/project)
Your own site
<a href="https://agentmods.dev/rules/phughesmcr/deno-mcp-template/project"><img src="https://agentmods.dev/badge/rules/phughesmcr/deno-mcp-template/project.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,007 This file is loaded in full into every session.
When invoked 3,007 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03007 $0.03007
Opus 5 $0.01503 $0.01503
Sonnet 5 $0.00601 $0.00601
Haiku 4.5 $0.00301 $0.00301

Measured 5d ago against content hash 0690e3fca2c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/project.mdc · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Deno MCP Template Development Guide

Deno version: ^2.6.0

Build/Development Commands

Start: deno task start Dev mode: deno task dev Format, lint, and type-check code: deno task ci Rebuild MCP App HTML (after editing mcp-ui/): deno task build:mcp-ui (Deno installs npm deps from mcp-ui/deno.json imports into mcp-ui/node_modules using mcp-ui/deno.lock; no Node.js) Tests with coverage: deno task test:coverage Benchmarks: deno task bench

Architecture

src/mcp/ vs src/app/

  • src/mcp/ — MCP server: prompts, resources, tools, tasks, apps, server wiring.
  • src/app/ — Host shell: transport bootstrapping, HTTP (Hono on Deno.serve), lifecycle, permissions preflight, KV, cron, signals.

HTTP stack

Middleware includes rate limiting, CORS, optional bearer auth (see src/app/http/hono.ts), security headers, request timeouts, and session handling.

Transport-scoped McpServer instances

The MCP TypeScript SDK allows one active transport per protocol instance. This template creates a separate McpServer per transport binding, not one shared instance:

  • STDIO: one long-lived McpServer for the lifetime of the STDIO transport (createApp in src/app/app.ts).
  • HTTP (streamable): one new McpServer per MCP HTTP session (factory in createHttpServer / Hono setup).

Process-wide state — Deno KV, resource subscription tracker, task queue worker, etc. — lives outside those instances. The factory receives the same McpServerFactoryContext each time (including shared subscriptions) so STDIO and all HTTP sessions stay consistent.

Security and transport toggles

  • Host header validation (aligned with MCP SDK Hono middleware): on loopback listen addresses, Host must be localhost, 127.0.0.1, or [::1] (port ignored). With --dnsRebinding and configured allowed hosts, that list applies instead. Binding to all interfaces without DNS rebinding allowlists logs a one-time startup warning.
  • DNS rebinding protection on the streamable HTTP transport is opt-in: MCP_DNS_REBINDING=true or --dnsRebinding (with --origin / --host per CLI rules). Use MCP_ALLOWED_ORIGINS and MCP_ALLOWED_HOSTS for Origin and transport header checks.
  • CORS allowed origins default to empty; browser clients need MCP_ALLOWED_ORIGINS or --origin.
  • HTTP: on by default; disable with MCP_NO_HTTP=true or --no-http.
  • STDIO: on by default; disable with MCP_NO_STDIO=true or --no-stdio.

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 190 lines · 3,007 tokens per session scan A 0690e3fca2c2

Subscribe to this mod's changes

project is a cursor rule published in the GitHub repository phughesmcr/deno-mcp-template (33 stars, last pushed 4mo ago), licensed MIT. It adds 3,007 tokens to every session, about $0.0150 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.