MA

meta-automata-mcp/nix-mcp-servers

开发工具

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

0 stars 5 forks 质量 47 趋势 0MIT

A nix flake for configuring Model Context Protocol (MCP) servers across supported AI assistant clients

概览

A Nix flake for declaratively configuring MCP (Model Context Protocol) servers for clients like Claude and Cursor. - Declarative configuration of MCP servers - Support for multiple clients (Claude, Cursor) - Support for multiple server types (filesystem, github) - Cross-platform support (NixOS, Darwin) - Uses Home Manager for integration with your existing Nix configuration This flake provides Home Manager modules that generate MCP server configuration files for different clients. When you enable a server for a client, the necessary configuration is generated and placed in the appropriate location for that client. - : Provides filesystem access to AI models - : Provides GitHub access to AI models - : Anthropic's Claude AI assistant - : The Cursor code editor Add this flake to your home-manager configuration: You can customize the configuration paths for each client: 1. Clone the repository 2. Make your changes 3. Test with nix flake check 4. Submit a PR

README

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

Nix MCP Servers

A Nix flake for declaratively configuring MCP (Model Context Protocol) servers for clients like Claude and Cursor.

Features

  • Declarative configuration of MCP servers
  • Support for multiple clients (Claude, Cursor)
  • Support for multiple server types (filesystem, github)
  • Cross-platform support (NixOS, Darwin)
  • Uses Home Manager for integration with your existing Nix configuration

How it Works

This flake provides Home Manager modules that generate MCP server configuration files for different clients. When you enable a server for a client, the necessary configuration is generated and placed in the appropriate location for that client.

Supported Servers

  • Filesystem: Provides filesystem access to AI models
  • GitHub: Provides GitHub access to AI models

Supported Clients

  • Claude: Anthropic’s Claude AI assistant
  • Cursor: The Cursor code editor

Usage

Basic Usage

Add this flake to your home-manager configuration:

{
  inputs = {
    # ... your other inputs
    nix-mcp-servers.url = "github:yourusername/nix-mcp-servers";
  };

  outputs = { nixpkgs, home-manager, nix-mcp-servers, ... }: {
    homeConfigurations."yourusername" = home-manager.lib.homeManagerConfiguration {
      # ... your other configuration
      modules = [
        nix-mcp-servers.homeManagerModules.default
        
        # Your configuration
        {
          nix-mcp-servers = {
            # Enable configuration generation
            clients.generateConfigs = true;
            
            # Configure Cursor client
            clients.cursor = {
              enable = true;
              
              # Enable filesystem server for Cursor
              filesystem = {
                enable = true;
                paths = [
                  "/Users/yourusername/projects"
                  "/Users/yourusername/Documents"
                ];
              };
              
              # Enable GitHub server for Cursor
              github = {
                enable = true;
                token = "your-github-token";
              };
            };
            
            # Configure Claude client
            clients.claude = {
              enable = true;
              
              # Only enable filesystem for Claude
              filesystem = {
                enable = true;
                paths = [
                  "/Users/yourusername/projects"
                ];
              };
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →