AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Code Nexus

mcp-laelluo-code-nexus · by LaelLuo

A Rust-based code relationship management tool using MCP protocol. Organize and understand code structure through tags, comments, and relationships with advanced query capabilities (AND/OR/NOT/wildcards).

— No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add mcp-laelluo-code-nexus

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-laelluo-code-nexus)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
○ stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Code Nexus? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

CodeNexus

CodeNexus 是一个基于 Rust 和 Model Context Protocol (MCP) 的代码库关系管理工具,通过标签、注释和关联关系帮助开发者更好地组织和理解代码结构。

功能特性

  • 标签管理: 为文件添加结构化标签 (type:value 格式)
  • 注释系统: 为文件添加描述性注释
  • 关联关系: 建立文件间的依赖和关联关系
  • 智能查询: 支持复杂的标签查询(AND、OR、NOT、通配符)和关系搜索
  • 多项目支持: 同时管理多个项目,每个项目独立存储
  • 路径验证: 确保文件路径安全性和有效性
  • MCP 集成: 通过 MCP 协议与 AI 助手无缝集成

快速开始

安装

# 克隆项目
git clone 
cd code_nexus

# 构建项目
cargo build --release

运行

# 启动 MCP 服务器
cargo run

配置 MCP 客户端

在你的 MCP 客户端配置中添加:

{
  "mcpServers": {
    "code-nexus": {
      "command": "path/to/code-nexus",
      "args": [],
      "env": {
        "RUST_LOG": "info"
      }
    }
  }
}

使用示例

标签管理

# 为文件添加标签(需要提供项目路径)
add_file_tags({
  "project_path": "/path/to/your/project",
  "file_path": "src/api/user.rs",
  "tags": ["category:api", "status:active", "tech:rust"]
})

# 查询带有特定标签的文件
query_files_by_tags({
  "project_path": "/path/to/your/project",
  "query": "category:api AND status:active"
})

# 支持的查询语法:
# - 单标签查询: "category:api"
# - AND操作: "category:api AND status:active"
# - OR操作: "type:manager OR type:adapter"
# - NOT操作: "NOT module:core"
# - 通配符: "module:*", "type:*"
# - 复合查询: "(type:manager OR type:adapter) AND NOT module:core"

# 获取所有标签
get_all_tags({
  "project_path": "/path/to/your/project"
})

注释管理

# 添加文件注释
add_file_comment({
  "project_path": "/path/to/your/project",
  "file_path": "src/api/user.rs",
  "comment": "用户管理API,包含登录、注册等功能"
})

# 更新注释
update_file_comment({
  "project_path": "/path/to/your/project",
  "file_path": "src/api/user.rs",
  "comment": "用户管理API,支持OAuth登录"
})

查询语法

CodeNexus 支持强大的查询语法,可以进行复杂的标签搜索:

基本查询

  • 单标签查询: category:api
  • 精确匹配: status:active

逻辑操作符

  • AND操作: category:api AND status:active
  • OR操作: type:manager OR type:adapter
  • NOT操作: NOT module:core

通配符

  • 匹配所有: module:* (匹配所有module标签)
  • 前缀匹配: type:manage* (匹配type:manager等)

复合查询

  • 组合查询: (type:manager OR type:adapter) AND NOT module:core
  • 嵌套查询: layer:business AND (type:manager OR type:query)

查询示例

# 查找所有业务层的管理器文件
query_files_by_tags({"query": "layer:business AND type:manager"})

# 查找非核心模块的所有文件
query_files_by_tags({"query": "NOT module:core"})

# 查找管理器或适配器类型的文件
query_files_by_tags({"query": "type:manager OR type:adapter"})

# 查找所有模块的文件(通配符)
query_files_by_tags({"query": "module:*"})

关联关系

# 添加文件关联
add_file_relation({
  "project_path": "/path/to/your/project",
  "from_file": "src/api/user.rs",
  "to_file": "src/models/user.rs",
  "description": "依赖用户数据模型"
})

# 查询文件关联
query_file_relations({
  "project_path": "/path/to/your/project",
  "file_path": "src/api/user.rs"
})

多项目支持

CodeNexus 支持同时管理多个项目,每个项目都有独立的数据存储:

项目隔离

  • 每个项目在其根目录下创建 .codenexus/ 数据目录
  • 项目间的标签、注释、关联关系完全隔离
  • 支持同时操作多个项目而不会相互干扰

路径安全

  • 自动验证项目路径和文件路径的有效性
  • 防止路径遍历攻击,确保文件操作在项目范围内
  • 支持相对路径和绝对路径

使用示例

# 项目A的操作
add_file_tags({
  "project_path": "/path/to/project-a",
  "file_path": "src/main.rs",
  "tags": ["category:entry", "lang:rust"]
})

# 项目B的操作(完全独立)
add_file_tags({
  "project_path": "/path/to/project-b",
  "file_path": "src/main.rs",
  "tags": ["category:api", "lang:rust"]
})

项目结构

code_nexus/
├── src/
│   ├── main.rs              # 程序入口
│   ├── lib.rs               # 库入口
│   ├── managers/            # 核心管理器
│   │   ├── tag_manager.rs   # 标签管理
│   │   ├── comment_manager.rs # 注释管理
│   │   └── relation_manager.rs # 关联关系管理
│   ├── query/               # 查询引擎
│   ├── mcp/                 # MCP 适配器
│   ├── storage/             # 数据存储
│   ├── models.rs            # 数据模型
│   └── error.rs             # 错误处理
├── tests/                   # 测试文件
├── docs/                    # 文档
└── .codenexus/              # 数据存储目录
    ├── tags.json            # 标签数据
    ├── comments.json        # 注释数据
    └── relations.json       # 关联关系数据

开发

运行测试

cargo test

代码检查

cargo check
cargo clippy

格式化代码

cargo fmt

技术栈

  • Rust: 核心编程语言
  • rmcp: Rust MCP SDK
  • tokio: 异步运行时
  • serde: 序列化/反序列化
  • tracing: 日志记录
  • anyhow/thiserror: 错误处理

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT License

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.