MCP.so
Sign In
Servers

Code2Flow MCP 服务器

@MCP-Mirror

Mirror of

Overview

What is Code2Flow MCP 服务器?

Code2Flow MCP 服务器 wraps the code2flow command-line tool into a Model Context Protocol (MCP) server, allowing AI applications to generate and access code call graphs through a standardized MCP interface. It supports Python, JavaScript, Ruby, and PHP source code, outputs call graphs as PNG images, and also provides version checking and code complexity analysis. It is designed for developers and AI agents that need to visualize code structure programmatically.

How to use Code2Flow MCP 服务器?

Install by cloning the repository, creating a virtual environment, and installing dependencies (including code2flow). Start the server directly with python server.py, or use the MCP development tools (mcp dev server.py or mcp install server.py). Configuration for Cursor can be added as a JSON entry specifying the command and path to server.py. Once running, clients can call the available MCP tools (e.g., generate_call_graph) with parameters such as source_paths, language, and optional output_path, exclude, and include patterns.

Key features of Code2Flow MCP 服务器

  • Analyzes source code and generates call graphs.
  • Supports Python, JavaScript, Ruby, and PHP.
  • Outputs call graphs as PNG images.
  • Provides code2flow version checking.
  • Includes code complexity analysis capability.
  • Integrates seamlessly with AI applications via MCP.

Use cases of Code2Flow MCP 服务器

  • AI assistants generating call graphs on demand for user codebases.
  • Automated codebase visualization during development or onboarding.
  • Quick complexity analysis for code reviews or refactoring decisions.
  • Language-specific call graph generation for multi‑language projects.

FAQ from Code2Flow MCP 服务器

Which programming languages are supported?

Python, JavaScript, Ruby, and PHP are supported as source languages.

What format are the generated call graphs in?

Call graphs are output as PNG images.

What tools does the server provide?

Three tools: generate_call_graph, check_code2flow_version, and analyze_code_complexity.

What are the prerequisites?

Python 3.7+ and the code2flow command‑line tool must be installed.

How do I configure the server for Cursor?

Add a JSON entry like "code2flow": { "command": "cmd", "args": ["/c", "python", "path/to/server.py"] } to your Cursor MCP configuration.

Tags

More from Other