Code2Flow MCP Server logo

Code2Flow MCP Server

by kursk-ye

This project wraps the code2flow command-line tool as an MCP (Model Context Protocol) server. It allows AI applications to generate and access code call graphs through a standardized MCP protocol.

View on GitHub

Last updated: N/A

What is Code2Flow MCP Server?

The Code2Flow MCP Server is a server that exposes the functionality of the code2flow command-line tool via the Model Context Protocol (MCP). It enables AI applications to generate and access code call graphs in a standardized way.

How to use Code2Flow MCP Server?

To use the server, first clone the repository, install the dependencies (including code2flow), and then run the server.py script. You can interact with the server using an MCP client, such as the provided Python example, or integrate it with tools like Claude Desktop or Cursor.

Key features of Code2Flow MCP Server

  • Generates code call graphs

  • Supports multiple programming languages (Python, JavaScript, Ruby, PHP)

  • Provides service through the MCP protocol

  • Outputs images in PNG format

  • Offers version checking and code complexity analysis

Use cases of Code2Flow MCP Server

  • Integrating code analysis into AI-powered code editors

  • Automated code understanding for AI models

  • Generating visualizations of code structure for debugging

  • Analyzing code dependencies for refactoring

  • Providing context to AI coding assistants

FAQ from Code2Flow MCP Server

What is code2flow?

code2flow is a command-line tool that generates call graphs from source code.

What is MCP?

MCP (Model Context Protocol) is a standardized protocol for AI applications to access and interact with tools and services.

What programming languages are supported?

The server supports Python, JavaScript, Ruby, and PHP.

How do I install the server?

Clone the repository, create a virtual environment, install the dependencies, and then install code2flow.

How do I generate a call graph?

Use an MCP client to call the generate_call_graph tool, providing the source code path and language as parameters.