agentleFS
VaizVaiz/rust-mcp-server/.github/copilot-instructions.md

rust-mcp-server

Copilot instructions37 starsChanged 8 months agoUnlicenseView on GitHub

This is a Rust implementation of a Model Context Protocol (MCP) server. Follow this systematic approach when working on code changes: This project maintains strict code quality standards:

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

21 rules. About 0 are common, 6 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow Rust best practices and idioms

    line 12
  2. Very specific:

    Use proper error handling with Result<T, E> and ohno::AppError for error propagation

    line 13
  3. Very specific:

    Use structured logging with the tracing crate

    line 15
  4. Distinctive:

    Ensure all async operations are properly awaited

    line 16
  5. Very specific:

    Use #cargo-check for quick code validation

    line 35
  6. Very specific:

    Use #cargo-clippy for linting

    line 36
  7. Very specific:

    Use #cargo-fmt for code formatting

    line 37
  8. Very specific:

    Use #cargo-test for running tests

    line 38
  9. Distinctive:

    Follow this systematic approach when working on code changes:

    line 46
  10. Very specific:

    Check current state: Use #cargo-check with all_targets: true, all_features: true

    line 48
  11. Very specific:

    Validate: Use #cargo-clippy with workspace: true, all_targets: true

    line 50
  12. Very specific:

    Format: Use #cargo-fmt with all: true

    line 51
  13. Very specific:

    Test: Use #cargo-test with all_features: true

    line 52
  14. Very specific:

    Build: Use #cargo-build with all_targets: true, all_features: true for final verification

    line 53
  15. Very specific:

    Check unused dependencies: Use #cargo-machete to identify unused dependencies

    line 54
  16. Very specific:

    Verify security compliance: Use #cargo-deny-check to ensure security and licensing compliance

    line 55
  17. Very specific:

    When adding dependencies, prefer workspace-level dependencies in the root Cargo.toml

    line 59
  18. Very specific:

    Use #cargo-add and #cargo-remove for dependency management

    line 60
  19. Distinctive:

    Clippy: All clippy warnings must be resolved

    line 67
  20. Distinctive:

    Tests: All changes must maintain or improve test coverage

    line 69
  21. Distinctive:

    Security: All dependencies must pass security and licensing checks

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions for Rust MCP Server

This is a Rust implementation of a Model Context Protocol (MCP) server.

Project Context

  • Language: Rust
  • Protocol: Model Context Protocol (MCP)
  • Communication: JSON-RPC over stdio
  • Architecture: Async/await with Tokio runtime

Key Guidelines

  1. Follow Rust best practices and idioms
  2. Use proper error handling with Result<T, E> and ohno::AppError for error propagation
  3. Implement MCP protocol methods according to the specification
  4. Use structured logging with the tracing crate
  5. Ensure all async operations are properly awaited

MCP Protocol Implementation

  • Initialize: Handle client initialization and capability negotiation
  • Tools: Implement tool listing and execution
  • Resources: Handle resource discovery and reading
  • Logging: Support MCP logging protocol

Dependencies

  • tokio: Async runtime
  • serde: Serialization/deserialization
  • rmcp: MCP protocol handling
  • ohno: Error handling
  • tracing: Structured logging

AI Agent Guidelines

1. Always Use Rust MCP Tools

  • Use #cargo-check for quick code validation
  • Use #cargo-clippy for linting
  • Use #cargo-fmt for code formatting
  • Use #cargo-test for running tests

2. use @rust-docs subagent

  • For any questions about public API for dependencies or standard library, consult the @rust-docs subagent. Just ask it what you looking for in natural language, and it will fetch the relevant documentation for you.

2. Development Workflow

Follow this systematic approach when working on code changes:

  1. Check current state: Use #cargo-check with all_targets: true, all_features: true
  2. Make changes: Edit code using appropriate development tools
  3. Validate: Use #cargo-clippy with workspace: true, all_targets: true
  4. Format: Use #cargo-fmt with all: true
  5. Test: Use #cargo-test with all_features: true
  6. Build: Use #cargo-build with all_targets: true, all_features: true for final verification
  7. Check unused dependencies: Use #cargo-machete to identify unused dependencies
  8. Verify security compliance: Use #cargo-deny-check to ensure security and licensing compliance

3. Dependency Management

  • When adding dependencies, prefer workspace-level dependencies in the root Cargo.toml
  • Use #cargo-add and #cargo-remove for dependency management
  • Regularly run #cargo-update to keep dependencies current

4. Code Quality Standards

This project maintains strict code quality standards:

  • Clippy: All clippy warnings must be resolved
  • Formatting: Code must be formatted with rustfmt using the nightly toolchain
  • Tests: All changes must maintain or improve test coverage
  • Documentation: Public APIs must be thoroughly documented
  • Security: All dependencies must pass security and licensing checks

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.