examples/

directory
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: MIT

README

MCPBee Examples

This directory contains examples of using MCPBee with various configurations and use cases.

Quick Start

  1. Basic MCP Server - Start MCPBee as an MCP server for Claude Code
  2. Knowledge Store Demo - Using the pattern learning capabilities
  3. 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"]
}
3. Testing MCP Tools

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

Available MCP Tools

  • 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
MCP Tools Not Showing in Claude
  1. Restart Claude Code
  2. Check .mcp.json exists in project root
  3. Verify binary path is absolute
  4. 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL