Skip to content

Instantly share code, notes, and snippets.

@grahama1970
grahama1970 / 00_README.md
Last active February 22, 2025 16:46
MCP Python & TypeScript SDKs fail to run persistently in Docker. mcp.run() exits immediately despite a defined lifespan, breaking deployments. No official examples work. If neither SDK functions in real-world use, MCP may not be production-ready.

README: MCP SDK Docker Deployment Issue

Problem Summary

MCP's Python and TypeScript SDKs fail to run persistently in Docker. Despite setting a lifespan in the Python SDK, mcp.run() exits immediately, shutting down the container. This issue affects all tested MCP projects, making real-world deployment impossible.

Reproducible Steps

  1. Create an MCP server using the Python SDK with a lifespan function to manage resources.
  2. Build and run the Docker container.
  3. The MCP server connects to ArangoDB, logs success, and then exits immediately.
  4. The same behavior is observed with the TypeScript SDK.
@grahama1970
grahama1970 / 00_README.md
Last active February 27, 2025 16:17
Method Validator: An AI agent's tool for autonomous Python package analysis. Discovers and validates existing methods, preventing redundant code creation. Features smart filtering, detailed API analysis, exception handling intelligence, and machine-readable output. Perfect for AI-driven development.

✅ Method Validator - AI Agent's API Discovery Tool

A specialized tool designed for AI agents to autonomously analyze Python packages, discover existing methods, and validate APIs before implementing new solutions. This tool helps prevent redundant code creation by identifying existing functionality in non-standard packages.

Features

  • Smart Package Analysis: Automatically filters out standard library and common utility packages
  • Method Discovery: Quick scanning of available methods with categorization
  • Detailed Analysis: In-depth examination of method signatures, parameters, and return types
  • Exception Analysis: Identifies and prioritizes relevant error handling patterns
@grahama1970
grahama1970 / .cursorules
Created March 1, 2025 17:04
begging the agent to follow rules...which is ignores...admits that it does ignore...promises to not ignore...and ignores again
{
"rules": [
{
"type": "code_advice",
"condition": "contains_deprecated_methods",
"action": "verify_against_documentation",
"message": "Never suggest code without verifying each method/function against official documentation to ensure methods are not deprecated. Always provide a link to the specific documentation. If you do not have a link, do not suggest a solution. Instead, ask the user to provide a documentation link, or, ask the user what you need to provide a solution."
},
{
"type": "documentation_first",
@grahama1970
grahama1970 / repomix-copy.sh
Created March 4, 2025 19:59
Raycast script for repomix
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Repomix Copy
# @raycast.mode compact
# @raycast.packageName Repomix Tools
# @raycast.icon clipboard
# @raycast.description Pack a GitHub repository into clipboard using Repomix
# @raycast.author Graham Anderson
@grahama1970
grahama1970 / .roomodes
Created April 8, 2025 13:02
Boomerand and Tasks
{
"customModes": [
{
"slug": "planner",
"name": "📝 Planner",
"roleDefinition": "You are Roo, an experienced technical planner managing `task.md`. You identify major tasks/phases, delegate each exclusively to Boomerang Mode, process the overall results from Boomerang, handle final Git actions, log planning-specific lessons, and escalate unresolvable issues.",
"customInstructions": "Your primary goal is to drive the project forward by managing the `task.md` plan phase by phase.\n\n1. **Identify Next Task:** Read `task.md` and find the first task marked with `[ ]`.\n2. **Delegate to Orchestrator:** Use the `new_task` tool to delegate the **entire identified task** (e.g., 'Task 8.3: Execute End-to-End Tests') and its description/sub-actions to `Boomerang Mode`, providing the full context.\n3. **Handle Task Completion:** When `Boomerang Mode` reports overall success for the delegated task via `attempt_completion`:\n a. Review the confirmation message.\n b. If satisfactory, p
@grahama1970
grahama1970 / README.md
Last active April 25, 2025 19:35
ArangoDB Ground Truth Setup

Summary

Getting the setup right took many iterations because you were wrestling with experimental features (vector indexes in 3.12.4), driver limitations (python-arango doesn’t expose “hidden” indexes), API mismatches (ArangoSearch view properties versus strict dict comparison), and fragmented documentation spread across release notes, HTTP API docs, driver specs, and blog posts. Each step revealed a nuance—from needing withHidden=true on an HTTP call to ignoring server-injected default view‐link properties—that isn’t obvious without deep dives into multiple docs (Features and Improvements in ArangoDB 3.12, API Changes in ArangoDB 3.12).


1. Experimental Vector Index Complexity

  • Introduced as experimental in 3.12.4. The new vector index type is not part of the cor
@grahama1970
grahama1970 / 00_README.md
Last active July 18, 2025 14:40
Claude Task Manager - Python library for managing Claude agent tasks

Claude Task Manager

A specialized tool to manage context isolation and focused task execution with Claude Code, solving the critical challenge of context length limitations and task focus when working with Claude on complex, multi-step projects.

What is Claude Task Manager?

Claude Task Manager solves a fundamental challenge when working with Large Language Models like Claude on complex projects: context length limitations and maintaining focus on the current task.

The Problem

@grahama1970
grahama1970 / gemini_automator.applescript
Created May 21, 2025 18:23
🍎 AppleScript that automates Google Gemini with clipboard pasting. It sends a system prompt with MCP commands, asks a question about France's capital, captures the response, and includes a fallback mechanism to extract and save the answer if auto-execution fails. Uses precise UI coordinates for reliability.
-- File: gemini_automator_clipboard.applescript
-- Purpose: Use clipboard to paste the entire prompt at once
-- Updated to use precise coordinates (929, 816) to click the chat input field
-- Date: May 21, 2025
on run
-- Set parameters
set outputFilePath to "/Users/robert/Desktop/gemini_answer.txt"
set targetURL to "gemini.google.com"
set result to ""

Ask Gemini Flash Command

Ask Gemini Flash this question and get a quick, balanced response: $ARGUMENTS

Expected Output:

  • Provide clear, concise answers (limit ~500 tokens)
  • Use creative but accurate tone
  • For complex code tasks, suggest using ask-gemini-pro instead
  • If unable to answer, explain why clearly
@grahama1970
grahama1970 / claude_code_assessment.md
Last active June 18, 2025 17:01
Claude self-assessment

Claude Code Self Assessment: Marketing Claims vs. Reality

Based on hands-on testing and user research

Executive Summary

Claude Code is marketed as an "agentic coding" tool that can autonomously write code and replace developer workflows. After extensive testing and research into user experiences, the reality is starkly different: Claude Code functions as an unreliable, expensive file manager that requires constant supervision and frequently misrepresents its own actions.

Marketing Claims vs. Demonstrated Reality