The backcasting engine can be integrated into various platforms. This guide covers the available integration options.
Use the backcasting engine as a tool for AI assistants like Claude Code, ChatGPT, and custom AI agents.
Expose backcasting functionality via HTTP endpoints for web applications.
Import directly into Python scripts and applications.
Sync with Asana, Notion, Jira, Monday.com, etc.
Auto-schedule steps based on dependencies and timelines.
Model Context Protocol (MCP) is a standard way for AI assistants to use external tools. It allows Claude Code, ChatGPT, and other AI systems to call your backcasting engine as a plugin.
When integrated, AI assistants can:
- Create new backcasting plans from natural language descriptions
- Load and analyze existing plans
- Get next actions and critical paths
- Update step statuses
- Add new steps dynamically
- Perform comprehensive analysis
- Save and export plans
-
Locate your Claude Code MCP config:
~/.config/claude-code/mcp_settings.json -
Add the backcasting server:
{ "mcpServers": { "backcast": { "command": "python3", "args": [ "/home/panda/Documents/PythonScripts/OutcomeBackcasting/mcp_server.py" ], "env": {} } } } -
Restart Claude Code
-
Test it: Ask Claude: "Use the backcast tool to create a plan for launching my podcast in 6 months"
| Tool Name | Description |
|---|---|
backcast_create_plan |
Create new plan from outcome description |
backcast_load_plan |
Load existing plan by filename |
backcast_list_plans |
List all saved plans |
backcast_get_overview |
Get plan summary and progress |
backcast_get_all_steps |
Get all steps (with optional details) |
backcast_get_next_actions |
Get ready-to-work-on steps |
backcast_get_critical_path |
Get longest dependency chain |
backcast_add_step |
Add new step to plan |
backcast_update_step_status |
Update step status |
backcast_analyze_plan |
Comprehensive analysis |
backcast_save_plan |
Save to JSON file |
backcast_export_markdown |
Export to Markdown |
Creating a Plan:
You: "Create a backcasting plan for writing a technical book in 12 months"
Claude: [Uses backcast_create_plan tool]
"I've created a plan with 5 major phases working backwards from publication:
Phase 5: Book published and promoted
Phase 4: Final editing and publishing
Phase 3: Peer review and revisions
Phase 2: Draft chapters written
Phase 1: Research and outline
Would you like me to show the next actions you should focus on?"
Checking Progress:
You: "What should I work on next for my book plan?"
Claude: [Uses backcast_load_plan + backcast_get_next_actions]
"Based on your current progress (32% complete), here are your next actions:
1. [CRITICAL] Complete Chapter 3 draft (estimated: 2 weeks)
2. [HIGH] Research case studies for Chapter 4
3. [MEDIUM] Set up technical review panel
Would you like me to update any of these when you complete them?"
Analysis:
You: "Analyze my startup launch plan and tell me if I'm on track"
Claude: [Uses backcast_analyze_plan]
"Analysis of your startup launch plan:
Progress: 45% complete (18/40 steps)
Timeline: 6 months → 3 months elapsed
⚠️ CONCERNS:
- 3 steps are blocked (need to resolve dependencies)
- Critical path shows 2 bottlenecks in MVP development
- High-risk item: No mitigation for API costs
✓ STRENGTHS:
- Marketing phase ahead of schedule
- All funding secured
- Strong team velocity
RECOMMENDATIONS:
1. Unblock Step 12 (API integration) immediately
2. Add risk mitigation for API costs
3. Consider parallelizing Steps 22 and 23
"
Use the engine directly in Python scripts:
from backcast_engine import (
BackcastEngine, Outcome, Step,
StepType, StepStatus, Priority
)
# Create engine
engine = BackcastEngine()
# Create outcome
outcome = Outcome(
title="Launch SaaS Product",
description="Build and launch with 1000 users",
success_criteria=["1000 users", "Profitable"],
constraints=["6 months", "$50k budget"],
timeline="6 months"
)
# Create plan
plan = engine.create_plan(outcome)
plan = engine.generate_steps(plan, num_phases=5)
# Get next actions
next_actions = engine.get_next_actions(plan)
for action in next_actions:
print(f"TODO: {action.title}")
# Update status
plan = engine.update_step(plan, step_id=1, status=StepStatus.COMPLETED)
# Save
engine.save_plan(plan, "my_saas_launch.json")- Automated project management scripts
- CI/CD pipeline integration (track deployment steps)
- Custom dashboards (web apps showing progress)
- Batch processing (analyze multiple plans)
- Integration with other Python tools
Create api_server.py:
#!/usr/bin/env python3
from flask import Flask, request, jsonify
from backcast_engine import BackcastEngine, Outcome, Step
# ... implement REST endpoints
app = Flask(__name__)
engine = BackcastEngine()
@app.route('/api/plans', methods=['POST'])
def create_plan():
data = request.json
# Create plan from JSON data
# Return plan ID
@app.route('/api/plans/<plan_id>', methods=['GET'])
def get_plan(plan_id):
# Load and return plan
@app.route('/api/plans/<plan_id>/next-actions', methods=['GET'])
def get_next_actions(plan_id):
# Return next actions
# ... more endpoints| Endpoint | Method | Description |
|---|---|---|
/api/plans |
POST | Create new plan |
/api/plans |
GET | List all plans |
/api/plans/<id> |
GET | Get plan details |
/api/plans/<id>/steps |
GET | Get all steps |
/api/plans/<id>/next-actions |
GET | Get next actions |
/api/plans/<id>/analyze |
GET | Analyze plan |
/api/steps |
POST | Add step |
/api/steps/<id> |
PATCH | Update step |
# Export plan to Notion database
from notion_client import Client
notion = Client(auth=os.environ["NOTION_TOKEN"])
# Create database for plan
database = notion.databases.create(
parent={"page_id": page_id},
title=[{"text": {"content": plan.outcome.title}}],
properties={
"Name": {"title": {}},
"Status": {"select": {}},
"Priority": {"select": {}},
"Dependencies": {"rich_text": {}}
}
)
# Add steps as pages
for step in plan.steps:
notion.pages.create(
parent={"database_id": database["id"]},
properties={
"Name": {"title": [{"text": {"content": step.title}}]},
"Status": {"select": {"name": step.status.value}},
# ... more properties
}
)import asana
client = asana.Client.access_token('YOUR_TOKEN')
# Create project
project = client.projects.create_in_workspace(
workspace_gid,
{"name": plan.outcome.title}
)
# Create tasks from steps
for step in plan.steps:
client.tasks.create({
"name": step.title,
"notes": step.description,
"projects": [project["gid"]]
})- Two-way sync: Update statuses in PM tool, reflect in backcasting engine
- Team collaboration: Share plans with team
- Rich features: Use PM tool's commenting, attachments, etc.
- Mobile access: Use PM tool's mobile apps
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
# Authenticate
creds = Credentials.from_authorized_user_file('token.json')
service = build('calendar', 'v3', credentials=creds)
# Schedule steps based on dependencies
for step in plan.steps:
if not step.dependencies: # Can start immediately
event = {
'summary': step.title,
'description': step.description,
'start': {'date': calculate_start_date(step)},
'end': {'date': calculate_end_date(step)}
}
service.events().insert(calendarId='primary', body=event).execute()- Calculate start dates based on dependencies
- Respect constraints (working hours, weekends)
- Auto-adjust when steps complete early/late
- Send reminders for upcoming milestones
Create a webhook server that notifies external systems when plans change:
import requests
def on_step_completed(plan, step):
"""Called when step status changes to completed"""
webhook_url = "https://your-app.com/webhooks/backcast"
requests.post(webhook_url, json={
"event": "step_completed",
"plan_id": plan.outcome.title,
"step_id": step.id,
"step_title": step.title,
"progress": engine.calculate_progress(plan)
})- Slack/Discord notifications
- Trigger CI/CD pipelines
- Update dashboards
- Send emails
- Log to analytics
Modify /home/panda/voice_chat.py to include backcasting commands:
# In voice_chat.py, add command handling:
if "what's my next action" in user_speech.lower():
# Load active plan
plan = engine.load_plan("active_plan.json")
next_actions = engine.get_next_actions(plan)
response = "Your next actions are: "
for action in next_actions[:3]:
response += f"{action.title}. "
speak(response)
elif "update step" in user_speech.lower():
# Parse step ID and new status
# Update in backcasting engine
# Confirm via voice┌─────────────────────────────────────────────────────────┐
│ Backcasting Engine Core │
│ (backcast_engine.py) │
└─────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ MCP Server │ │ REST API │ │ Python Lib │
│ (AI Tools) │ │ (Web Apps) │ │ (Scripts) │
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Claude Code │ │ Dashboards │ │ Automation │
│ ChatGPT │ │ Mobile Apps │ │ CI/CD │
│ Custom AIs │ │ Websites │ │ Monitoring │
└──────────────┘ └──────────────┘ └──────────────┘
Plus External Integrations:
↓
┌─────────────────────────────────────────────────────────┐
│ Notion • Asana • Jira • Google Calendar • Slack │
│ Discord • Email • Webhooks • Analytics │
└─────────────────────────────────────────────────────────┘
Best Choice: MCP Server + Claude Code
- Natural language interaction
- AI suggests next steps
- Quick updates via chat
- No infrastructure needed
Best Choice: Notion/Asana Integration
- Team visibility
- Collaboration features
- Mobile access
- Comments and attachments
Best Choice: Python Library + Webhooks
- Direct control
- Custom logic
- Integration with existing systems
- Event-driven updates
Best Choice: REST API
- Multi-user support
- Web dashboard
- Mobile apps
- Scalable architecture
Best Choice: Voice Assistant Integration
- Hands-free updates
- Quick status checks
- Natural interaction
- Great for mobile users
-
Enable MCP Server:
chmod +x mcp_server.py
-
Add to Claude Code config:
# Copy mcp_config.json content to your Claude Code settings -
Test it:
Ask Claude: "List my backcasting plans"
# In your Python script
import sys
sys.path.append('/home/panda/Documents/PythonScripts/OutcomeBackcasting')
from backcast_engine import BackcastEngine
engine = BackcastEngine()
# Use it!- Core Documentation:
README.md - Quick Start Guide:
QUICKSTART.md - MCP Server Code:
mcp_server.py - Example Plan:
data/example_ai_assistant_launch.json
The backcasting engine is designed to be a plugin-ready system that can integrate anywhere you need strategic planning capabilities!