AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Rust Mcp Cli Starter

mcp-seferino-fernandez-rust-mcp-cli-starter · by seferino-fernandez

A cargo-generate template that wraps an HTTP API as three Rust crates: a client library, a CLI, and an MCP server (rmcp, stdio + streamable HTTP with OAuth 2.1/PKCE).

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add mcp-seferino-fernandez-rust-mcp-cli-starter

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-seferino-fernandez-rust-mcp-cli-starter)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Rust Mcp Cli Starter? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Rust MCP + CLI Template

A cargo-generate starter template for wrapping an HTTP API as three Rust crates: a library, a CLI, and an MCP server. It targets the common case of an API authenticated with a single long-lived API key sent as an X-Api-Key header against a configurable base URL.

Crates

| Crate | Description | | ------------ | ---------------------------------------- | | myapp-core | Async API client library | | myapp-cli | Terminal CLI (myapp) | | myapp-mcp | MCP server (myapp-mcp) for LLM clients |

The CLI and the MCP server both depend on the core library, so the request, auth, config, and error handling live in one place:

            myapp-core  (ApiClient, Config, models, errors)
              /     \
       myapp-cli   myapp-mcp
     (clap CLI)   (rmcp: stdio + streamable HTTP)

Use this template

cargo generate --git https://github.com/seferino-fernandez/rust-mcp-cli-starter --name acme-tools --allow-commands

This renames everything (myappacme-tools, MYAPP_ACME_TOOLS_).

--allow-commands is required because the generation hook runs sed/cargo fmt to rename the project; without it, cargo-generate prompts for confirmation (interactive) or fails (with --silent).

Quick start (after generating)

cargo build
cargo test
MYAPP_BASE_URL=http://localhost:8080 MYAPP_API_KEY=xxxx cargo run -p myapp-cli -- status

Configuration is layered, highest precedence first: CLI flag, then MYAPP_* env, then MYAPP_*_FILE env, then config.toml, then built-in defaults. See [config.toml.example](config.toml.example) for every setting.

Logging and verbosity flag

Both binaries take -v/--verbose and -q/--quiet flags. By default only errors are reported; repeat -v to step up:

  • -q silent
  • (default) errors only
  • -v warn, -vv info, -vvv debug, -vvvv trace

Place the flag before the subcommand: myapp -v status. Setting RUST_LOG overrides these flags entirely (e.g. RUST_LOG=myapp_core=trace,reqwest=debug).

Shell completions

The myapp CLI supports static completions for bash, elvish, fish, nushell, powershell, and zsh, plus dynamic completions for every shell except nushell.

Static — generate a script once and install it where your shell looks for it:

myapp completions zsh     > ~/.zsh/completions/_myapp
myapp completions bash    | sudo tee /usr/share/bash-completion/completions/myapp
myapp completions fish    > ~/.config/fish/completions/myapp.fish
myapp completions nushell > ~/.config/nushell/completions/myapp.nu  # then `source` it

Dynamic — let the binary drive completions at runtime via the COMPLETE environment variable. Add one line to your shell startup file:

echo 'source > ~/.zshrc    # zsh
echo 'source > ~/.bashrc   # bash
echo 'COMPLETE=fish myapp | source'  >> ~/.config/fish/completions/myapp.fish  # fish

Dynamic completions re-generate on shell startup, so they stay correct as the CLI changes — re-source (a new shell session) after upgrading myapp.

Man pages

The myapp CLI generates ROFF man pages for itself and every subcommand into a directory (created if missing):

# Generate into ./man, then preview one
myapp man ./man
man -l ./man/myapp.1

# Install system-wide (Linux example)
myapp man ~/.local/share/man/man1

MCP server

myapp-mcp exposes the same API to LLM clients over two transports:

  • stdio: for local clients such as Claude Desktop.
  • http (streamable HTTP): for networked clients, with a choice of auth mode:
  • token: static bearer token (constant-time compared).
  • oauth: OAuth 2.1 authorization-code flow with PKCE.
  • none: no auth (loopback only).

Tool input schemas are closed (additionalProperties: false) and tool results are capped to a configurable byte budget. See the [myapp-mcp README](crates/myapp-mcp/README.md) for details.

License

[MIT](LICENSE.md)

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.