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
- Distinctive: line 12
Follow Rust best practices and idioms
- Very specific: line 13
Use proper error handling with Result<T, E> and ohno::AppError for error propagation
- Very specific: line 15
Use structured logging with the tracing crate
- Distinctive: line 16
Ensure all async operations are properly awaited
- Very specific: line 35
Use #cargo-check for quick code validation
- Very specific: line 36
Use #cargo-clippy for linting
- Very specific: line 37
Use #cargo-fmt for code formatting
- Very specific: line 38
Use #cargo-test for running tests
- Distinctive: line 46
Follow this systematic approach when working on code changes:
- Very specific: line 48
Check current state: Use #cargo-check with all_targets: true, all_features: true
- Very specific: line 50
Validate: Use #cargo-clippy with workspace: true, all_targets: true
- Very specific: line 51
Format: Use #cargo-fmt with all: true
- Very specific: line 52
Test: Use #cargo-test with all_features: true
- Very specific: line 53
Build: Use #cargo-build with all_targets: true, all_features: true for final verification
- Very specific: line 54
Check unused dependencies: Use #cargo-machete to identify unused dependencies
- Very specific: line 55
Verify security compliance: Use #cargo-deny-check to ensure security and licensing compliance
- Very specific: line 59
When adding dependencies, prefer workspace-level dependencies in the root Cargo.toml
- Very specific: line 60
Use #cargo-add and #cargo-remove for dependency management
- Distinctive: line 67
Clippy: All clippy warnings must be resolved
- Distinctive: line 69
Tests: All changes must maintain or improve test coverage
- Distinctive: line 71
Security: All dependencies must pass security and licensing checks
≈ “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.
Files
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
- Follow Rust best practices and idioms
- Use proper error handling with
Result<T, E>andohno::AppErrorfor error propagation - Implement MCP protocol methods according to the specification
- Use structured logging with the
tracingcrate - 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 runtimeserde: Serialization/deserializationrmcp: MCP protocol handlingohno: Error handlingtracing: Structured logging
AI Agent Guidelines
1. Always Use Rust MCP Tools
- Use
#cargo-checkfor quick code validation - Use
#cargo-clippyfor linting - Use
#cargo-fmtfor code formatting - Use
#cargo-testfor running tests
2. use @rust-docs subagent
- For any questions about public API for dependencies or standard library, consult the
@rust-docssubagent. 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:
- Check current state: Use
#cargo-checkwithall_targets: true, all_features: true - Make changes: Edit code using appropriate development tools
- Validate: Use
#cargo-clippywithworkspace: true, all_targets: true - Format: Use
#cargo-fmtwithall: true - Test: Use
#cargo-testwithall_features: true - Build: Use
#cargo-buildwithall_targets: true, all_features: truefor final verification - Check unused dependencies: Use
#cargo-macheteto identify unused dependencies - Verify security compliance: Use
#cargo-deny-checkto ensure security and licensing compliance
3. Dependency Management
- When adding dependencies, prefer workspace-level dependencies in the root
Cargo.toml - Use
#cargo-addand#cargo-removefor dependency management - Regularly run
#cargo-updateto 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
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
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.

