PA

phxdev1/archy-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

30 stars 8 forks 质量 66 趋势 11Apache-2.0

Archy 是一个 MCP(模型上下文协议)服务器,使用美人鱼语法生成架构图。

概览

Archy 是一个 MCP(模型上下文协议)服务器,使用 Mermaid 语法生成架构图。它可以处理自然语言描述和 GitHub 仓库 URL,创建各种类型的图表。 - 从文本描述生成图表 - 从GitHub仓库生成图表 - 支持所有美人鱼图类型:- 流程图 - 序列图 - 类图 - 状态图 - 实体关系图 - 用户旅程 - 甘特图 - 饼图 - 象限图 - 需求图 - Git图 - C4图 - Node.js(v16及以上)- npm(v7及以上)- TypeScript(v5.8及以上,包含在依赖中) 3. 构建项目:将 TypeScript 源文件编译为构建目录中的 JavaScript。

概述(AI 翻译)

Archy 是一个 MCP(模型上下文协议)服务器,使用 Mermaid 语法生成架构图。它可以处理自然语言描述和 GitHub 仓库 URL,创建各种类型的图表。

特色

  • 从文本描述生成图表
  • 从 GitHub 仓库生成图表
  • 支持所有美人鱼图解类型:
  • 流程图
  • 时序图
  • 类图
  • 状态图
  • 实体关系图
  • 用户旅程
  • 甘特图
  • 饼图
  • 象限图
  • 需求图
  • Git 图
  • C4 图解

安装

先决条件

  • Node.js(v16或更高)
  • NPM(V7或更高)
  • TypeScript(v5.8及以上版本,包含在依赖中)

从源码安装

  1. 克隆仓库:

  2. 安装依赖:

  3. 建设项目:

这会将 TypeScript 源文件编译成 build 目录中的 JavaScript。

自动MCP安装

Archy 包含一个方便的安装脚本,可自动配置 MCP 服务器以兼容 VS Code 和 Claude:

这段剧本:

  • 自动检测操作系统正确的 MCP 设置位置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Archy - Architectural Diagram Builder

Archy is an MCP (Model Context Protocol) server that generates architectural diagrams using Mermaid syntax. It can process both natural language descriptions and GitHub repository URLs to create various types of diagrams.

Features

  • Generate diagrams from text descriptions
  • Generate diagrams from GitHub repositories
  • Support for all Mermaid diagram types:
    • Flowcharts
    • Sequence Diagrams
    • Class Diagrams
    • State Diagrams
    • Entity Relationship Diagrams
    • User Journeys
    • Gantt Charts
    • Pie Charts
    • Quadrant Charts
    • Requirement Diagrams
    • Git Graphs
    • C4 Diagrams

Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm (v7 or higher)
  • TypeScript (v5.8 or higher, included in dependencies)

Install from Source

  1. Clone the repository:

    git clone https://github.com/phxdev1/archy.git
    cd archy
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

    This compiles the TypeScript source files to JavaScript in the build directory.

Automated MCP Installation

Archy includes a convenient installation script that automatically configures the MCP server for both VS Code and Claude:

npm run install-mcp

This script:

  • Automatically detects the correct MCP settings locations for your operating system
  • Updates the MCP configuration files for VS Code and Claude
  • Prompts for a GitHub token for repository analysis (optional)
  • Makes the server executable

No need to manually edit JSON configuration files like some kind of cave-dwelling animal! The script handles all the tedious configuration work for you, so you can focus on creating beautiful diagrams instead of wrestling with file paths and permissions.

Configuration

Configuration

Archy can be configured using environment variables:

  • GITHUB_TOKEN: GitHub API token for authenticated requests (optional)
  • OPENROUTER_API_KEY: OpenRouter API key for AI-powered diagram generation (optional)

OpenRouter Integration

Archy includes integration with OpenRouter through LangChain, enabling enhanced AI-powered diagram generation. When an OpenRouter API key is configured, additional tools become available:

  • AI-Enhanced Text-to-Diagram Generation: Generate more sophisticated diagrams from text descriptions
  • Code-to-Diagram Generation: Analyze code and generate appropriate diagrams
  • Diff Visualization: Generate diagrams showing differences between code versions

To use these features:

  1. Sign up for an account at OpenRouter
  2. Get your API key from the OpenRouter dashboard
在 GitHub 查看完整 README

安装

npx tsc
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "archy": { "command": "node", "args": ["/path/to/archy/build/index.js"], "env": { "GITHUB_TOKEN": "your-github-token" } } } }