relay-protocol-mcp-server copilot-instructions.md

relay-protocol-mcp-server copilot-instructions.md is an instructions file for GitHub Copilot from warengonzaga/relay-protocol-mcp-server. It costs 1,121 tokens per session, scanned A, original, MIT.

A set of coding instructions for a TypeScript server that connects AI agents to the Relay Protocol API. It describes the project structure, validation, error handling, type safety, and tool naming.

In plain words
What is it for?
Use it when adding or changing Relay Protocol tools, validating inputs with Zod, handling API and connection failures, or organising the MCP server.
Why use it?
It helps contributors keep API code, agent tool handlers, data types, and error responses consistent and easier to maintain.

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/warengonzaga/relay-protocol-mcp-server/copilot-instructions.svg)](https://agentmods.dev/instructions/warengonzaga/relay-protocol-mcp-server/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/warengonzaga/relay-protocol-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/warengonzaga/relay-protocol-mcp-server/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,121 This file is loaded in full into every session.
When invoked 1,121 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.01121 $0.01121
Opus 5 $0.00561 $0.00561
Sonnet 5 $0.00224 $0.00224
Haiku 4.5 $0.00112 $0.00112

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

Security

Grade A, and why

relay-protocol-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 3d 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 · 155 lines

How it starts

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

Relay Protocol MCP Project Guidelines

You are working on a Model Context Protocol (MCP) server for the Relay Protocol API. This document outlines the project specifications and coding standards.

Project Overview

  • Purpose: MCP server providing access to Relay Protocol REST API
  • Language: TypeScript with Node.js
  • Framework: Official MCP SDK (@modelcontextprotocol/sdk)
  • API Client: Axios for HTTP requests
  • Validation: Zod for schema validation

Architecture Principles

1. Separation of Concerns

  • Keep API client logic separate from MCP tool handlers
  • Use comprehensive TypeScript types for validation
  • Separate types from implementation

2. Error Handling

  • Always wrap tool handlers in try-catch blocks
  • Return structured error responses with debugging details
  • Distinguish between API errors, connection errors, and validation errors

3. Type Safety

  • Use TypeScript strict mode
  • Define all API types explicitly
  • Use Zod for runtime validation matching TypeScript types

4. Tool Design

  • Tools are grouped by resource (chains, prices, quotes, requests, transactions, currencies, swaps)
  • All tools prefixed with relay_ to avoid conflicts
  • Tool descriptions include examples
  • Direct data return (no success/data wrapping)

Code Standards

File Organization

src/
├── client/       # HTTP client and error handling
├── tools/        # MCP tool implementations
├── types/        # TypeScript type definitions
├── config.ts     # Configuration settings
└── index.ts      # MCP server entry point

Naming Conventions

  • Files: kebab-case (e.g., relay-client.ts)
  • Classes: PascalCase (e.g., RelayClient)
  • Functions: camelCase (e.g., swapMultiInput)
  • Constants: UPPER_SNAKE_CASE (e.g., MAX_RETRIES)
  • MCP tools: snake_case with prefix (e.g., relay_get_chains)

Error Response Format

{
  error: string,       // Simple message for LLM
  details: {          // Full details for debugging
    message: string,
    statusCode?: number,
    response?: any,
    request?: any
  }
}

Read the full file on GitHub · 155 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. 3d ago First seen · 155 lines · 1,121 tokens per session scan A 0a7f72c06334

Subscribe to this mod's changes

relay-protocol-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository warengonzaga/relay-protocol-mcp-server (1 stars, last pushed 6mo ago), licensed MIT. It adds 1,121 tokens to every session, about $0.0056 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-31.

Related

Other instructions, from other repositories