Skip to content

Conversation

@erkinalp
Copy link

No description provided.

devin-ai-integration bot and others added 7 commits July 27, 2025 06:18
- Create mcp_treequest package with complete MCP server
- Implement session management for stateful tree search operations
- Add tools for init_tree, step_tree, get_tree_state, rank_nodes, list_sessions, delete_session
- Support all TreeQuest algorithms: StandardMCTS, ABMCTSA, ABMCTSM
- Add MCP dependencies and CLI entry point to pyproject.toml
- Support both stdio and SSE transport modes

Implements GitHub issue SakanaAI#7: SakanaAI#7

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Update CLI script entry point to use server:main directly
- Add comprehensive README.md with usage examples and tool documentation
- Document both stdio and SSE transport modes

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Implement get_tree_visualization tool with Graphviz integration
- Support multiple output formats (png, pdf, svg, dot)
- Add configurable parameters for scores, labels, and titles
- Include comprehensive error handling for missing dependencies
- Complete utility tools implementation for MCP server

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add _validate_session_exists() for session ID validation
- Add _validate_algorithm_params() for parameter range validation
- Add _validate_generate_functions() with security checks
- Enhance init_tree_tool with parameter validation and specific error types
- Enhance step_tree_tool with session validation, syntax error handling, and security
- Enhance rank_nodes_tool with k parameter validation and tree state checks
- Provide clear, actionable error messages for all validation failures
- Add limits and safety checks for user inputs

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add get_tree_visualization tool documentation with all parameters
- Include advanced generate function examples for math, text, and game scenarios
- Add comprehensive error handling and troubleshooting sections
- Include integration guides for Claude Desktop and MCP CLI tools
- Add algorithm comparison table and performance optimization tips
- Provide detailed workflow examples with realistic use cases

Co-Authored-By: Erkin Alp Güney <[email protected]>
- Fix Bug 1: Pass state instead of tree to top_k function
- Fix Bug 2: Filter algorithm parameters by algorithm type to prevent invalid params
- Fix Flag 1: Add asyncio.Lock for thread-safe session dictionary access
- Fix Flag 2: Replace simple substring matching with AST-based security validation
- Fix Flag 3: Use consistent _validate_session_exists() across all tools

Co-Authored-By: Erkin Alp Güney <[email protected]>
Complete MCP server implementation with session management
Support for all TreeQuest algorithms with configurable parameters
Tools for tree initialization, stepping, state retrieval, node ranking, and visualization
Both stdio and SSE transport modes
Comprehensive error handling and input validation
CLI entry point and proper package configuration
Extensive documentation with usage examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant