Skip to content

Instantly share code, notes, and snippets.

@patmandenver
patmandenver / index.ts
Created May 19, 2026 19:16
Example with lookup-stocks
import express, { Request, Response } from 'express';
const app = express();
app.use(express.json({ limit: '10mb' }));
const PORT = 8000;
const SERVER_NAME = "My Multi-Prompt MCP Server";
const SERVER_VERSION = "1.3.0";
const PROTOCOL_VERSION = "2025-06-18";
@patmandenver
patmandenver / index.ts
Created May 19, 2026 18:53
MCP server with Prompts with multiple arguments
import express, { Request, Response } from 'express';
const app = express();
app.use(express.json({ limit: '10mb' }));
const PORT = 8000;
const SERVER_NAME = "My Multi-Prompt MCP Server";
const SERVER_VERSION = "1.3.0";
const PROTOCOL_VERSION = "2025-06-18";
@patmandenver
patmandenver / index.ts
Created May 19, 2026 18:23
MCP server prompt testing with args
import express, { Request, Response } from 'express';
const app = express();
app.use(express.json({ limit: '10mb' }));
const PORT = 8000;
const SERVER_NAME = "My Multi-Prompt MCP Server";
const SERVER_VERSION = "1.3.0";
const PROTOCOL_VERSION = "2025-06-18";
@patmandenver
patmandenver / index.ts
Last active May 19, 2026 18:54
Basic Prompt MCP server
import express, { Request, Response } from 'express';
const app = express();
app.use(express.json({ limit: '10mb' }));
const PORT = 8000;
const SERVER_NAME = "My Multi-Prompt MCP Server";
const SERVER_VERSION = "1.3.0";
const PROTOCOL_VERSION = "2025-06-18";
#!/usr/bin/env python3
"""
Author: T. Patrick Bailey
Whiteboarcoder.com
Returns the monthly cost/budget for Claude
Assumes an admin key is at ~/.claude-key-cost
and you have to hard code the BUDGET variable
"""
@patmandenver
patmandenver / claude-message.py
Created March 6, 2026 05:24
/usr/bin/claude-message
#!/usr/bin/env python3
"""
Simple script to generate a response using Anthropic's messages endpoint
and report input/output tokens.
Works both with piped input and command-line arguments.
"""
import sys
import json
import os
@patmandenver
patmandenver / token-count.py
Created March 6, 2026 05:02
/usr/bin/token-count
#!/usr/bin/env python3
"""
Simple script to count input tokens using Anthropic's count_tokens endpoint
Works both with piped input and command-line arguments
"""
import sys
import json
import os
import argparse
██
██░░██
██░░░░░░██
██░░░░░░██
██░░░░░░░░░░██
██░░██████░░██
██░░░░██████░░░░██
██░░░░██████░░░░██
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
moai_statue = "moai-small-no_overhang.stl";
magnet_dia = 32.2; //33 too big
//
// Created by Patrick Bailey iQless.com
//
////////////////////////////////////////
$fn=200;
moai_statue = "moai-small-no_overhang.stl";
moau_plug = "giant_moai_plug.stl";