.PHONY: help init clean run dev test install check
# Default target
help:
@echo "NIX MCP Server (Simplified) - Available commands:"
@echo " make init - Initialize project (install deps)"
@echo " make check - Check if server components are working"
@echo " make clean - Clean generated files"
@echo " make run - Run the MCP server"
@echo " make dev - Run in development mode"
@echo " make test - Run tests"
@echo " make install - Install to Claude Desktop"
# Initialize the project
init:
@echo "๐ฆ Installing dependencies..."
@export PATH="$$HOME/.local/bin:$$PATH" && uv sync
@if [ ! -f .env ]; then cp .env.example .env; fi
@echo "โ Project initialized successfully!"
# Clean generated files
clean:
@echo "๐งน Cleaning generated files..."
@rm -rf __pycache__ src/__pycache__ src/nix_mcp/__pycache__
@rm -rf .pytest_cache
@echo "โ Clean complete"
# Run the server
run:
@echo "๐ Starting NIX MCP Server..."
@echo " The server will run as an stdio server waiting for MCP connections"
@echo " Press Ctrl+C to stop\n"
@export PATH="$$HOME/.local/bin:$$PATH" && uv run python run_server.py
# Run in development mode with debug logging
dev:
@echo "๐ง Starting NIX MCP Server in development mode..."
@export PATH="$$HOME/.local/bin:$$PATH" && LOG_LEVEL=DEBUG uv run python main.py
# Run tests
test:
@echo "๐งช Running tests..."
@export PATH="$$HOME/.local/bin:$$PATH" && uv run python test_simple.py
# Install to Claude Desktop
install:
@echo "๐ฆ Installing to Claude Desktop..."
@echo "Add the following to your Claude Desktop config:"
@echo '{"nix-mcp": {"command": "uv", "args": ["run", "python", "$(PWD)/main.py"]}}'
# Check server health
check:
@echo "๐ Checking server components..."
@export PATH="$$HOME/.local/bin:$$PATH" && uv run python test_server.py
# Fetch ABIs using cleos (optional - for caching)
fetch-abis:
@echo "๐ก Fetching contract ABIs..."
@mkdir -p .abi_cache
@export PATH="$$HOME/.local/bin:$$PATH" && uv run python -m nix_mcp.abi_fetcher nix.q
@export PATH="$$HOME/.local/bin:$$PATH" && uv run python -m nix_mcp.abi_fetcher nix
@echo "โ ABIs cached"
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/haiqiubullish/nix-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server