streamnative-mcp-server: Instructions file for GitHub Copilot

.github/copilot-instructions.md

streamnative-mcp-server copilot-instructions.md is an instructions file for GitHub Copilot from streamnative/streamnative-mcp-server. It costs 1,165 tokens per session, scanned A, original, Apache-2.0.

A project guide for StreamNative's MCP server, a Go program that exposes StreamNative services to AI tools. It documents how to build, test, lint, package, and understand the codebase.

In plain words
What is it for?
Use it when changing the server, its command-line interface, MCP runtime modes, build files, charts, end-to-end tests, or release process.
Why use it?
It gives coding agents the project's exact commands and conventions instead of relying on generic Go assumptions.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is streamnative/streamnative-mcp-server's own configuration. It tells GitHub Copilot how to work on streamnative-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything streamnative-mcp-server configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -race ./pkg/mcp/builders/....

Reuse

Borrowing it

Nothing to install: this file belongs to streamnative/streamnative-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/streamnative/streamnative-mcp-server/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/streamnative/streamnative-mcp-server

Made for: GitHub Copilot.

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 streamnative-mcp-server copilot-instructions.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/streamnative/streamnative-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/streamnative/streamnative-mcp-server/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,165 This file is loaded in full into every session.
When invoked 1,165 The same file — it is already loaded in full.
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.01165 $0.01165
Opus 5.5 $0.00466 $0.00466
Sonnet 5.5 $0.00233 $0.00233
Haiku 4.5 $0.00117 $0.00117

Measured 2mo ago against content hash f2af9ee0d853, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

streamnative-mcp-server copilot-instructions.md 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.

.github/copilot-instructions.md · 57 lines

How it starts

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

Copilot instructions

Use the repo's concrete workflow and architecture, not generic Go defaults. The codebase targets Go 1.25.12 from go.mod.

Build, test, and lint

go mod verify
go mod download
go fmt ./...
go mod tidy
golangci-lint run --timeout=3m
go test -race ./...
go test -race ./pkg/mcp/builders/...
go test -v -run TestName ./pkg/...
make build
  • CI expects go fmt ./... and go mod tidy to leave no diff behind.
  • make build writes bin/snmcp from cmd/streamnative-mcp-server/main.go.
  • If you add files or touch license headers, run make license-check and make license-fix.
  • If you touch charts/**, cmd/snmcp-e2e/**, or scripts/e2e-test.sh, also run ./scripts/e2e-test.sh all.
  • If you change release or packaging flow, also run go generate ./... and goreleaser release --snapshot --clean.

High-level architecture

  • cmd/streamnative-mcp-server/main.go defines the snmcp Cobra CLI, adds shared config flags, and attaches the stdio and sse subcommands.
  • pkg/cmd/mcp/mcp.go resolves config and selects one runtime mode:
    • --key-file enables StreamNative Cloud mode, defaults to all features, and ensures streamnative-cloud is present if features were set explicitly.
    • --use-external-kafka enables Kafka-only mode, rejects extra feature flags, and infers Kafka admin, client, and schema registry features.
    • --use-external-pulsar enables Pulsar-only mode, rejects extra feature flags, and infers all-pulsar.
  • pkg/cmd/mcp/server.go is the server bootstrap and tool-registration hub. It creates backend sessions and wires every Kafka, Pulsar, and StreamNative tool family into one MCP server.
  • pkg/mcp/server.go is the thin wrapper around mark3labs/mcp-go; it applies default resource capabilities, recovery, and logging.
  • Request-scoped sessions are passed through pkg/mcp/internal/context/ctx.go. Tool handlers are expected to retrieve Kafka, Pulsar, and StreamNative Cloud sessions from there.
  • pkg/mcp/*_tools.go files are mostly registration wrappers. The actual Kafka and Pulsar tool schemas and handler logic belong in pkg/mcp/builders/{kafka,pulsar}.
  • StreamNative Cloud context, resource, and log tools still register from pkg/mcp/streamnative_*_tools.go; pkg/mcp/builders/streamnative/ is not the primary implementation path today.
  • pkg/cmd/mcp/sse.go owns SSE transport, auth middleware, and health endpoints at <httpPath>/sse, <httpPath>/message, <httpPath>/healthz, and <httpPath>/readyz.
  • Multi-session Pulsar exists only in SSE plus external Pulsar mode. pkg/mcp/session/ caches per-token sessions, and requests must send Authorization: Bearer <token>.
  • pkg/mcp/pftools/ plus pkg/mcp/pulsar_functions_as_tools.go dynamically expose deployed Pulsar Functions as MCP tools, so changes there alter the runtime tool surface.
  • docs/tools/ content is surfaced to MCP clients at runtime, so docs changes can be behavior-visible.

Read the full file on GitHub · 57 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. 2mo ago First seen · 57 lines · 1,165 tokens per session scan A f2af9ee0d853

Subscribe to this mod's changes

streamnative-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository streamnative/streamnative-mcp-server (24 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,165 tokens to every session, about $0.0047 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.

Related

streamnative-mcp-server copilot-instructions.md compared with instructions from other repositories

streamnative-mcp-server copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
streamnative-mcp-server copilot-instructions.mdstreamnative/streamnative-mcp-serverInstructions file243d agoApache-2.0A1,165GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode