codefactor-mcp
Fetches and parses CodeFactor repository issue pages, extracting issue data such as file paths, categories, severity, metrics, line ranges, preview code, and recommendations, and generates summaries in Markdown.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codefactor-mcpget CodeFactor issues for https://www.codefactor.io/repository/github/example/example"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codefactor-mcp
English | 简体中文
codefactor-mcp is a local MCP server for reading CodeFactor repository issue pages.
✨ Features
Parse CodeFactor issues: extracts issue data from the embedded model in CodeFactor pages
Normalize issue details: outputs file paths, categories, severity, metrics, line ranges, preview code, and recommendations
Generate summaries: converts CodeFactor issues into Markdown for quick reading
Related MCP server: code-health-mcp
🚀 Quick Start
Prerequisites
Node.js 20+
A CodeFactor repository issues URL, for example:
https://www.codefactor.io/repository/github/5656565566/aylink.extra/issuesIf the CodeFactor page requires a logged-in session, you also need a browser Cookie header.
Install And Build
Clone the project:
git clone https://github.com/5656565566/codefactor_mcp.gitThen run:
cd codefactor_mcp
npm install
npm run buildThe built MCP entry point is:
codefactor_mcp\dist\index.jsIn the examples below, replace <CODEFACTOR_MCP_DIR> with the actual install directory of your local codefactor-mcp project.
⚙️ Codex Configuration
Codex uses:
%USERPROFILE%\.codex\config.tomlAfter changing this file, restart Codex or open a new session.
Option 1: Let AI Choose The Repository
Use this when you want the AI to pass the CodeFactor repository URL for each task:
[mcp_servers.codefactor]
command = 'node'
args = ['<CODEFACTOR_MCP_DIR>\dist\index.js']
startup_timeout_sec = 30Then provide the repository URL in your request:
请使用 codefactor MCP 检查这个仓库,并在修改代码时遵守它的代码建议:
https://www.codefactor.io/repository/github/5656565566/aylink.extra/issuesYou can also ask the AI to inspect the current Git remote and derive the CodeFactor URL:
请根据当前仓库 remote 推导 CodeFactor issues 地址,然后调用 codefactor MCP 获取建议。Option 2: Configure A Default Repository
Use this when most tasks target the same repository:
[mcp_servers.codefactor]
command = 'node'
args = ['<CODEFACTOR_MCP_DIR>\dist\index.js']
startup_timeout_sec = 30
[mcp_servers.codefactor.env]
CODEFACTOR_REPOSITORY_URL = 'https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues'Tool behavior:
If
urlis not provided, the tool usesCODEFACTOR_REPOSITORY_URLIf
urlis provided, the tool uses that URL for the current call
Option 3: Configure Login Cookie
Use this only when CodeFactor requires a logged-in browser session:
[mcp_servers.codefactor]
command = 'node'
args = ['<CODEFACTOR_MCP_DIR>\dist\index.js']
startup_timeout_sec = 30
[mcp_servers.codefactor.env]
CODEFACTOR_REPOSITORY_URL = 'https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues'
CODEFACTOR_COOKIE = 'paste browser Cookie header here'Notes:
Do not commit
CODEFACTOR_COOKIEDo not share cookies with untrusted AI clients or third-party services
Cookies may expire and need to be refreshed
🔌 Other Platform Configuration
Different MCP clients use different config file locations and root fields. All examples below use this built entry point:
<CODEFACTOR_MCP_DIR>\dist\index.jsIf you want the AI to choose the repository, remove env from the examples and pass url when calling the tool.
Claude Code
Install globally for the current user:
claude mcp add --scope user codefactor -- node <CODEFACTOR_MCP_DIR>\dist\index.jsFor project-scoped shared configuration, create .mcp.json in the project root:
{
"mcpServers": {
"codefactor": {
"type": "stdio",
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}After starting Claude Code, use /mcp to check the connection.
Claude Desktop
Common config file locations:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Example:
{
"mcpServers": {
"codefactor": {
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}Save the file, then fully quit and reopen Claude Desktop.
Cursor
Common configuration options:
Global:
~/.cursor/mcp.jsonProject-level:
.cursor/mcp.jsonin the project rootYou can also add it from Cursor's MCP / Tools settings page
Example:
{
"mcpServers": {
"codefactor": {
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}After adding it, refresh the MCP / Tools page or restart the Cursor window.
VS Code / GitHub Copilot
VS Code uses servers as the root field, not mcpServers.
Common config locations:
Workspace:
.vscode/mcp.jsonUser-level: run
MCP: Open User Configurationfrom the Command Palette
Example:
{
"servers": {
"codefactor": {
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}To share the configuration with a team, prefer the workspace .vscode/mcp.json file.
Windsurf / Cascade
Common configuration options:
Add from
Settings>Tools>Windsurf Settings>Add ServerOr click
View Raw Configand editmcp_config.json
Common config file locations:
Windows:
%APPDATA%\Codeium\Windsurf\mcp_config.jsonmacOS / Linux:
~/.codeium/windsurf/mcp_config.json
Example:
{
"mcpServers": {
"codefactor": {
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}After adding it, refresh the MCP plugin list or restart Windsurf.
Generic JSON MCP Clients
If a client uses the standard mcpServers layout, use:
{
"mcpServers": {
"codefactor": {
"type": "stdio",
"command": "node",
"args": [
"<CODEFACTOR_MCP_DIR>\\dist\\index.js"
],
"env": {
"CODEFACTOR_REPOSITORY_URL": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues"
}
}
}
}If the client does not support the type field, remove "type": "stdio".
🧰 MCP Tools
fetch_codefactor_issues
Fetches issues from https://www.codefactor.io and returns normalized JSON.
Common arguments:
Argument | Description |
| CodeFactor repository or issues URL; falls back to |
| Optional Cookie header; falls back to |
| Whether to fetch multiple issue pages |
| Maximum pages to fetch when |
| Filter by category, such as |
| Filter by file path text |
| Limit the number of returned issues |
| Include hidden issues; defaults to false |
summarize_codefactor_issues
Returns a compact Markdown summary. This is useful before code review or refactoring work.
build_codefactor_prompt
Builds an AI-facing prompt from CodeFactor issues. This is the recommended tool before asking an AI agent to edit code.
The generated prompt asks the AI to:
Prefer CodeFactor issues within the current scope
For complexity issues, extract functions, name intermediate concepts, and decompose conditionals
For duplication issues, extract shared logic
For maintainability issues, remove truly unused code or duplicate selectors
Preserve the project's existing comment style
Run relevant validation and report coverage
parse_codefactor_html
Parses a raw HTML string. Use this when you already have the CodeFactor page response from browser DevTools or curl.
🧭 MCP Prompt
The server exposes one prompt:
follow-codefactor-adviceIt asks the AI to read CodeFactor issues before editing code and keep the fix scoped and maintainable.
📌 Usage Examples
Use The Default Repository
先调用 codefactor MCP 生成代码建议提示,然后按提示修复当前问题。Use A Specific Repository
请对这个仓库调用 codefactor MCP,并在修改代码时遵守建议:
https://www.codefactor.io/repository/github/5656565566/aylink.extra/issuesFocus On Complexity
{
"url": "https://www.codefactor.io/repository/github/5656565566/aylink.extra/issues",
"category": "Complexity",
"allPages": true,
"maxPages": 4,
"maxIssues": 20
}Focus On One Module
{
"filePathIncludes": "AYLink.Web/src/features/screencast",
"allPages": true,
"maxPages": 4,
"maxIssues": 20
}Parse Pasted HTML
{
"html": "<!DOCTYPE html>..."
}🛠️ Development And Verification
npm run build
npm test
npm run typecheckYou can also run MCP discovery with a client. The server should expose these tools:
parse_codefactor_htmlfetch_codefactor_issuesbuild_codefactor_promptsummarize_codefactor_issues
And this prompt:
follow-codefactor-advice
📄 Notes
Repository URLs may omit
/issues; the server appends it automaticallyCodeFactor issue pages may be paginated; use
allPages: truewhen full context is neededPublic repositories usually do not need cookies
Private or logged-in pages may need
CODEFACTOR_COOKIE
Available Tools
4 toolsbuild_codefactor_promptBuild CodeFactor PromptC
Build an AI-facing prompt that asks the model to follow CodeFactor suggestions while editing code.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | CodeFactor repository or issues URL. | |
| html | No | Raw CodeFactor issues HTML. If omitted, url or CODEFACTOR_REPOSITORY_URL is used. | |
| cookie | No | Optional CodeFactor Cookie header. Falls back to CODEFACTOR_COOKIE. | |
| allPages | No | Fetch all issue pages up to maxPages when using url. | |
| category | No | Only include one CodeFactor category, for example Complexity. | |
| maxPages | No | Maximum pages to fetch when allPages is true. | |
| maxIssues | No | Maximum number of issues returned. | |
| includeHidden | No | Include hidden CodeFactor issues. Defaults to false. | |
| filePathIncludes | No | Only include issues whose file path contains this text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It only states the output is a prompt, but does not explain how it uses the URL, HTML, or other parameters. There is no mention of side effects, data fetching, or any disclaimers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence, front-loaded with the verb and resource. No wasted words, but could benefit from slightly more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and 9 parameters, the description is too brief. It does not explain the prompt structure, how parameters affect output, or the interaction between url and html. This leaves agents with insufficient context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so each parameter already has a description. The tool description adds no extra meaning beyond what the schema provides, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description has a specific verb 'Build' and resource 'AI-facing prompt', clarifying the output. It distinguishes from sibling tools like 'fetch_codefactor_issues' which fetch raw data, and 'summarize_codefactor_issues' which presumably produce summaries. However, 'AI-facing prompt' is somewhat ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings. The description does not indicate prerequisites, such as needing to fetch issues first, or when a prompt is needed instead of raw issues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fetch_codefactor_issuesFetch CodeFactor IssuesB
Fetch CodeFactor repository issues from codefactor.io and return normalized issue data.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | CodeFactor repository or issues URL. Falls back to CODEFACTOR_REPOSITORY_URL. | |
| cookie | No | Optional CodeFactor Cookie header. Falls back to CODEFACTOR_COOKIE. | |
| allPages | No | Fetch all issue pages up to maxPages. | |
| category | No | Only include one CodeFactor category, for example Complexity. | |
| maxPages | No | Maximum pages to fetch when allPages is true. | |
| maxIssues | No | Maximum number of issues returned. | |
| includeHidden | No | Include hidden CodeFactor issues. Defaults to false. | |
| filePathIncludes | No | Only include issues whose file path contains this text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior, but it only mentions fetching and normalization. It omits authentication, rate limits, error handling, pagination, and other behavioral traits, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, front-loaded with the core action. It is efficient but could be slightly more informative without becoming verbose, hence a 4.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With eight parameters, no output schema, and no annotations, the description is insufficient. It fails to explain how parameters interact (e.g., maxPages with allPages), what 'normalized issue data' means, or provide an overall workflow context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the baseline is 3. The description adds no extra parameter context beyond the schema, which already documents all eight parameters with descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Fetch', the resource 'CodeFactor repository issues', and includes 'normalized issue data', distinguishing it from sibling tools like build_codefactor_prompt, parse_codefactor_html, and summarize_codefactor_issues.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage as a fetch tool but provides no explicit guidance on when to use it versus alternatives, nor does it mention prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
parse_codefactor_htmlParse CodeFactor HTMLB
Parse a CodeFactor repository issues HTML response and return normalized issues.
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Raw HTML from a CodeFactor issues page. | |
| category | No | Only include one CodeFactor category, for example Complexity. | |
| maxIssues | No | Maximum number of issues returned. | |
| includeHidden | No | Include hidden CodeFactor issues. Defaults to false. | |
| filePathIncludes | No | Only include issues whose file path contains this text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It only says 'parse and return normalized issues' without disclosing behavior like input validation, error handling, side effects, or output format details (e.g., what 'normalized' means).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with 12 words, very concise. It is front-loaded with the primary action. However, it could benefit from slightly more structure (e.g., mentioning output or usage hint).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 5 parameters, no output schema, and no annotations, the description is too sparse. It omits return value details, error scenarios, and how to effectively use optional filters like category or filePathIncludes. Inadequate for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description does not add extra meaning beyond the schema. It does not explain how parameters like category affect output or the relationship between input and output.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Parse') and resource ('CodeFactor repository issues HTML response'), with a specific output ('return normalized issues'). It distinguishes from siblings like fetch_codefactor_issues (fetching) and summarize_codefactor_issues (summarizing).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives (e.g., after fetch_codefactor_issues, before summarize_codefactor_issues). No explicit context or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarize_codefactor_issuesSummarize CodeFactor IssuesC
Return a compact Markdown summary of CodeFactor issues for quick context.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | CodeFactor repository or issues URL. | |
| html | No | Raw CodeFactor issues HTML. If omitted, url or CODEFACTOR_REPOSITORY_URL is used. | |
| cookie | No | Optional CodeFactor Cookie header. Falls back to CODEFACTOR_COOKIE. | |
| allPages | No | Fetch all issue pages up to maxPages when using url. | |
| category | No | Only include one CodeFactor category, for example Complexity. | |
| maxPages | No | Maximum pages to fetch when allPages is true. | |
| maxIssues | No | Maximum number of issues returned. | |
| includeHidden | No | Include hidden CodeFactor issues. Defaults to false. | |
| filePathIncludes | No | Only include issues whose file path contains this text. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description does not disclose behavioral traits such as network requests, authentication needs (cookie), or the impact of parameters like allPages or maxPages. It only states the output format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded and to the point. It is concise, though it could be slightly expanded to improve clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (9 parameters, no output schema, no annotations), the description is incomplete. It does not explain the return structure or how parameters influence the summary, leaving agents with insufficient context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% parameter description coverage, so the schema itself explains each parameter. The tool description adds no additional semantic value beyond 'compact Markdown summary', which is adequate but not enhanced.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly indicates the tool returns a compact Markdown summary of CodeFactor issues, distinguishing it from sibling tools that fetch raw data or parse HTML. However, it could be more specific about the nature of the summary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like fetch_codefactor_issues or parse_codefactor_html. It lacks explicit context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool serves a distinct purpose: building a prompt, fetching issues, parsing HTML, and summarizing. No overlap in functionality.
All tool names follow a consistent verb_noun pattern (build_, fetch_, parse_, summarize_) with clear domain context.
4 tools is an appropriate size for a focused server providing CodeFactor issue access and summarization without being too sparse or overwhelming.
Covers key operations: fetching, parsing, summarizing issues, and generating a prompt. Minor gap: no tool to act on issues directly, but prompt builder handles that indirectly.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Scan a web page for accessibility, security, privacy, quality and SEO issues, with fixes.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides comprehensive code analysis (quality, complexity, linting, dependencies, security) and web scraping capabilities (static/dynamic content, API discovery) for development workflows.42171MIT
- AlicenseAqualityDmaintenanceProvides comprehensive code quality analysis with quantitative metrics, historical trends, and refactoring risk prediction for C#, Python, and TypeScript codebases.520MIT
- FlicenseAqualityDmaintenanceEnables analysis of GitHub Pull Requests, including details, diff, file lists, and review tracking.3
- FlicenseNot gradedqualityCmaintenanceEnables automated code review by reading code files, checking for style issues like console.log and TODOs, and generating formatted reports.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/5656565566/codefactor_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server