Logo AI Tools Flake

AI Tools Flake

Cộng đồng
clempat

Nix flake for unified AI tools configuration (Claude Code, OpenCode, MCP servers)

Nhà phát hànhclempat
Kho mãai-tools-flake
Ngôn ngữNix
Bản fork
1
Sao
9
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    AI Tools Flake cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    9 sao và 1 bản fork từ kho mã được liên kết.

AI Tools Flake

Unified Nix flake for AI tools configuration including Claude Code, OpenCode, MCP servers, and AI agents.

Features

  • Unified Module: Single home-manager module that configures both Claude Code and OpenCode
  • MCP Servers: Shared MCP server configurations across tools
  • Claude Desktop Integration: Auto-configures MCP servers for Claude Desktop on macOS
  • AI Agents: Reusable agent definitions with tool-specific metadata
  • Claude Skills: Pre-configured skills for various tasks
  • Claude-Flow Commands: Uses upstream programs.{opencode,claude-code}.commands options
  • Packages: Custom packages like spec-kit
  • Default Configurations: Sensible defaults that can be overridden per-system
  • Flexible Versioning: Control opencode/claude-code versions via flake follows or nixpkgs overlays

Requirements

  • home-manager: Must use unstable branch (programs.claude-code only in unstable)
  • nixpkgs: Recommends nixos-unstable (claude-code package)

Usage

As a Flake Input

Add to your flake.nix:

nix
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    
    ai-tools.url = "github:clempat/ai-tools-flake";
    ai-tools.inputs.nixpkgs.follows = "nixpkgs";  # Use your nixpkgs
  };

  outputs = { nixpkgs, home-manager, ai-tools, ... }: {
    homeConfigurations.youruser = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      modules = [
        ai-tools.nixosModules.default
        {
          programs.ai-tools.enable = true;
        }
      ];
    };
  };
}

Home Manager Integration

Basic Setup (Minimal)

nix
{ inputs, ... }:
{
  imports = [ inputs.ai-tools.nixosModules.default ];

  programs.ai-tools.enable = true;
  
  # That's it! Automatically:
  # - Installs claude-code & opencode from nixpkgs-unstable
  # - Configures MCPs, agents, memory from config/
  # - Adds claude-flow commands
  # - Auto-configures Claude Desktop (macOS)
}

Override Package Versions

The module automatically uses packages from the flake. To override:

nix
{ inputs, pkgs, ... }:
{
  imports = [ inputs.ai-tools.nixosModules.default ];

  programs.ai-tools.enable = true;
  
  # Optional: override package versions
  programs.opencode.package = inputs.opencode.packages.${pkgs.system}.default;
  programs.claude-code.package = pkgs.unstable.claude-code;
}

Claude Desktop Configuration (macOS)

On macOS, the module automatically configures Claude Desktop by generating ~/Library/Application Support/Claude/claude_desktop_config.json.

What's Auto-Configured:

  • ✅ stdio MCP servers (nixos, playwright) are automatically added to the config file
  • ✅ HTTP MCP servers via the mcp-gateway proxy (NEW!)

MCP Gateway (Automatic HTTP Support)

The flake includes an mcp-gateway package that acts as a stdio→HTTP proxy, allowing ALL your HTTP MCP servers to work with Claude Desktop automatically!

How it works:

  1. The gateway runs as a stdio MCP server (Claude Desktop compatible)
  2. It proxies requests to your HTTP MCP servers (atlassian, github, context7, etc.)
  3. All HTTP servers appear as tools in Claude Desktop

Generated config:

json
{
  "mcpServers": {
    "gateway": {
      "command": "/nix/store/.../bin/mcp-gateway",
      "env": {
        "MCP_GATEWAY_CONFIG": "~/.config/mcp-gateway/config.json"
      }
    },
    "nixos": {
      "command": "nix",
      "args": ["run", "github:utensils/mcp-nixos", "--"]
    }
  }
}

The gateway config (~/.config/mcp-gateway/config.json) is automatically generated from your config/mcps.nix HTTP servers.

Alternative: Manual Configuration

If you prefer manual configuration or the gateway doesn't work:

  1. Open Claude Desktop → Settings → Connectors
  2. Click "Add custom connector"
  3. Enter server URLs from config/mcps.nix
  4. Configure OAuth authentication if needed

Technical Details:

  • Gateway uses multi-mcp (Python-based)
  • Packaged as a Nix derivation with all dependencies
  • Config auto-generated from enabled HTTP servers in config/mcps.nix

Claude-Flow Commands

Automatically installed workflow commands:

  • commit: Create git commits
  • create_plan: Generate implementation plans
  • create_spec: Create feature specs
  • create_ticket: Generate Jira tickets
  • create_worktree: Create git worktrees
  • implement_plan: Execute implementation plans
  • research_codebase: Document codebases
  • research_confluence: Research Confluence docs
  • validate_plan: Validate implementation plans

Commands automatically configured via:

  • programs.opencode.commands
  • programs.claude-code.commands

Advanced: Direct Package Access

nix
{
  # Access packages from the flake directly
  home.packages = [
    inputs.ai-tools.packages.${system}.opencode
    inputs.ai-tools.packages.${system}.claude-code
    inputs.ai-tools.packages.${system}.spec-kit
  ];
}

Advanced: Quick Shell (without home-manager)

bash
nix develop github:clempat/ai-tools-flake
# Provides: opencode, claude-code, agent-browser (Linux), gh

Structure

ai-tools-flake/
├── flake.nix              # Main flake definition
├── modules/
│   └── ai-tools.nix       # Home-manager module
├── config/                # All configuration
│   ├── agents.nix         # Default agent configurations
│   ├── mcps.nix           # Default MCP server configurations
│   ├── memory.md          # Default memory/rules
│   ├── agents/            # Agent content markdown files
│   └── skills/            # Claude skills (plus pinned external inputs)
│       ├── agent-browser/
│       ├── gitea-tea/
│       ├── lint-with-conform/
│       ├── nixos-advisor/
│       └── nixos-command-not-found/
├── commands/              # Claude-flow workflow commands
│   ├── commit.md
│   ├── create_plan.md
│   ├── create_spec.md
│   ├── create_ticket.md
│   ├── create_worktree.md
│   ├── implement_plan.md
│   ├── research_codebase.md
│   ├── research_confluence.md
│   └── validate_plan.md
├── pkgs/
│   └── spec-kit.nix       # Spec-kit package
└── overlays/
    └── default.nix        # OpenCode wrapper overlay

Available Agents

  • frontend-developer: Vue.js, TypeScript, modern web dev
  • senior-code-reviewer: Code quality, architecture, security
  • ui-engineer: UI/UX, accessibility, design systems
  • nixos: NixOS configuration with MCP integration
  • ticket-driven-developer: Jira ticket-driven dev with spec-kit integration (requires gh CLI)

Available MCP Servers

  • nixos: NixOS packages and options
  • figma-desktop: Figma desktop integration
  • atlassian: Atlassian/Jira integration
  • github: GitHub integration
  • brave-search: Brave search
  • sentry: Sentry error tracking
  • n8n: n8n workflow automation
  • todoist: Todoist task management
  • playwright: Browser automation
  • refs: refs MCP documentation/search

Available Skills

  • homeassistant-ai/skills: Imported upstream skill catalog (as non-flake input)
  • lint-with-conform: Format files based on conform config
  • agent-browser: Browser automation workflows for agent-browser CLI
  • excalidraw-diagram: Generate Excalidraw .excalidraw diagrams from text specs
  • gitea-tea: Gitea workflows with tea CLI
  • nixos-advisor: NixOS configuration advice
  • obsidian-worklog: Obsidian worklog integration

License

MIT

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "clempat-ai-tools-flake": {
      "command": "",
      "args": []
    }
  }
}

Dùng MCP AI Tools Flake với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối AI Tools Flake, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm AI Tools Flake làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của AI Tools Flake.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "clempat-ai-tools-flake": {
      "command": "npx",
      "args": [
        "-y",
        "ai-tools-flake"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của AI Tools Flake, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của AI Tools Flake.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng AI Tools Flake giúp tôi làm việc này không?
AI Tools Flake
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng AI Tools Flake.

Câu hỏi thường gặp

Máy chủ MCP AI Tools Flake dùng để làm gì?

AI Tools Flake là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP AI Tools Flake với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng AI Tools Flake với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP AI Tools Flake với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối AI Tools Flake, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP AI Tools Flake với TypingMind?

AI Tools Flake hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP AI Tools Flake cung cấp những công cụ nào trong TypingMind?

AI Tools Flake cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP AI Tools Flake không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu AI Tools Flake yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇