MCPBee Examples
This directory contains examples of using MCPBee with various configurations and use cases.
Quick Start
- Basic MCP Server - Start MCPBee as an MCP server for Claude Code
- Knowledge Store Demo - Using the pattern learning capabilities
- Custom Tool Creation - Adding your own MCP tools
Running Examples
1. Basic MCP Server
# Start Redis
docker run -d -p 6379:6379 redis:alpine
# Build and run MCPBee
go build -o bin/mcpbee ./cmd/mcpbee
./bin/mcpbee -config config.yaml
# The server is now available for Claude Code
2. Using with Claude Code
Add to your Claude Code configuration (~/.claude/settings.json):
{
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": ["mcpbee"]
}
Then create .mcp.json in your project root:
{
"name": "mcpbee",
"command": "/path/to/mcpbee/bin/mcpbee",
"args": ["-config", "/path/to/mcpbee/config.yaml"]
}
Once connected, you can test the tools in Claude Code:
# Query the knowledge base
What patterns have you learned?
# Store new knowledge
Remember that go mod tidy fixes missing dependencies
# Read a file
Read the contents of main.go
# Execute a command
Run go test ./...
Configuration Examples
See config.yaml in the root directory for a complete configuration example.
Minimal Configuration
redis:
addr: localhost:6379
mcp:
name: mcpbee
version: 2.0.0
logging:
level: info
Development Configuration
redis:
addr: localhost:6379
mcp:
name: mcpbee-dev
version: 2.0.0
logging:
level: debug
format: json
file_read - Read file contents
file_write - Write to files
shell_run - Execute shell commands
memory_query - Search the knowledge base
memory_learn - Store new patterns
memory_confirm_suggestion - Validate learned patterns
Troubleshooting
Redis Connection Failed
# Check Redis is running
redis-cli ping
# If not, start Redis
docker run -d -p 6379:6379 redis:alpine
- Restart Claude Code
- Check
.mcp.json exists in project root
- Verify binary path is absolute
- Check logs:
tail -f ~/.claude/logs/*.log
Build Errors
# Ensure Go 1.21+
go version
# Clean and rebuild
go clean -cache
go build -o bin/mcpbee ./cmd/mcpbee