server copilot-instructions.md

Repository-specific instructions for MCP Ambassador Server, a pnpm monorepo containing a Fastify server, React web interface, SQLite database, and plugin-based authentication, permissions, and audit features. A monorepo stores multiple related packages in one repository.

In plain words
What is it for?
Use them when working on the MCP Ambassador Server, especially its server packages, shared schemas, database code, React interface, or service-provider plugins.
Why use it?
They give an agent the project’s structure, technology choices, and architecture rules before it changes code. This reduces edits that conflict with how the repository is organized.

Instructions file for GitHub Copilot

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 instructions/mcpambassador/server/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/mcpambassador/server

Made for: GitHub Copilot.

Per session 1,104 This file is loaded in full into every session.
When invoked 1,104 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01104 $0.01104
Opus 5 $0.00552 $0.00552
Sonnet 5 $0.00221 $0.00221
Haiku 4.5 $0.00110 $0.00110

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

Security

Grade A, and why

server copilot-instructions.md scanned grade A with 1 finding 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 2d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

execSync(`command ${userParam}`)
.github/copilot-instructions.md · 99 lines

How it starts

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

MCP Ambassador Server — Copilot Instructions

Repo Context

This is the mcpambassador_server repository — a pnpm monorepo containing the Ambassador Server. It is the core of the platform: a Fastify HTTP server with a React SPA, SQLite database, and a plugin-based architecture for auth, authorization, and audit.

Version: 0.8.0-beta.1
Stack: Node.js 20+, TypeScript strict, pnpm workspaces, Fastify, Zod, Drizzle ORM (SQLite), React 19, Tailwind v4, Vite, Docker

Monorepo Package Structure

packages/
  core/          # Database schema (Drizzle), migrations, shared types
  protocol/      # MCP protocol types and wire format
  contracts/     # Shared Zod schemas for API contracts
  authn-ephemeral/ # SPI implementation: authentication (ephemeral sessions)
  authz-local/   # SPI implementation: authorization (local RBAC)
  audit-file/    # SPI implementation: audit logging (append-only file)
  server/        # Main Fastify server, routes, plugin wiring
  spa/           # React 19 SPA (admin + user UI)

Architecture Patterns

SPI (Service Provider Interface)

AuthN, AuthZ, and Audit are injected as SPI plugins — never hardcoded. The server core depends on interfaces (IAuthnProvider, IAuthzProvider, IAuditProvider), not implementations. When adding auth-related code, always work through these interfaces.

Fastify Conventions

  • All routes must use schema: { body: ZodSchema, params: ZodSchema } — never skip validation
  • Error responses use the canonical format: { error: { code: string, message: string } }
  • Never expose stack traces, internal error messages, or Zod validation internals in responses
  • Use Fastify's reply.code(n).send(...) pattern consistently

Drizzle ORM

  • Schema lives in packages/core/src/schema.ts
  • Migrations live in packages/core/drizzle/
  • Any schema change requires a migration — do NOT use push in production
  • Sensitive columns (credentials, tokens) are encrypted at the application layer before storage

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 1,104 tokens per session scan A d071f4d5b255

Subscribe to this mod's changes

server copilot-instructions.md is an instructions file published in the GitHub repository mcpambassador/server (3 stars, last pushed 7d ago), licensed Apache-2.0. It adds 1,104 tokens to every session, about $0.0055 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.