ClawCord is an open-source, self-hosted AI agent that lives in your Discord DMs. It doesn't just chat — it does things. Run commands on your PC, search the web, track stocks, get news reports, and control a remote machine — all from a Discord message.
It connects to any OpenAI-compatible API (OpenAI, Ollama, LM Studio, Groq, Mistral, etc.), so you pick the model you want.
- Python 3.10+
- A Discord bot token (create one here)
- An AI API key (OpenAI, Ollama, Groq, etc.)
git clone https://github.com/Ciel2006/ClawCord.git
cd ClawCord
pip install -r requirements.txt
python launcher.pyOn first run, the web dashboard opens automatically. Configure your tokens and settings, then restart the launcher.
All API keys are stored in .env (created automatically from .env.example):
DISCORD_TOKEN=your_token
OWNER_ID=your_discord_id
AI_BASE_URL=https://api.openai.com/v1
AI_API_KEY=your_key
AI_MODEL=gpt-4o-mini
NEWS_API_KEY=your_newsapi_key
ALPHAVANTAGE_API_KEY=your_key
SYNCLINK_SECRET=your_secretNon-secret settings (personality, news topics, blocked commands, etc.) are in settings.json and editable from the dashboard.
SyncLink lets you run ClawCord on a server while controlling your main PC remotely.
On the bot server:
- Enable SyncLink in the dashboard
- Set a secret key
- Note the address shown (e.g.
10.0.0.120:8765)
On your main PC:
cd synclink
pip install -r requirements.txt
python run.pyPaste the server address and secret into the SyncLink app and hit Connect.
ClawCord/
├── launcher.py # Entry point — starts dashboard + bot
├── bot.py # Discord bot core
├── config.py # Settings loader (.env + settings.json)
├── database.py # SQLite for news deduplication
├── .env # API keys (auto-created, gitignored)
├── settings.json # Non-secret configuration
├── cogs/
│ ├── chat.py # AI agent with tool-use loop
│ ├── pc_control.py # !run, !read, !write commands
│ ├── pc_tools.py # Tool definitions + implementations
│ ├── web_tools.py # Web search & fetch (Ollama/Brave)
│ ├── web_search.py # !search command
│ └── news.py # Automated news reporter
├── synclink/
│ ├── server.py # WebSocket server (runs on bot machine)
│ ├── client.py # WebSocket client (runs on user PC)
│ ├── tools.py # Self-contained PC tool execution
│ ├── SyncLink.py # Pywebview desktop app entry point
│ ├── run.py # Quick launcher
│ └── ui/ # SyncLink desktop UI
├── web interface/
│ ├── app.py # Flask dashboard
│ ├── templates/ # Dashboard HTML
│ └── static/ # CSS, JS, logo
└── svg/ # Feature icons for README
ClawCord gives an AI agent access to your PC. That's powerful but comes with responsibility. Here's how security is handled:
- Blocked commands — A configurable list of dangerous commands (
rm -rf,format,del /s,shutdown, etc.) that are refused even if the AI requests them - Command timeout — All shell commands have a configurable timeout (default 30s) to prevent runaway processes
- Owner-only — The bot only responds to the configured owner ID in DMs
- SyncLink HMAC-SHA256 — All messages between bot server and SyncLink client are signed and verified with a shared secret. Invalid signatures are silently dropped
- No plaintext secrets in config — API keys live in
.env, which is gitignored
If you discover a security vulnerability, please do not open a public issue. Instead:
- Email the maintainer directly or use GitHub Security Advisories
- Describe the vulnerability, steps to reproduce, and potential impact
- Allow reasonable time for a fix before public disclosure
We take security seriously and will respond as quickly as possible.
- Use a strong, unique secret for SyncLink
- Don't expose the dashboard (port 5000) or SyncLink (port 8765) to the public internet without a VPN or firewall
- Review the blocked commands list and add anything sensitive to your setup
- Run the bot with a non-admin user account when possible
- Regularly rotate your API keys
ClawCord is open source and contributions are welcome.
- Fork the repository
- Create a branch for your feature or fix:
git checkout -b feature/my-feature
- Make your changes — keep commits focused and descriptive
- Test your changes locally
- Open a Pull Request against
mainwith a clear description of what you changed and why
- New AI tools (integrations, APIs, automations)
- UI/UX improvements to the dashboard or SyncLink
- Bug fixes and error handling improvements
- Documentation and translations
- Security hardening
- Support for more AI providers
- Keep code clean and readable
- Follow the existing code style (Python, no type stubs, async where possible)
- Don't commit API keys or secrets
- Test on Windows (primary target) and Linux if possible
- Open an issue first for large changes so we can discuss the approach
This project is open source. See the LICENSE file for details.
Built with claws by Ciel