Model Context Protocol (MCP) servers expose structured capabilities to AI clients. In this guide we will build a minimal Rust implementation that speaks MCP over standard input and standard output, so it can plug into any compliant client without socket plumbing. Along the way we will peek at the JSON-RPC envelope MCP relies on, map it to strongly typed Rust structures, and wire enough handlers to exercise the loop with real requests.
Rust's official documentation is formidable, but the explanation about file and directory structuring can seem confusing. In this article, I intend to show it in a simple way - without going deep into all possibilities and details. Let's check it out!
When working with Rust, sooner or later you'll encounter the "error[E0502]: cannot borrow ... as immutable because it is also borrowed as mutable". Sometimes it happens when we try to do something simple, something we routinely do in other languages. Let's check out some solutions to work around this problem.
Unlike many languages, Optional type is a fundamental mechanism in Rust development - it's behind its null safe characteristic. But beyond working as an Optional pointer, the Option type has some very useful features. Option is an enum, in Rust this means we have the power of algebraic enums, which allows carrying a specific value. Option is an enum of varieties None and Some(T). Many of its operations have a functional format - which makes a callback through closure, being quite efficient as it's invoked only when necessary. Let's explore this and much more!
Many developers study Rust, experiment with it, and fall in love, but in practice they don't use it professionally. The famous annual Stack Overflow survey proves this - there's a high percentage in the "most loved language" category, but low when compared to actual usage.
Being a relatively new and less popular language, Rust ends up facing some barriers to wider adoption. In this article, I'd like to share my experience in reconciling Rust and using it at work alongside other languages.