h

hi-ai

@su-record/hi-ai
0 Stars 157 次浏览 su-record 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "hi-ai": {
      "args": [],
      "command": "hi-ai",
      "env": {}
    },
    "hi-gcloud": {
      "args": [
        "-y",
        "@polin-go/hi-gcloud"
      ],
      "command": "npx"
    }
  }
}

服务介绍

Hi-AI

smithery badge
npm version

MCP Compatible
Tests
Coverage

**Model Context Protocol AI **

TypeScript + Python 34



Hi-AI Model Context Protocol (MCP) AI . 34 , .

  • ** **: /
  • ** **:
  • ** **: TypeScript, JavaScript, Python
  • ** **:
  • ** **: 100%

1. (v2.0 )

    10 :
  • ** **: (related_to, depends_on, implements )
  • ** **: BFS/DFS
  • ** **: 5 (keyword, graph_traversal, temporal, priority, context_aware)
  • ****:

** **:

  • save_memory -
  • recall_memory -
  • link_memories - (v2.0 )
  • get_memory_graph - (v2.0 )
  • search_memories_advanced - (v2.0 )
  • create_memory_timeline - (v2.0 )
  • prioritize_memory -

2.

AST :

  • ** **: , ,
  • ** **:
  • ** **: (v2.0 )
  • ** **: (v2.0 )
  • ** **: TypeScript, JavaScript, Python

** **:

  • find_symbol -
  • find_references -
  • analyze_dependency_graph - (v2.0 )

3.

 :
  • ** **: Cyclomatic, Cognitive, Halstead
  • /:
  • ** **: A-F
  • ** **:

** **:

  • analyze_complexity -
  • validate_code_quality -
  • check_coupling_cohesion - /
  • suggest_improvements -
  • apply_quality_rules -
  • get_coding_guide -

4.

 :
  • **PRD **:
  • ** **:
  • **MoSCoW **:
  • ** **:

** **:

  • generate_prd -
  • create_user_stories -
  • analyze_requirements -
  • feature_roadmap -

5.

 :
  • ** **:
  • ** **:
  • ** **: ///
  • ** **:

** **:

  • create_thinking_chain -
  • analyze_problem -
  • step_by_step_analysis -
  • format_as_plan -

6.

:
  • ** **:
  • ** **: , ,
  • **Gemini **: Google Gemini API

** **:

  • enhance_prompt -
  • analyze_prompt -
  • enhance_prompt_gemini - Gemini

7.

:

  • **9 **: , ,
  • ** **:

** **:

  • apply_reasoning_framework - 9

8. (v2.0 )

:
  • ** **: ,
  • ** **: ,

** **:

  • get_usage_analytics -

9. UI &

  • preview_ui_ascii - ASCII UI
  • get_current_time -

Hi-GCloud

Hi-AI hi-gcloud MCP GCP + .

hi-gcloud hi-ai :

 Cloud Run : my-api
 3  .

 hi-ai  :    analyze_problem   ,
          .

User: " "

[hi-gcloud]
 gcp_run_logs   
  3 , hi-ai   

[hi-ai  ]
 analyze_problem   
 find_symbol    
 suggest_improvements   
 save_memory    ( )

MCP :

{
  "mcpServers": {
    "hi-ai": {
      "command": "npx",
      "args": ["-y", "@su-record/hi-ai"]
    },
    "hi-gcloud": {
      "command": "npx",
      "args": ["-y", "@polin-go/hi-gcloud"]
    }
  }
}

hi-gcloud hi-ai
analyze_problem, find_symbol
step_by_step_analysis, suggest_improvements
analyze_complexity, check_coupling_cohesion
format_as_plan

v2.0.0

Hi-AI v2.0.0 .

(6 )

link_memories ( )
get_memory_graph / (Mermaid )
search_memories_advanced 5
create_memory_timeline
analyze_dependency_graph
get_usage_analytics /

  • index.ts: 37 switch case
  • MemoryManager: (395 823)
  • ** **: (puppeteer-core)

search_memories search_memories_advanced
auto_save_context save_memory
restore_session_context recall_memory
start_session save_memory
break_down_problem analyze_problem
think_aloud_process step_by_step_analysis
monitor_console_logs
inspect_network_requests

v1.4.0 v2.0.0
37 34 -3
MemoryManager 395 823 +428
1 5 +400%
BFS/DFS

  • Node.js 18.0
  • TypeScript 5.0
  • MCP (Claude Desktop, Cursor, Windsurf)
  • Python 3.x (Python )

NPM

#  
npm install -g @su-record/hi-ai

#  
npm install @su-record/hi-ai

Smithery

#  
https://smithery.ai/server/@su-record/hi-ai

MCP

Claude Desktop MCP :

{
  "mcpServers": {
    "hi-ai": {
      "command": "hi-ai",
      "args": [],
      "env": {}
    }
  }
}

(34)

** - ** 6 save_memory, recall_memory, list_memories, delete_memory, update_memory, prioritize_memory
** - ** 4 link_memories, get_memory_graph, search_memories_advanced, create_memory_timeline
** ** 3 find_symbol, find_references, analyze_dependency_graph
**** 4 create_thinking_chain, analyze_problem, step_by_step_analysis, format_as_plan
** ** 6 analyze_complexity, validate_code_quality, check_coupling_cohesion, suggest_improvements, apply_quality_rules, get_coding_guide
**** 4 generate_prd, create_user_stories, analyze_requirements, feature_roadmap
**** 3 enhance_prompt, analyze_prompt, enhance_prompt_gemini
**** 1 apply_reasoning_framework
**** 1 get_usage_analytics
UI 1 preview_ui_ascii
**** 1 get_current_time

save_memory , remember, save this
recall_memory , recall, remind me
link_memories , link, connect
get_memory_graph , graph, relations
search_memories_advanced , advanced search, find

find_symbol , find function, where is
analyze_dependency_graph , dependency, relations
analyze_complexity , complexity, how complex
validate_code_quality , quality, review

graph TB
    subgraph "Client Layer"
        A[Claude Desktop / Cursor / Windsurf]
    end

    subgraph "MCP Server"
        B[Hi-AI v2.0.0]
    end

    subgraph "Core Libraries"
        C1[MemoryManager + Graph]
        C2[ContextCompressor]
        C3[ProjectCache]
        C4[PythonParser]
    end

    subgraph "Tool Categories"
        D1[Memory Basic x6]
        D2[Memory Graph x4]
        D3[Code Analysis x3]
        D4[Thinking Tools x4]
        D5[Quality Tools x6]
        D6[Planning Tools x4]
        D7[Prompt Tools x3]
        D8[Reasoning x1]
        D9[Analytics x1]
        D10[UI/Time x2]
    end

    subgraph "Data Layer"
        E1[(SQLite Database)]
        E2[Project Files]
    end

    A <--> B
    B --> C1 & C2 & C3 & C4
    B --> D1 & D2 & D3 & D4 & D5 & D6 & D7 & D8 & D9 & D10
    C1 --> E1
    C3 --> E2
    C4 --> E2
    D1 --> C1 & C2
    D2 --> C1
    D3 --> C3 & C4
    D5 --> C4
    D9 --> C1

MemoryManager (v2.0 )

  • ****:
  • ****: SQLite, better-sqlite3
  • ****: CRUD, , , , BFS/DFS
  • ****: WAL , , Prepared Statements

ContextCompressor

  • ****:
  • ****:
  • ****:

ProjectCache

  • ****: ts-morph
  • ****: LRU
  • ****:
  • ****: 100MB/, 200MB

PythonParser

  • ****: Python AST
  • ****: subprocess
  • ****: ,
  • ****: ,

(v2.0)

-- memories 
CREATE TABLE memories (
  key TEXT PRIMARY KEY,
  value TEXT NOT NULL,
  category TEXT NOT NULL DEFAULT 'general',
  timestamp TEXT NOT NULL,
  lastAccessed TEXT NOT NULL,
  priority INTEGER DEFAULT 0
);

-- memory_relations  (v2.0 )
CREATE TABLE memory_relations (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  sourceKey TEXT NOT NULL,
  targetKey TEXT NOT NULL,
  relationType TEXT NOT NULL,
  strength REAL DEFAULT 1.0,
  metadata TEXT,
  timestamp TEXT NOT NULL,
  UNIQUE(sourceKey, targetKey, relationType)
);

  • LRU
  • 5 TTL

  • SQLite
  • : O(n) O(n)

(v2.0)

  • BFS/DFS
  • Union-Find

#  
git clone https://github.com/su-record/hi-ai.git
cd hi-ai

#  
npm install

# 
npm run build

#  
npm run dev

#   
npm test

# Watch 
npm run test:watch

# UI 
npm run test:ui

#  
npm run test:coverage

  • TypeScript: strict
  • ****: src/types/tool.ts
  • ****: 100%
  • ****: Conventional Commits

  1. src/tools/category/
  2. ToolDefinition
  3. src/index.ts toolHandlers
  4. tests/unit/
  5. README


MIT License - , ,


  :
@software{hi-ai2024,
  author = {Su},
  title = {Hi-AI: Knowledge Graph-Based MCP Server for AI-Assisted Development},
  year = {2024},
  version = {2.0.0},
  url = {https://github.com/su-record/hi-ai}
}

Star History

Star History Chart

Hi-AI v2.0.0

       34  

Made with by Su

Homepage
Documentation
Issues
Discussions

相关 MCP 服务