Skip to main content
Glama

NIX MCP Server

test_basic.py1.5 kB
#!/usr/bin/env python3 """Basic test to verify the NIX MCP server structure""" import asyncio import sys from pathlib import Path # Add src and protobuf directories to path sys.path.insert(0, str(Path(__file__).parent / "src")) sys.path.insert(0, str(Path(__file__).parent / "src" / "nix_mcp" / "protobuf")) async def test_basic_import(): """Test basic imports and structure""" print("Testing basic imports...") try: # Test server imports from nix_mcp.server_fastmcp import mcp print("✓ Successfully imported FastMCP server") from nix_mcp.client import NixClient print("✓ Successfully imported NixClient") # Test protobuf imports with new path structure from native_indexer import native_indexer_pb2 print("✓ Successfully imported protobuf files") # Test creating client instance client = NixClient() print("✓ Successfully created client instance") print("\nAll basic tests passed! ✅") print("\nThe NIX MCP server structure is properly set up.") print("You can now run the server with: ./run.sh or make run") except ImportError as e: print(f"✗ Import error: {e}") return False except Exception as e: print(f"✗ Error: {e}") return False return True if __name__ == "__main__": success = asyncio.run(test_basic_import()) sys.exit(0 if success else 1)

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