Sample Building Mcp Servers With Rust
FreeNot checkedThis project provides sample MCP servers that can be used with Amazon Q CLI or other MCP-compatible AI assistants
About
This project provides sample MCP servers that can be used with Amazon Q CLI or other MCP-compatible AI assistants
README
MCP Sample
A Rust implementation of Model Context Protocol (MCP) servers for extending AI assistant capabilities.
Overview
This project provides sample MCP servers that can be used with Amazon Q or other MCP-compatible AI assistants. The servers implement various functionalities:
- Calculator Server: Performs basic arithmetic operations
- RDS Server: Interacts with Amazon RDS instances
- S3 Server: Manages Amazon S3 buckets and objects
- PostgreSQL Server: Connects to PostgreSQL databases and executes queries
Prerequisites
- Rust and Cargo
- AWS credentials configured for RDS and S3 operations
- An MCP-compatible AI assistant (like Amazon Q)
Installation
Clone the repository and build the project:
git clone <repository-url>
cd mcp-sample
cargo build
Usage
Build the executable files for each server:
# Build the calculator server
cargo build --release --bin calculator_server
# Build the RDS server
cargo build --release --bin rds_server
# Build the S3 server
cargo build --release --bin s3_server
# Build the PostgreSQL server
cargo build --release --bin postgresql_server
After building, you can run each server independently:
# Run the calculator server
./target/release/calculator_server
# Run the RDS server
./target/release/rds_server
# Run the S3 server
./target/release/s3_server
# Run the PostgreSQL server (requires a connection string)
./target/release/postgresql_server "postgresql://username:password@hostname:port/database"
Integration with Amazon Q CLI
To integrate these MCP servers with Amazon Q CLI or other MCP-compatible clients, add a configuration like this to your .amazon-q.json file:
{
"mcpServers": {
"calculator": {
"command": "/path/to/mcp-sample-servers-rust/target/release/calculator_server",
"args": []
},
"s3": {
"command": "/path/to/mcp-sample-servers-rust/target/release/s3_server",
"args": []
},
"rds": {
"command": "/path/to/mcp-sample-servers-rust/target/release/rds_server",
"args": []
},
"postgres": {
"command": "/path/to/mcp-sample-servers-rust/target/release/postgresql_server",
"args": ["postgresql://username:password@hostname:port/database"]
}
}
}
Replace /path/to/mcp-sample-servers-rust/ with the actual path to your built binaries. Once configured, Amazon Q will be able to use these servers to extend its capabilities.
Server Descriptions
Calculator Server
Provides basic arithmetic operations like addition and subtraction.
RDS Server
Lists and manages Amazon RDS instances in specified regions.
S3 Server
Manages S3 buckets and objects, including listing buckets by region.
PostgreSQL Server
Connects to PostgreSQL databases and executes read-only queries, lists tables, and provides schema information.
Dependencies
- rmcp: Rust implementation of the Model Context Protocol
- AWS SDK for Rust (aws-sdk-s3, aws-sdk-rds, aws-config)
- Tokio for async runtime
- Serde for serialization/deserialization
- tokio-postgres for PostgreSQL database connectivity
from github.com/aws-samples/sample-building-mcp-servers-with-rust
Installing Sample Building Mcp Servers With Rust
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/aws-samples/sample-building-mcp-servers-with-rustFAQ
Is Sample Building Mcp Servers With Rust MCP free?
Yes, Sample Building Mcp Servers With Rust MCP is free — one-click install via Unyly at no cost.
Does Sample Building Mcp Servers With Rust need an API key?
No, Sample Building Mcp Servers With Rust runs without API keys or environment variables.
Is Sample Building Mcp Servers With Rust hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Sample Building Mcp Servers With Rust in Claude Desktop, Claude Code or Cursor?
Open Sample Building Mcp Servers With Rust on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Sample Building Mcp Servers With Rust with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
