Projects / grokbot
grokbot
Discord tools in one Go binary. CLI, or a stdio MCP server, same bot token.
Why
Listing guilds, reading a channel, and sending a message are the same three calls whether a person types them or an MCP client does. A second server for the agent would just hide the token in a different process.
Diagrams
A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.
One binary. As a CLI it prints guilds and channels. As a stdio MCP server it exposes the same calls. Both use the Discord HTTP API and the bot token from the environment.
flowchart TD
token["Bot token in the environment"]
bin["One Go binary"]
cli["CLI"]
mcp["stdio MCP"]
http["Discord HTTP API"]
token --> bin
bin --> cli --> http
bin --> mcp --> http
class token,bin,cli,mcp,http chosen
Listing guilds, reading a channel, and sending a message are the same three calls for a person or an MCP client. A second process would only hide the token somewhere else. There is no database, and no allowlist beyond the token’s Discord permissions.
flowchart TD
q{Who calls Discord}
q -->|"CLI and MCP in one binary"| one["grokbot"]
q -->|"an extra process for the agent"| two["A separate MCP server"]
store{A copy of the guild}
store -->|"Discord already has it"| none["No database"]
store -->|"store it again"| db["A local store"]
class one,none chosen
class two,db rejected
Why this shape
One binary. As a CLI it prints guilds and channels. As a stdio MCP server it exposes those same calls to a client that speaks MCP. The Discord HTTP API is the only remote side. There is no database. The token is the bot’s token, passed in the environment, because that is what Discord already issued.
Where it breaks
Stdio means one client. A second agent needs a second process. And the bot can send whatever the token’s permissions allow. The tool does not add a second allowlist on top of Discord’s.