Sponsored by Deepsite.site

Architect

Created By
rpurinton6 months ago
A Discord.js app integrated with Model Context Protocol (MCP) server functionality to enable AI-driven Discord server administration and automation.
Content

Architect

Architect is a modular, AI-empowered Discord.js bot designed for automated Discord server administration and management using the Model Context Protocol (MCP).

Features

  • Discord bot with dynamic slash command support and event handling.
  • Integrated MCP server exposing Discord admin functions as MCP tools.
  • AI-driven natural language automation leveraging OpenAI.
  • Localization with multi-language support.
  • Robust error handling and graceful shutdown.
  • Uses Redis caching and MySQL persistence.
  • Secure MCP HTTP interface with bearer token authentication.
  • Production-ready with systemd service template.

Quick Start

  1. Clone the repo:
    git clone https://github.com/rpurinton/architect.git
    cd architect
    
  2. Install dependencies:
    npm install
    
  3. Copy and configure environment variables:
    cp .env.example .env
    # Edit .env to set tokens, DB, Redis credentials etc.
    
  4. Run:
    node architect.mjs
    

Configuration

Edit .env file to include your Discord bot token, client ID, database credentials, MCP token, and logging preferences.

VariableDescriptionExample
DISCORD_TOKENDiscord bot tokenabc123xyz
DISCORD_CLIENT_IDDiscord application client ID123456789
DB_HOSTMySQL hostlocalhost
DB_USERMySQL usernameroot
DB_PASSMySQL passwordsecret
DB_NAMEMySQL database namearchitect_db
REDIS_HOSTRedis cluster host127.0.0.1
REDIS_PORTRedis port6379
MCP_TOKENBearer token for MCP HTTP authsecret-token
MCP_PORTMCP HTTP server port9232
LOG_LEVELLogging level (info, debug)info

Project Structure

/opt/architect
    ├── architect.mjs          # Main app entry point
      ├── src/
      │   ├── commands/          # JSON command definitions and handlers
      │   ├── events/            # Event handlers for Discord.js
      │   ├── custom/            # MCP server, client, and tools
      │   ├── locales/           # Localization JSON
      │   ├── log.mjs            # Logger setup
      ├── exceptions.mjs     # Global exception handlers
      ├── shutdown.mjs       # Graceful shutdown handling
      └── discord.mjs        # Discord client creation
    
.env                   # Environment variables
architect.service      # systemd service file
└── docs/              # Developer documentation

Development

  • See docs/ for detailed developer documentation.
  • Use npm test to run tests.
  • Write new commands in src/commands/.
  • Add event handlers in src/events/.
  • Add MCP tools in src/custom/tools/.

Deployment

  • Use the included systemd service for running as a service.
  • Ensure .env is correctly configured with all credentials.

Troubleshooting

  • Check logs for details, increase LOG_LEVEL for debug.
  • Validate Discord bot permissions.
  • Check connectivity to database and Redis.

Support & Resources

License

MIT License

Contact

Russell Purinton at russell.purinton@gmail.com


Please see docs/ for comprehensive documentation and contribution guidelines.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Amap Maps高德地图官方 MCP Server
Tavily Mcp
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code