Repository Analysis

modelcontextprotocol/rust-sdk

The official Rust SDK for the Model Context Protocol

4.0 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of modelcontextprotocol/rust-sdk, a Rust project with 3,628 GitHub stars. SynthScan v2.0 examined 82,303 lines of code across 253 source files, recording 244 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 4.0 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.0
Adjusted Score
4.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
3.6K
Stars
Rust
Language
82.3K
Lines of Code
253
Files
244
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 44LOW 200

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 244 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block191 hits · 184 pts
SeverityFileLineSnippetContext
LOWcrates/rmcp/tests/test_sse_concurrent_streams.rs1#![cfg(not(feature = "local"))]COMMENT
LOWcrates/rmcp/tests/test_task_support_validation.rs1#![cfg(not(feature = "local"))]COMMENT
LOWcrates/rmcp/tests/test_streamable_http_session_store.rs241 .await;COMMENT
LOWcrates/rmcp/src/error.rs21#[derive(Debug, thiserror::Error)]COMMENT
LOWcrates/rmcp/src/transport.rs1//! # TransportCOMMENT
LOWcrates/rmcp/src/transport.rs21//! This transport is used to create a transport from a byte stream which implemented [`tokio::io::AsyncRead`] and [`tokCOMMENT
LOWcrates/rmcp/src/transport.rs41//! ```rustCOMMENT
LOWcrates/rmcp/src/service.rs1use futures::FutureExt;COMMENT
LOWcrates/rmcp/src/service.rs761 /// This method cancels the service, waits for the background task to finishCOMMENT
LOWcrates/rmcp/src/model.rs321#[serde(transparent)]COMMENT
LOWcrates/rmcp/src/model.rs501COMMENT
LOWcrates/rmcp/src/model.rs581 Self::new(ErrorCode::INVALID_PARAMS, message, data)COMMENT
LOWcrates/rmcp/src/model.rs801/// This notification can be sent by either side to indicate that it is cancelling a previously-issued request.COMMENT
LOWcrates/rmcp/src/model.rs841 .map(|params| serde_json::from_value(params.clone()))COMMENT
LOWcrates/rmcp/src/model.rs881const_string!(InitializeResultMethod = "initialize");COMMENT
LOWcrates/rmcp/src/model.rs941///COMMENT
LOWcrates/rmcp/src/model.rs1021/// Icon themes supported by the MCP specificationCOMMENT
LOWcrates/rmcp/src/model.rs1041/// - image/webp - WebP images (modern, efficient format)COMMENT
LOWcrates/rmcp/src/model.rs1281 #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]COMMENT
LOWcrates/rmcp/src/model.rs1361#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]COMMENT
LOWcrates/rmcp/src/model.rs1421pub type ReadResourceRequestParam = ReadResourceRequestParams;COMMENT
LOWcrates/rmcp/src/model.rs1601paginated_result!(ListPromptsResult {COMMENT
LOWcrates/rmcp/src/model.rs1681/// Notification sent when the list of available prompts changesCOMMENT
LOWcrates/rmcp/src/model.rs1821#[serde(rename_all = "camelCase")]COMMENT
LOWcrates/rmcp/src/model.rs1981/// This represents a single message in a conversation flow, used primarilyCOMMENT
LOWcrates/rmcp/src/model.rs2121 fn try_from(content: ContentBlock) -> Result<Self, Self::Error> {COMMENT
LOWcrates/rmcp/src/model.rs2141 #[serde(rename = "thisServer")]COMMENT
LOWcrates/rmcp/src/model.rs2161pub struct CreateMessageRequestParams {COMMENT
LOWcrates/rmcp/src/model.rs2361/// Deprecated: Use [`CreateMessageRequestParams`] instead (SEP-1319 compliance).COMMENT
LOWcrates/rmcp/src/model.rs2461// =============================================================================COMMENT
LOWcrates/rmcp/src/model.rs2861const_string!(ElicitationCreateRequestMethod = "elicitation/create");COMMENT
LOWcrates/rmcp/src/model.rs2941 message,COMMENT
LOWcrates/rmcp/src/model.rs2961/// meta: None,COMMENT
LOWcrates/rmcp/src/model.rs2981 tag = "mode",COMMENT
LOWcrates/rmcp/src/model.rs3041COMMENT
LOWcrates/rmcp/src/model.rs3101/// The result of a tool call operation.COMMENT
LOWcrates/rmcp/src/model.rs3181 }COMMENT
LOWcrates/rmcp/src/model.rs3201 /// error makes the server itself unusableCOMMENT
LOWcrates/rmcp/src/model.rs3221 /// if rows.is_empty() {COMMENT
LOWcrates/rmcp/src/model.rs3241 /// Create a successful tool result with structured contentCOMMENT
LOWcrates/rmcp/src/model.rs3261 meta: None,COMMENT
LOWcrates/rmcp/src/model.rs3341/// the tool operation.COMMENT
LOWcrates/rmcp/src/handler/client.rs101 }COMMENT
LOWcrates/rmcp/src/handler/client.rs121 /// The user's response including action (accept/decline/cancel) and optional dataCOMMENT
LOWcrates/rmcp/src/handler/client.rs141 /// context: RequestContext<RoleClient>,COMMENT
LOWcrates/rmcp/src/handler/server.rs301 /// MCP distinguishes two failure modes; the API forces you to pickCOMMENT
LOWcrates/rmcp/src/handler/server/tool_name_validation.rs1//! Tool name validation utilities according to SEP: Specify Format for Tool NamesCOMMENT
LOWcrates/rmcp/src/handler/server/wrapper/parameters.rs1use schemars::JsonSchema;COMMENT
LOWcrates/rmcp/src/handler/server/wrapper/parameters.rs21/// # use serde::{Deserialize, Serialize};COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs1//! Tools for MCP servers.COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs21//! struct AddOutput {COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs41//! Using the macro-based code pattern above is suitable for small MCP servers with simple interfaces.COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs61//! #[derive(Deserialize, schemars::JsonSchema, Default)]COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs81//! # unimplemented!()COMMENT
LOWcrates/rmcp/src/handler/server/router/tool.rs101//! }COMMENT
LOWcrates/rmcp/src/transport/child_process.rs241/// without a fully-qualified path.COMMENT
LOWcrates/rmcp/src/transport/auth.rs301 .field("pkce_verifier", &"[REDACTED]")COMMENT
LOWcrates/rmcp/src/transport/auth.rs321///COMMENT
LOWcrates/rmcp/src/transport/auth.rs621// add type aliases for oauth2 typesCOMMENT
LOWcrates/rmcp/src/transport/async_rw.rs121 }COMMENT
131 more matches not shown…
Decorative Section Separators40 hits · 123 pts
SeverityFileLineSnippetContext
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs34// ─── Test server ────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs72// ─── Helpers ────────────────────────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs204// ─── Tests: Shadow stream creation ──────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs260// ─── Tests: Dead primary replacement ────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs357// ─── Tests: Notification routing ────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs394// ─── Tests: Resume with Last-Event-ID ───────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs491// ─── Tests: Mixed scenarios ─────────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs569// ─── Tests: Edge cases ──────────────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs695// ─── Tests: Cache replay on dead primary replacement ─────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_sse_concurrent_streams.rs738// ─── Tests: Shadow stream limits ─────────────────────────────────────────────COMMENT
MEDIUMcrates/rmcp/tests/test_tool_routers.rs277// ── Notifier tests ──────────────────────────────────────────────────────COMMENT
MEDIUMscripts/triage-new-issues.sh88# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh90# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh96# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh98# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh2# =============================================================================COMMENT
MEDIUMscripts/triage-new-issues.sh20# =============================================================================COMMENT
MEDIUMscripts/triage-new-issues.sh32# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh34# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh57# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh59# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh157# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh159# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh234# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh236# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh282# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh284# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh295# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh297# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh345# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh347# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh382# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/triage-new-issues.sh384# ---------------------------------------------------------------------------COMMENT
MEDIUMconformance/src/bin/client.rs14// ─── Context parsed from MCP_CONFORMANCE_CONTEXT ────────────────────────────COMMENT
MEDIUMconformance/src/bin/client.rs36// ─── Client handlers ────────────────────────────────────────────────────────COMMENT
MEDIUMconformance/src/bin/client.rs179// ─── OAuth helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMconformance/src/bin/client.rs720// ─── Helpers ────────────────────────────────────────────────────────────────COMMENT
MEDIUMconformance/src/bin/client.rs785// ─── Non-auth scenarios ─────────────────────────────────────────────────────COMMENT
MEDIUMconformance/src/bin/client.rs935// ─── Main ───────────────────────────────────────────────────────────────────COMMENT
MEDIUMconformance/src/bin/server.rs52// ─── SEP-2322 MRTR (InputRequiredResult) helpers ────────────────────────────COMMENT
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWcrates/rmcp/tests/test_elicitation.rs102 .with_content(json!({"email": "user@example.com"}));CODE
LOWcrates/rmcp/tests/test_elicitation.rs107 "content": {"email": "user@example.com"}CODE
LOWcrates/rmcp/tests/test_elicitation.rs843 ElicitResult::new(ElicitationAction::Accept).with_content(json!("John Doe")),CODE
LOWcrates/rmcp/tests/test_elicitation.rs850 assert_eq!(result.content, Some(json!("John Doe")));CODE
LOWexamples/servers/src/completion_stdio.rs377 vec!["'John Doe'", "'jane@example.com'", "123", "NOW()"]CODE
LOWconformance/src/bin/server.rs761 "default": "John Doe"CODE
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMcrates/rmcp-macros/src/lib.rs218/// #[prompt(name = "code_review", description = "Reviews code for best practices")]COMMENT
MEDIUMconformance/src/bin/client.rs699 // More robust: parse ASN.1. But for conformance testing this suffices.COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMexamples/servers/src/simple_auth_streamhttp.rs49 // For demonstration purposes, use more secure token management in productionCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/release-plz.yml41 # Create a PR with the new versions and changelog, preparing the next release.COMMENT
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWcrates/rmcp/tests/test_with_python/client.py1CODE
LOWcrates/rmcp/tests/test_with_python/client.py1CODE
Redundant / Tautological Comments1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/triage-new-issues.sh321 # Check if already triagedCOMMENT