Skip to main content
Glama
fix_json_config.py1.33 kB
"""Fix the Claude Desktop config file with proper JSON formatting""" import json import os config_path = os.path.join(os.environ['APPDATA'], 'Claude', 'claude_desktop_config.json') config_dir = os.path.dirname(config_path) # Ensure directory exists os.makedirs(config_dir, exist_ok=True) # Create proper config config = { "mcpServers": { "inventory-mcp": { "command": "C:\\Users\\aditi\\Anaconda3\\python.exe", "args": [ "C:\\Users\\aditi\\Downloads\\inventory-mcp-server-master\\inventory-mcp-server.py" ], "env": { "SUPABASE_DB_PASSWORD": "root" } } } } # Write with proper JSON formatting (no BOM, proper encoding) try: with open(config_path, 'w', encoding='utf-8', newline='\n') as f: json.dump(config, f, indent=2, ensure_ascii=False) print(f"✓ Configuration file written successfully!") print(f" Location: {config_path}") print(f"\nConfiguration:") print(json.dumps(config, indent=2)) # Verify it can be read back with open(config_path, 'r', encoding='utf-8') as f: verify = json.load(f) print(f"\n✓ Verified: File can be read correctly") except Exception as e: print(f"❌ Error: {e}") import traceback traceback.print_exc()

Latest Blog Posts

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/Adiitiir/inventory-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server