Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

start_contemplation

Initiate continuous background cognitive processing to maintain thoughts, recognize patterns, and develop insights between conversations.

Instructions

Start the background contemplation loop

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation in ContemplationManager.start(): spawns the Python contemplation subprocess, sets up stdout listener to capture insights, and handles errors.
    async start(): Promise<string> { if (this.subprocess) { return 'Contemplation loop already running'; } try { this.subprocess = spawn('python3', [this.contemplationPath], { cwd: path.dirname(this.contemplationPath), stdio: ['pipe', 'pipe', 'pipe'], detached: false }); this.subprocess.stdout?.on('data', (data) => { try { const lines = data.toString().split('\n').filter((line: string) => line.trim()); for (const line of lines) { const response = JSON.parse(line); if (response.has_insight) { this.insights.push({ id: response.thought_id, thought_type: response.thought_type, content: response.insight, significance: response.significance || 5, timestamp: new Date().toISOString(), used: false }); } } } catch (e) { // Not JSON, ignore } }); this.subprocess.on('error', (err) => { console.error('Contemplation process error:', err); }); // Give it a moment to start await new Promise(resolve => setTimeout(resolve, 1000)); return 'Contemplation loop started successfully'; } catch (error) { throw new Error(`Failed to start contemplation: ${error}`); } }
  • MCP CallToolRequestSchema handler case: delegates to ContemplationManager.start() and returns the result as text content.
    case 'start_contemplation': { const result = await contemplation.start(); return { content: [{ type: 'text', text: result }], }; }
  • src/index.ts:376-383 (registration)
    Registers the tool in ListToolsRequestSchema response: defines name, description, and input schema.
    { name: 'start_contemplation', description: 'Start the background contemplation loop', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema definition: empty object since no parameters are required.
    inputSchema: { type: 'object', properties: {}, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MikeyBeez/mcp-contemplation'

If you have feedback or need assistance with the MCP directory API, please join our Discord server