Expand description
§UltraFast MCP Sequential Thinking
High-performance, Rust-based Model Context Protocol (MCP) server and client implementation for sequential thinking, built on the UltraFast MCP framework.
This library provides a complete implementation of the sequential thinking concept, offering significant performance advantages over the official TypeScript version while maintaining full compatibility with the MCP 2025-06-18 specification.
§Features
- Dynamic Problem Breakdown: Break complex problems into manageable steps
- Reflective Thinking: Revise and refine thoughts as understanding deepens
- Branching Logic: Explore alternative paths of reasoning
- Adaptive Planning: Adjust the total number of thoughts dynamically
- Solution Verification: Generate and verify solution hypotheses
- Context Preservation: Maintain thinking context across multiple steps
- High Performance: 10-100x faster than TypeScript implementation
- Type Safety: Compile-time guarantees for protocol compliance
§Quick Start
This crate provides a high-performance, type-safe Rust implementation of the Model Context Protocol (MCP) for sequential thinking. It enables you to break down complex problems into steps, track progress, and manage sessions programmatically.
§Example: Start a Session, Add a Thought, and Complete
use ultrafast_mcp_sequential_thinking::{SequentialThinkingClient, ThoughtData};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Create a client connected to the server
let client = SequentialThinkingClient::new("http://localhost:8080").await?;
// Start a new thinking session
let session = client.start_session("Solve a complex problem".to_string()).await?;
// Add a thought to the session
client.add_thought(&session.session_id, ThoughtData {
thought: "First, I need to understand the problem scope".to_string(),
thought_number: 1,
total_thoughts: 5,
next_thought_needed: true,
..Default::default()
}).await?;
// Mark the session as complete
client.complete_session(&session.session_id).await?;
Ok(())
}
See the crate documentation and module docs for more details and advanced usage.
Re-exports§
pub use session::SessionManager;
pub use session::SessionMetadata;
pub use session::ThinkingSession;
pub use thinking::ThinkingEngine;
pub use thinking::ThoughtData;
pub use thinking::ThoughtProcessor;
pub use crate::thinking::client::SequentialThinkingClient;
pub use crate::thinking::server::SequentialThinkingServer;
pub use crate::thinking::error::SequentialThinkingError;
pub use crate::thinking::error::SequentialThinkingResult;
pub use crate::config::ClientConfig;
pub use crate::config::ServerConfig;
pub use crate::config::ThinkingConfig;
pub use crate::analytics::AnalyticsEngine;
pub use crate::analytics::SessionAnalytics;
pub use crate::thinking::ThinkingStats;
pub use crate::export::ExportEngine;
pub use crate::export::ExportFormat;
pub use crate::export::ExportOptions;
Modules§
- analytics
- Analytics Module
- config
- Configuration Module
- export
- Export Module
- session
- Session Management Module
- thinking
- Thinking Module
Functions§
- default_
client_ config - Default configuration for the sequential thinking client
- default_
server_ config - Default configuration for the sequential thinking server
Type Aliases§
- Result
- Result type for sequential thinking operations