kursk-ye_code2flow-mcp-server
0
Code2Flow MCP Server integrates the code2flow tool into an MCP server, enabling AI applications to generate and access call graphs. It supports multiple languages and offers code complexity analysis and version checking.
Code2Flow MCP Server
This project wraps the code2flow command-line tool as an MCP (Model Context Protocol) server, allowing AI applications to generate and access code call graphs through a standardized MCP protocol.
Features
- Analyzes source code and generates call graphs
- Supports multiple programming languages (Python, JavaScript, Ruby, PHP)
- Provides service through the MCP protocol for easy integration with AI applications
- Outputs images in PNG format
- Offers version checking and code complexity analysis features
Installation Requirements
- Python 3.7+
- Windows 11 or other supported OS
- PowerShell or other command-line terminal
- Code2Flow command-line tool installed
Usage
Direct Execution via Python
- Start the MCP server
Via MCP Tool
- Use MCP Inspector Tool
- Install on Claude Desktop
- Add to Cursor MCP configuration
Available Tools
generate_call_graph
- Generates code call graphscheck_code2flow_version
- Checks the code2flow versionanalyze_code_complexity
- Analyzes code complexity
Available Resources
help://code2flow
- Help documentationlanguages://supported
- List of supported languagescall-graph://imageID
- Generated call graph images
Configuration Options
source_paths
: Paths to source code files or directoriesoutput_path
: (optional) Path of the output filelanguage
: (optional) Source code language (python, js, ruby, php)exclude
: (optional) List of file patterns to excludeinclude
: (optional) List of file patterns to include
File Structure
server.py
- Main server codemcp_client_example.py
- Client example codetest_server.py
- Test coderequirements.txt
- Dependencies
License
MIT