How to Set Up the MCP Server for Claude Desktop Integration with CloddsBot
CloddsBot exposes its prediction-market automation toolkit as an MCP (Model Context Protocol) server that connects to Claude Desktop via stdio, enabling the AI to invoke 119 specialized skills through JSON-RPC function calling.
CloddsBot (alsk1992/CloddsBot) is an open-source Node.js framework designed for prediction market automation. By configuring the MCP server for Claude Desktop integration, you allow Claude Code or Claude Desktop to execute real-time trades, run arbitrage scanners, and query market odds as native tool calls.
Prerequisites and Installation
Before integrating with Claude Desktop, you must install the Clodds CLI globally and configure the MCP bridge.
Install the Clodds CLI
The integration requires the clodds command-line tool available in your system PATH. Install it via npm:
npm i -g clodds
This installs the clodds binary globally, including the mcp subcommand that manages the Model Context Protocol server.
Run the MCP Installer
CloddsBot includes an automated installer that writes the necessary Claude Desktop configuration. Execute the installer:
clodds mcp install
This command invokes src/mcp/installer.ts, which detects your operating system and writes the appropriate configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
The installer automatically backs up any existing Claude configuration before injecting the clodds entry under the mcpServers section.
How the MCP Server Works
Understanding the architecture helps troubleshoot connection issues and customize behavior.
The stdio JSON-RPC Interface
The core MCP logic resides in src/mcp/index.ts. When you execute clodds mcp, this module initializes a stdio-based JSON-RPC server that:
- Registers all 119 Clodds skills as MCP tools
- Listens for tool invocation requests from Claude Desktop
- Executes the requested skill and returns structured results
The server communicates over standard input/output (stdio), making it compatible with Claude Desktop's native MCP client without requiring network ports or HTTP endpoints.
Claude Desktop Configuration
The installer (src/mcp/installer.ts) creates a configuration entry that tells Claude Desktop how to spawn the MCP server. The generated configuration points to the Clodds entry point using the command pattern node <clodds-cli-entry> mcp. When Claude Desktop restarts, it launches this command as a subprocess and maintains a persistent stdio connection for tool calling.
Security Configuration
The MCP server respects environment variables defined in docs/SECURITY_AUDIT.md to implement least-privilege access:
- CLODDS_MCP_ALLOWED_TOOLS: Comma-separated whitelist of permitted skill names
- CLODDS_MCP_BLOCKED_TOOLS: Comma-separated blacklist of restricted skills
- CLODDS_MCP_RATE_LIMIT: Maximum number of tool calls per minute allowed
Set these variables before starting the server to restrict which capabilities Claude can invoke:
export CLODDS_MCP_ALLOWED_TOOLS="market_search,place_trade"
export CLODDS_MCP_RATE_LIMIT=60
clodds mcp
Starting the Server and Verifying Integration
After installation, you must restart Claude Desktop or Claude Code to reload the mcpServers configuration. Once restarted, Claude automatically launches the MCP server subprocess when needed.
To verify the connection, confirm that Claude recognizes the Clodds tools. In a Claude Code session or Desktop conversation, tools appear with the naming convention mcp__clodds__<skill_name>. For example:
{
"name": "mcp__clodds__market_search",
"parameters": { "query": "BTC price odds" }
}
The stdio server remains active while Claude Desktop runs, processing tool calls synchronously and returning results to the LLM context window.
Summary
- CloddsBot provides a native MCP server via
src/mcp/index.tsthat exposes 119 skills as JSON-RPC tools over stdio - Run
clodds mcp installto executesrc/mcp/installer.ts, which writes Claude Desktop configuration files for macOS, Windows, or Linux and backs up existing settings - The server uses stdio transport, requiring no network configuration, firewall rules, or open ports
- Environment variables (
CLODDS_MCP_ALLOWED_TOOLS,CLODDS_MCP_BLOCKED_TOOLS,CLODDS_MCP_RATE_LIMIT) control access restrictions as documented indocs/SECURITY_AUDIT.md - Restart Claude Desktop after running the installer to establish the stdio connection and enable the 119 available tool calls
Frequently Asked Questions
Where does CloddsBot store the Claude Desktop configuration?
The installer writes to platform-specific paths: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows, and ~/.config/claude/claude_desktop_config.json on Linux. The src/mcp/installer.ts module handles path detection and automatically backs up existing configurations before modification.
How do I restrict which Clodds skills Claude can access?
Set the CLODDS_MCP_ALLOWED_TOOLS environment variable to a comma-separated list of permitted skill names before starting the server. Alternatively, use CLODDS_MCP_BLOCKED_TOOLS to explicitly prohibit specific skills. Both options are documented in docs/SECURITY_AUDIT.md and enforced by the server runtime in src/mcp/index.ts.
Why does Claude Desktop not recognize the Clodds tools after installation?
Claude Desktop only reads the mcpServers configuration at startup. You must fully quit and restart Claude Desktop or Claude Code after running clodds mcp install. Additionally, verify that node is available in the system PATH used by Claude, as the configuration relies on spawning node <clodds-entry> mcp to initiate the stdio connection.
Can I run the MCP server independently without the installer?
Yes. While clodds mcp install automates configuration, you can manually add the MCP server entry to your Claude Desktop configuration file or run clodds mcp directly in a terminal. The server will start and listen on stdio, though Claude Desktop must still be configured to spawn this command to establish the bidirectional communication channel.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →