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.
npx skills add phughesmcr/deno-mcp-template --skill implementing-mcp-resourcesgit clone --depth 1 https://github.com/phughesmcr/deno-mcp-templateWrote 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.
[](https://agentmods.dev/skills/phughesmcr/deno-mcp-template/implementing-mcp-resources)<a href="https://agentmods.dev/skills/phughesmcr/deno-mcp-template/implementing-mcp-resources"><img src="https://agentmods.dev/badge/skills/phughesmcr/deno-mcp-template/implementing-mcp-resources/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/phughesmcr/deno-mcp-template/implementing-mcp-resources"><img src="https://agentmods.dev/badge/skills/phughesmcr/deno-mcp-template/implementing-mcp-resources.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.01602 |
| Opus 5.5 | $0.00030 | $0.00641 |
| Sonnet 5.5 | $0.00015 | $0.00320 |
| Haiku 4.5 | $0.00008 | $0.00160 |
Grade A, and why
implementing-mcp-resources 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implementing MCP Resources
Workflow
Task Progress:
- [ ] Step 1: Create resource file in src/mcp/resources/
- [ ] Step 2: Define name, URI/template, config, and readCallback
- [ ] Step 3: Export as default ResourcePlugin or ResourceTemplatePlugin
- [ ] Step 4: Register in src/mcp/resources/mod.ts
- [ ] Step 5: (If KV-backed) Add URI-to-key mapping in kvKeys.ts
- [ ] Step 6: Run `deno task ci` to verify
Resource Types
| Type | Use Case | URI | Plugin Type |
|---|---|---|---|
| Static resource | Fixed content at a known URI | "hello://world" |
ResourcePlugin |
| KV-backed resource | Persistent, mutable state | "counter://value" |
ResourcePlugin |
| Resource template | Dynamic URI with variables | "greetings://{name}" |
ResourceTemplatePlugin |
Static Resource Template
Create a new file in src/mcp/resources/.
import type { ResourceMetadata } from "@modelcontextprotocol/sdk/server/mcp.js";
import type { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
import type { ResourcePlugin } from "$/shared/types.ts";
const name = "myResource";
const uri = "my-scheme://my-path";
const config: ResourceMetadata = {
description: "What this resource provides",
mimeType: "text/plain", // or "application/json"
};
async function readCallback(): Promise<ReadResourceResult> {
return {
contents: [{
uri,
text: "Resource content here",
}],
};
}
const module: ResourcePlugin = {
type: "resource",
name,
uri,
config,
readCallback,
};
export default module;
Resource Template (Dynamic URI)
For resources with variable URI segments like greetings://{name}:
import {
type CompleteResourceTemplateCallback,
type ResourceMetadata,
ResourceTemplate,
} from "@modelcontextprotocol/sdk/server/mcp.js";
import type { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js";
import type { ResourceTemplatePlugin } from "$/shared/types.ts";
const name = "myTemplate";
const completeName: CompleteResourceTemplateCallback = (value) => {
const prefix = value.trim().toLowerCase();
return suggestions.filter((s) => s.toLowerCase().startsWith(prefix)).slice(0, 5);
};
const template = new ResourceTemplate(
"my-scheme://{variable}",
{
list: undefined, // optional: callback to list all instances
complete: { variable: completeName }, // optional: autocomplete per variable
},
);
const config: ResourceMetadata = {
mimeType: "text/plain",
};
async function readCallback(
uri: URL,
variables: Record<string, unknown>,
): Promise<ReadResourceResult> {
const variable = variables.variable as string;
return {
contents: [{
uri: uri.toString(),
text: `Content for ${variable}`,
}],
};
}
const module: ResourceTemplatePlugin = {
type: "template",
name,
template,
config,
readCallback,
};
export default module;
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 246 lines · 76 tokens per session scan A db019b7bc271
implementing-mcp-resources is a skill published in the GitHub repository phughesmcr/deno-mcp-template (33 stars, last pushed 6mo ago), licensed MIT. It adds 76 tokens to every session and 1,602 once invoked, about $0.0003 per session on Opus 5.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.
implementing-mcp-resources compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| implementing-mcp-resourcesphughesmcr/deno-mcp-template | Skill | 33 | 6mo ago | MIT | A | 76 | Cursor |
| api-requestssaidsef/mcp-github-pr-issue-analyser | Skill | 6 | 2d ago | Apache-2.0 | A | 37 | Claude Code, Codex |
| natsfjwood69/mori | Skill | 32 | 5d ago | AGPL-3.0 | A | 32 | Claude Code |
| api-securityxAmirHamza77/ReverseOps-Skill | Skill | 5 | 3mo ago | MIT | A | 36 | Claude Code, Codex |
| protocol-reversexAmirHamza77/ReverseOps-Skill | Skill | 5 | 3mo ago | MIT | A | 30 | Claude Code, Codex |
| building-mcp-serverscyberreinxy/mcp-server-skill | Skill | 1 | 2mo ago | MIT | A | 160 | Claude Code, Codex |
| competition-graphql-rpc-driftxAmirHamza77/ReverseOps-Skill | Skill | 5 | 3mo ago | MIT | A | 114 | Codex |