Briefing · Paper · source · published · Boston Identity
A code scanner's top find in 583 MCP servers was hard-coded keys; tool poisoning needed an MCP-specific scanner
Six Queen's University researchers collected 1,899 open-source MCP servers in March 2025 and analysed the 583 with ten or more GitHub stars. SonarQube flagged a vulnerability in 7.2% of those, half of them for exposed credentials, and none in the 61 official integrations. Invariant Labs' mcp-scan, which reads tool descriptions, ran on 73 servers and flagged possible tool poisoning in 5.5% of them.
arXiv · Mohammed Mehedi Hasan, Hao Li, Emad Fallahzadeh, Gopi Krishnan Rajbahadur, Bram Adams, Ahmed E. Hassan · June 16, 2025 · read
What's happening
Finding3SonarQube flagged 42 of the 583 MCP servers analysed, and half of those 42 for exposed credentials such as API keys left in the code.
SonarQube, a general-purpose code scanner, flagged 277 vulnerabilities in 42 of the 583 servers the authors analysed (7.2%), and half of those 42 were flagged for exposed credentials, such as OpenAI and Gemini API keys and Google Cloud service-account keys left in the code (3.6% of the 583). The smaller access-control and authentication groups (1.4% and 0.5%) collect rules on restricting service-account permissions, avoiding wildcard RBAC permissions, scoping AWS IAM policies and signing JWTs; the study does not test how a server authorizes its callers. None of the 61 official integrations was flagged, and all five servers with more than five flags were existing projects that had added MCP as a feature. The authors say so low a rate more likely points to under-detection by current tools, so we read these counts as a floor.
flag a problem with BI-FIND-2025-0382
The 1,899 servers in the abstract are the set the authors collected; the 7.2% vulnerability rate rests on the 583 they scanned with SonarQube, and the 5.5% tool-poisoning rate on the 73 that mcp-scan could run against.
Drawn from the paper's figure 4 and sections 5 and 6Source dated June 16, 2025Passage: Study design
Swipe for the full figure →
Invariant Labs' mcp-scan flagged possible tool poisoning in 5.5% of the 73 servers it scanned, roughly four servers.
Invariant Labs' mcp-scan flagged possible tool poisoning in 5.5% of the 73 servers it scanned, roughly four of them. Tool poisoning hides instructions for the model in a tool's description and needs no change to the tool's executable logic, and the authors read the rate as a sign that general tools see only part of the risk. They call it more common than credential exposure. That compares two tools on samples of 73 and 583 servers, and the smaller sample was sized for a 10% margin of error. The paper shows none of the flagged descriptions. Because it reads only descriptions, mcp-scan also missed what the authors found by hand: apple-notes-mcp needs full disk access, and godot-mcp came with auto-approval for sensitive operations.
flag a problem with BI-FIND-2025-0383
The authors find MCP servers' medians matched or beat open-source baselines on 9 of 14 development and community metrics.
On health and code quality, the authors find MCP servers much like other open-source software. Their medians matched or beat the open-source and machine-learning baselines on 9 of 14 development and community metrics, with 5.5 commits a week against 2.5. The median server, though, had 2 contributors, against 41 for general open source. SonarQube found critical or blocker code smells in 66% of the 583 servers, led by high cognitive complexity, and bugs in 14.4%. The baselines are figures taken from earlier studies, and the bug baseline comes from Java projects although none of the sampled servers is written in Java.
flag a problem with BI-FIND-2025-0384
Section by section
6showing 6 of 6
[1]Why MCP servers need study: adoption claims, tool poisoning, MCP architecture
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trust
Why MCP servers need study: adoption claims, tool poisoning, MCP architecture
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
The opening sections argue that MCP replaces the separate tool interface each agent framework used to have, and cite other sources for its adoption, including more than 25 million SDK downloads a week. They explain tool poisoning, where a tool's description alone steers the model, and cite incidents reported elsewhere.
opinionfrom published text + figures
[2]Study design: 1,899 repositories found, 583 analysed, 73 dynamically scanned
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trust
Study design: 1,899 repositories found, 583 analysed, 73 dynamically scanned
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
The authors took 343 servers from Anthropic's list on March 19, 2025 and found 1,556 more by searching GitHub for SDK imports up to March 20, making 1,899. Dropping repositories with fewer than ten stars left 583 for SonarQube. They drew 83 at random for mcp-scan and got 73 scanned. A jury of three language models grouped the findings into patterns, and the baselines come from 40 earlier papers.
technical artifactfrom published text + figures
[3]RQ-0: health and sustainability of MCP servers against OSS baselines
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trust
RQ-0: health and sustainability of MCP servers against OSS baselines
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
For the 583 servers, the authors set 14 repository metrics against figures from older studies. MCP servers commit more often (5.5 a week against 2.5), adopt CI slightly more (42.2% against 40.3%) and pass more builds (90% against 70%), but the median server has 2 contributors and fewer raw stars, forks, files and issues. The authors read this as a promising start for a protocol about six months old.
technical artifactfrom published text + figures
[4]RQ-1: vulnerabilities in MCP servers, static findings and mcp-scan tool poisoning
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trustNon-human identity
RQ-1: vulnerabilities in MCP servers, static findings and mcp-scan tool poisoning
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
SonarQube flags 277 vulnerabilities in 42 of the 583 servers (7.2%), grouped into eight patterns led by credential exposure (3.6%), and none in official servers. mcp-scan flags possible tool poisoning in 5.5% of the 73 servers it scanned. The authors call the scanner early-stage and describe how hard it was to run.
technical artifactfrom published text + figures
[5]RQ-2: code smells and bugs in MCP servers
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trust
RQ-2: code smells and bugs in MCP servers
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
SonarQube reports critical or blocker code smells in 66% of servers (17,832 across 385), most often high cognitive complexity (59.7%), and bugs in 14.4% (523 across 84). Mined servers have more code smells than official and community ones, and more bugs than community ones. The bug baseline comes from Java studies, though no sampled server is written in Java.
technical artifactfrom published text + figures
[6]Implications, threats to validity and conclusion
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
AI trust
Implications, threats to validity and conclusion
Mohammed Mehedi Hasan, Queen's University · Hao Li, Queen's University · Emad Fallahzadeh, Queen's University · Gopi Krishnan Rajbahadur, Queen's University · Bram Adams, Queen's University · Ahmed E. Hassan, Queen's University
The authors write for three audiences. Researchers should add MCP threats to CWE and OWASP and build MCP-specific scanners, users should audit third-party servers before use, and registries such as Smithery, Glama and Cloudflare should scan servers and revoke bad ones. They concede that the low static rate may mean under-detection and that mcp-scan covered only a sample.
opinionfrom published text