mcp-server-authoring

mcp-server-authoring is a skill for Claude Code, Codex from navikt/copilot. It costs 48 tokens per session (1,485 once invoked), scanned A, original, MIT.

A workflow for building, testing, securing, and registering MCP servers on Nais behind a gateway. An MCP server provides tools that an agent can call; Nais and the gateway are the hosting and access-control environment described by this workflow.

In plain words
What is it for?
Designing MCP tools, adding token checks and input validation, testing tool calls, measuring results, and registering the server.
Why use it?
It provides a defined path from planning agent tools through authentication and testing to registration and release.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing MCP tools, adding token checks and input validation, testing tool calls, measuring results, and registering the server.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/navikt/copilot/mcp-server-authoring
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.

Any agent
npx skills add navikt/copilot --skill mcp-server-authoring
Clone the repo
git clone --depth 1 https://github.com/navikt/copilot

Made for: Claude Code, Codex.

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 mcp-server-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/navikt/copilot/mcp-server-authoring/github.svg)](https://agentmods.dev/skills/navikt/copilot/mcp-server-authoring)
Your own site
<a href="https://agentmods.dev/skills/navikt/copilot/mcp-server-authoring"><img src="https://agentmods.dev/badge/skills/navikt/copilot/mcp-server-authoring/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.

agentmods 80×15 button for mcp-server-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/navikt/copilot/mcp-server-authoring"><img src="https://agentmods.dev/badge/skills/navikt/copilot/mcp-server-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00048 $0.01485
Opus 5.5 $0.00019 $0.00594
Sonnet 5.5 $0.00010 $0.00297
Haiku 4.5 $0.00005 $0.00148

Measured 5d ago against content hash 24eb931aa779, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-server-authoring 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.

skills/mcp-server-authoring/SKILL.md · 79 lines

How it starts

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

MCP Server Authoring

Build an MCP server that Nav teams can run behind fleet-gateway. Workflow adapted from Anthropic's mcp-builder (Apache-2.0, see NOTICE); the Nav layer is added.

When to Use

  • Creating a new MCP server on Nais, or adding tools to one
  • Registering a server in the registry and the gateway
  • Reviewing an MCP server for security or agent usability

Workflow

  1. Plan tools. List the tasks an agent must finish, not the API endpoints. Merge list+filter into one search tool. Aim for few tools.
  2. Implement. Pick the SDK (see Language notes), add auth (Nav layer), input validation, caps.
  3. Test. Unit-test each tool. Run the server locally and call it with MCP Inspector. Test the auth rejects (wrong audience, wrong azp, app token).
  4. Evaluate. Write 10 realistic multi-step questions with a known answer. Measure accuracy, number of calls, errors. Fix descriptions first, code second.
  5. Register and ship. ROS, registry entry, gateway route, then rollout.

Guidelines (source of truth)

The full rules, each linked to OWASP MCP Top 10 and the MCP 2026-07-28 spec, live in one place: Retningslinjer for MCP-servere (apps/my-copilot/src/app/(nb)/(mcp)/mcp/tilby-server/retningslinjer/page.tsx). Do not repeat them here; read the page. Registration steps: fleet-gateway for teams.

Checklist:

  • Texas introspection; azp is fleet-gateway, NAVident present, app tokens rejected; OBO, no passthrough.
  • Read tools first; writes only after ROS sign-off.
  • Write tools: the server enforces confirmation itself (two-step preview + short-lived token, as mcp-dolly create_order); a client prompt or input_required alone is not enough.
  • Explicit tools: list in route and registry, no passAllTools.
  • Caps on input, request body, page size and response size; timeouts upstream.
  • Mcp-* headers checked against the body (-32020).
  • No tokens or personal data in logs.
  • Static descriptions; all four annotations set; annotations are hints only.
  • Per-tool metrics with bounded labels (tool name, outcome).
  • Output is an API: outputSchema + structuredContent (also the serialized JSON as a content text block, for clients that ignore structuredContent); only add fields.
  • Never truncate silently: cut on characters, not bytes, with a marker and a tool hint; lists carry truncated and the remaining count.
  • Oversized backend replies are errors, not truncated data.
  • Free text written by others is marked or left out of what the model reads.
  • User ID from the token (NAVident), never from tool arguments.
  • No citizen or case data; never log content.
  • Few tools; no demo tools in prod.
  • Negative tests: expired token, app token, wrong azp, missing NAVident, wrong tool, oversized body.
  • Fresh login before writes once the owner has set the rule (#2964, not decided).
  • One ROS per server (template: fleet-gateway/ros-mcp-server-mal.md in the private navikt/copilot-intern repo).

Read the full file on GitHub · 79 lines

Files

What ships with it

2 files 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.

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 Changed · +9 lines 24eb931aa779
  2. 8d ago Changed 2cbd51b71831
  3. 9d ago Changed · -52 lines afc834904229
  4. 11d ago First seen · 122 lines · 48 tokens per session scan A b5708cfdcc45

Subscribe to this mod's changes

mcp-server-authoring is a skill published in the GitHub repository navikt/copilot (65 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,485 once invoked, about $0.0002 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-11-20.

Related

mcp-server-authoring compared with skills from other repositories

mcp-server-authoring next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-server-authoringnavikt/copilotSkill65todayMITA48Claude Code, Codex
skill-guideAndyElessar/skillsSkill27d agononeA102Claude Code
plugin-creatorAndyElessar/skillsSkill27d agononeA181Claude Code
csharp-source-generatorAndyElessar/skillsSkill27d agononeA112Claude Code
prose-guideAndyElessar/skillsSkill27d agononeA162Claude Code
agents-creatorAndyElessar/skillsSkill27d agononeC150Claude Code
cf-clicloudflare/skillsSkill3.5k5d agoApache-2.0A78Claude Code