ThinkChain is an advanced Python project that showcases Claude's streaming capabilities with interleaved thinking, fine-grained tool streaming, and dynamic tool discovery. CCDK i124q provides seamless integration with ThinkChain, allowing you to leverage these powerful features within your Claude Code environment.
- Step-by-step problem solving with visible thought process
- Real-time streaming of Claude's reasoning
- Early interception of tool_use blocks
- Live progress updates during tool execution
- Multiple tool calls per turn
- Pydantic-validated inputs for robustness
- Automatic discovery of local Python tools
- MCP server integration
- Custom tool creation on-the-fly
CCDK i124q introduces a unique Bridge Mode that allows you to use many ThinkChain features without an Anthropic API key:
- Local tool execution
- MCP server management
- Tool discovery and listing
- Simulated thinking streams
# Run the ultimate installer
bash install-ultimate.sh
# Navigate to ThinkChain configuration
# Type: tc or thinkchain
# Select option 1 to install# Clone ThinkChain
git clone https://github.com/martinbowling/ThinkChain.git /c/Users/wtyle/thinkchain
# Run integration script
bash integrations/thinkchain-integration.shThinkChain requires an Anthropic API key for full functionality. This is different from your Claude.ai subscription.
- Get an API key from Anthropic Console
- Configure through installer or manually:
echo "ANTHROPIC_API_KEY=your_api_key_here" > /c/Users/wtyle/thinkchain/.envBridge Mode allows using ThinkChain tools without an API key:
# From ultimate installer
tc → 3 (Set Up Bridge Mode)
# Or manually
python3 integrations/thinkchain-bridge.py initOnce integrated, you can use these commands in Claude Code:
Trigger ThinkChain's advanced thinking mode:
/think Create a web scraper that monitors price changes
Manage ThinkChain tools:
/tools list - List all available tools
/tools refresh - Refresh tool discovery
/tools enable [name] - Enable a specific tool
/tools disable [name] - Disable a specific tool
- FileCreator - Create new files
- FileEditor - Edit existing files
- FileContentReader - Read file contents
- DiffEditor - Apply diffs to files
- WebScraper - Scrape web content
- DuckDuckGo - Search the web
- Weather - Get weather information
- UVPackageManager - Manage Python packages
- Linting - Check code quality
- ToolCreator - Create new tools dynamically
- SQLite - Database operations
- Filesystem - Advanced file operations
- GitHub - Repository management
- Memory - Knowledge graph storage
- Puppeteer - Browser automation
- Brave Search - Web search
- Create a
CLAUDE.PROJECTmarker file in your project - Run the installer and select your project
- Choose ThinkChain integration
This creates .claude/thinkchain/config.json:
{
"enabled": true,
"version": "1.0.0",
"thinkchain_path": "/c/Users/wtyle/thinkchain",
"features": {
"interleaved_thinking": true,
"tool_streaming": true,
"mcp_integration": true,
"bridge_mode": true
},
"settings": {
"model": "claude-sonnet-4-20250514",
"thinking_budget": 1024,
"max_tokens": 1024
}
}Configure Claude's thinking parameters:
CONFIG = {
"model": "claude-sonnet-4-20250514", # or claude-opus-4
"thinking_budget": 1024, # 1024-16000 tokens
"max_tokens": 1024 # Output limit
}Edit mcp_config_enhanced.json:
{
"mcpServers": {
"your_server": {
"command": "command_to_run",
"args": ["arg1", "arg2"],
"env": {
"API_KEY": "your_key"
},
"enabled": true
}
}
}The ThinkChain Bridge provides a Python API for Claude Code integration:
from thinkchain_bridge import ThinkChainBridge
bridge = ThinkChainBridge()
bridge.initialize()
# List tools without API key
tools = bridge.list_available_tools()
# Execute local tool
result = bridge.execute_local_tool("FileCreator",
path="/path/to/file.txt",
content="Hello World"
)
# Simulate thinking (no API needed)
thinking = bridge.simulate_thinking_stream("Your prompt here")git clone https://github.com/martinbowling/ThinkChain.git /c/Users/wtyle/thinkchaincd /c/Users/wtyle/thinkchain
uv pip install -r requirements.txt
# or
pip3 install -r requirements.txt- Ensure you have an Anthropic API key (not Claude.ai account)
- Check
.envfile exists in ThinkChain directory - Use Bridge Mode for operations without API
- Ensure Node.js is installed for npm-based servers
- Check server configuration in
mcp_config.json - Verify required environment variables are set
- Claude Max/Claude.ai: Web interface subscription, no API access
- Anthropic API: Separate service requiring API key and payment
- Bridge Mode: CCDK feature allowing tool use without API
- Full thinking streams with actual Claude responses
- Complex multi-step reasoning
- Production use of ThinkChain
- Local tool execution
- File operations
- MCP server management
- Development and testing
# Using Bridge Mode
from thinkchain_bridge import ThinkChainBridge
bridge = ThinkChainBridge()
bridge.initialize()
# Create a file
bridge.execute_local_tool("FileCreator",
path="test.py",
content="print('Hello from ThinkChain!')"
)# Scrape a website
result = bridge.execute_local_tool("WebScraper",
url="https://example.com",
selector="h1"
)# Create a new tool dynamically
spec = {
"name": "MyCustomTool",
"code": '''
from tools.base import Tool
from pydantic import BaseModel, Field
class MyCustomToolInput(BaseModel):
message: str = Field(description="Message to process")
class MyCustomTool(Tool):
"""Custom tool for demonstration"""
input_model = MyCustomToolInput
def execute(self, message: str) -> str:
return f"Processed: {message}"
'''
}
bridge.create_tool_from_spec(spec)- Direct Claude Code integration without API key requirement
- Visual thinking stream renderer
- Tool marketplace integration
- Collaborative tool sharing
- Performance optimizations for Bridge Mode
For more information: