Greg Baugues thumbnail

📝 Greg Baugues Blog

Bringing Claude Code to Life with Custom Sounds: A Fun Introduction to Hooks

When Enthropic announced hooks for Claude Code, it opened a whole new world of possibilities for customizing how Claude interacts with your workflow. Inspired by a playful comment on the Claude AI subreddit—“I’m going to use this to make Claude meow. I’ve always wanted a cat, but I’m allergic”—I decided to dive in and create a unique sound-based notification system for Claude’s various events. The result? Claude meowing, beeping, and even speaking as it runs commands in the background.

Why Use Hooks in Claude Code?

Hooks are a powerful addition that let you run custom commands triggered by different Claude events. These events include:

  • Pre-tool use: Before Claude uses a tool like bash, file editing, or fetching data from the web.
  • Post-tool use: After Claude completes a task.
  • Notification: When Claude is waiting for your approval.
  • Stop: When Claude finishes its task.
  • Pre-compact: Before autocompacting your session history.

By assigning sounds or commands to these events, you get real-time feedback about what Claude is doing, making it easier to understand and control its behavior.

Setting Up Hooks: Where to Start

To set up hooks, you edit your settings.json file within your project. This ensures your hooks are version-controlled and consistent across different work trees. Although you can also configure hooks in user-level settings, keeping them project-specific is a good starting point.

Here’s the gist of the setup:

  • Create a hooks directory inside your .cloud folder.
  • Define a list of hooks in your settings.json, specifying the event type and the command to run.
  • Use a single Python script (hook_handler.py) to handle all hook events. This centralizes your logic and simplifies debugging.

Example snippet from settings.json:

json "hooks": [ { "event": "notification", "command": ["python3", "/path/to/hook_handler.py"] }, { "event": "stop", "command": ["python3", "/path/to/hook_handler.py"] }, { "event": "pre-tool-use", "command": ["python3", "/path/to/hook_handler.py"] } ]

The Magic Behind the Scenes: The Python Hook Handler

The hook_handler.py script receives JSON data from Claude via standard input whenever an event is triggered. This data includes session info, event name, tool name, and tool input, which you can log and analyze to determine what action to take.

I used Claude itself to generate and iteratively refine the Python script, making it as readable and maintainable as possible. The script’s responsibilities include:

  • Logging incoming event data for debugging.
  • Mapping specific events and commands to corresponding sounds or voice notifications.
  • Playing sounds using predefined audio files stored in categorized directories (beeps, voices, meows).

Curating the Sounds: From Beeps to Meows

To keep things fun and engaging, I sourced sounds from Epidemic Sound, a platform I often use for my YouTube videos. They offer a wide range of sound effects, including beeps, cat meows, and even voice actors providing customizable voice clips.

Some tips for working with Epidemic Sound:

  • Sounds often include multiple effects in one file, so use their segment tool to extract just the part you want.
  • You can assign specific sounds to particular actions, for example:
  • A "committing" voice clip when Claude commits code.
  • Different beeps for bash commands, file edits, or pull request creation.
  • Sad meows or playful cat sounds for other events.

This mapping helped me instantly recognize what Claude was doing just by listening.

Lessons Learned and Practical Uses for Hooks

Building this sound notification system was more than just a fun experiment; it was a fantastic way to understand Claude’s inner workings and the power of hooks. Here are some insights and practical applications:

  • Understanding Cloud Code behavior: Assigning sounds to events revealed how often Claude updates to-dos or runs bash commands.
  • Custom safeguards: You can create hooks that prevent dangerous commands like rm -rf from executing accidentally.
  • Automation enforcement: Hooks can ensure tests run before opening pull requests or run linters automatically.
  • Better notifications: Replace or supplement default notifications with customized alerts that better fit your workflow.

Getting Started Yourself

If you want to explore this yourself, check out the full code repository at hih high.ai/hooks. The Python script and example sounds are all there for you to experiment with and customize.

I’d love to hear how you’re using hooks in Claude Code—whether for fun like me or to build more pragmatic workflows. Hooks unlock a new layer of control and creativity, and I hope this post inspires you to dive in!


Summary

  • Hooks allow running custom commands on Claude Code events.
  • Setting hooks in settings.json keeps them project-specific and version-controlled.
  • A Python script can handle multiple hook events for better maintainability.
  • Assigning sounds to events helps understand Claude’s behaviors.
  • Hooks can be used for both fun notifications and practical workflow controls.
  • Check out the full project and share your hook ideas!

Happy coding—and meowing—with Claude Code! 🐱🎶

📹 Video Information:

Title: I used HOOKS to make CLAUDE CODE Meow, Beep, and Talk
Duration: 14:28

How Custom Sounds Help You Understand Claude Code Hooks (and Why You Should Try It!)

When Anthropic announced hooks for Claude Code, one Reddit user joked, “I’m going to use this to make Claude meow. I’ve always wanted a cat, but I’m allergic.” That comment sparked an unexpectedly powerful way to get started with hooks: adding custom sounds to different Claude events. Not only is it fun and whimsical, but it’s also an educational deep-dive into how Claude Code operates under the hood.

Let’s walk through how this sound-based project works, why it’s useful, and how it can inspire more advanced, pragmatic uses of hooks.


Understanding the Power of Claude Code Hooks

Claude Code hooks let you assign custom commands to different events in the coding workflow. These events include things like:

  • Pre-tool use: Before Claude uses a tool (often Bash commands, editing files, reading files, web requests, etc.)
  • Post-tool use: After Claude finishes using a tool.
  • Notifications: When Claude is waiting for user input or approval.
  • Stop: When the current task is completed.
  • Pre-compact: Before Claude auto-compacts session history.

By assigning sounds to each event, you get immediate, sensory feedback as these events are triggered. This helps you see (or hear!) what’s happening in the background, making hooks less abstract and more tangible.


Setting Up Your Project: Where to Configure Hooks

To get started, you’ll edit your settings.json—specifically, the one in your project directory (not your user or local settings). This ensures your hook configuration is committed to your repository and applies across all work trees.

Within your project, create a hooks directory to store all the scripts and sound files. If you eventually want these hooks to work across all projects, you can migrate them to your user settings, but localizing them per project is best for experimentation.


Defining Hooks in settings.json

In your settings.json, hooks are defined as a list, where each hook specifies:

  • Type of event (e.g., pre-tool use, stop, notification)
  • Command to run (in this case, a Python script)

For simplicity and maintainability, it’s best to keep the JSON configuration minimal and put most of the logic inside your Python script. This allows for easier debugging and flexibility.


Building the Python Hook Handler

The Python script acts as the core logic center. Here’s how to approach it:

  1. Log Incoming Data: Whenever Claude triggers a hook, JSON data is piped into your script via standard input. This data contains session information, the event name, the tool being used, and any tool-specific input. Logging this is crucial for understanding what’s happening and for debugging.

  2. Map Events to Sounds: Create directories for different types of sounds (beeps, meows, voices, etc.). You can use sound effect services like Epidemic Sound to download fun beeps, cat meows, or even AI-generated voice snippets.

  3. Assign Sounds to Actions: Either assign random sounds or, more effectively, map specific sounds to specific events or Bash commands. For example, use a “meow” for file edits, a “beep” for notifications, or a British-accented “committing” for git actions.

  4. Optional Patterns: Fine-tune the sound mapping for more granular feedback. For example, distinguish between editing files, reading files, or running specific CLI commands by matching against the command name.


Why Start with Sounds?

Assigning sounds to hooks isn’t just playful—it’s surprisingly educational. You’ll quickly discover:

  • Which events are triggered most often (e.g., how many actions are actually Bash commands)
  • How Claude interacts with your files and tools
  • Opportunities for more advanced hook logic (like intercepting dangerous commands or ensuring tests run before a pull request)

Making abstract processes audible helps demystify Claude’s inner workings and gives you confidence to try more serious customizations.


Beyond Sounds: Unlocking the Full Potential of Hooks

Once you’re comfortable, hooks enable all sorts of productivity and safety improvements:

  • Preventing dangerous commands: Block risky Bash operations like rm -rf before they execute.
  • Running Linters: Automatically trigger code quality checks after edits.
  • Enforcing Test Runs: Ensure tests pass before allowing pull requests.
  • Custom Notifications: Replace unreliable system beeps with tailored sounds or even spoken messages.

Hooks give you deterministic control over Claude Code’s behavior—making your coding environment smarter, safer, and more responsive.


Ready to Try? Resources and Next Steps

You can find all the code and examples from this project at hihigh.ai/hooks.

Whether you want to make Claude meow, beep, or speak in a proper British accent, starting with custom sounds is a delightful way to understand hooks. Once you grasp the basics, you’ll be well-equipped to use hooks for more complex, pragmatic workflows.

What creative uses have you found for Claude Code hooks? Share your ideas and let’s build smarter tools together!

Основные выводы и инсайты

  • Представлен рабочий процесс с использованием Cloud Code и GitHub для разработки веб-приложения, который значительно повышает продуктивность и качество.
  • Основой процесса является классический цикл разработки ПО: планирование, создание, тестирование, деплой.
  • Важность детальной и атомарной проработки GitHub issues для успешной работы с AI-ассистентом.
  • Использование GitHub CLI для взаимодействия Cloud Code с репозиторием.
  • Интеграция CI/CD через GitHub Actions для автоматического запуска тестов и проверки кода.
  • Внедрение Puppeteer для автоматического тестирования UI путем симуляции кликов в браузере.
  • Роль человека в процессе — прежде всего в фазе планирования и ревью кода, в то время как создание, тестирование и деплой можно делегировать AI.
  • Практика полного очищения контекста Cloud Code после выполнения задачи для лучшего управления токенами и предотвращения загрязнения памяти.
  • Использование системы «рабочих деревьев» (work trees) для параллельной работы с несколькими ветками и задачами, хотя автор отмечает неудобства и высокую стоимость управления ими.

Практические стратегии

  • Создавать GitHub issues из требований, обеспечивая их детальную и атомарную структуру.
  • Использовать GitHub CLI для управления репозиторием из Cloud Code.
  • Настроить тестовый набор и CI с использованием GitHub Actions для автоматической проверки каждого коммита.
  • Интегрировать Puppeteer для автоматизации тестирования пользовательского интерфейса.
  • Создавать slash-команды в Cloud Code, которые принимают номер issue как аргумент и запускают процесс: планирование → создание кода → тестирование → деплой.
  • В фазе планирования использовать «scratch pads» — директории для разбивки задачи на маленькие подзадачи и поиска предшествующих решений.
  • Делегировать коммиты и создание PR AI, но обязательно читать и ревьюить изменения (с возможностью использовать AI для обзора PR в стиле известных экспертов).
  • После завершения задачи выполнять команду /clear для очистки контекста Cloud Code.
  • Использовать work trees для параллельной работы с несколькими задачами, но быть готовым к дополнительному управлению разрешениями и конфликтами.

Конкретные детали и примеры

  • Источник рабочего процесса — GitHub flow, описанный Скоттом Шаоном около 13-14 лет назад.
  • Работа начинается с диктовки требований через Super Whisper, затем формирование спецификаций с помощью Claude.
  • Пример использования Ruby on Rails для MVC и встроенного тестирования, а также Puppeteer для тестирования UI.
  • Рекомендация по установке GitHub CLI и использование его для управления issues через bash.
  • Использование разных уровней «think» промтов (think harder, think hardest, ultraink) для глубокого анализа задач.
  • Автор использует Render для автоматического деплоя при слиянии ветки в main.
  • Пример практики ревью PR в стиле Sandy Mets — известного эксперта по чистому коду в Rails.
  • Обсуждение статьи Томаса Тацика о скепсисе в отношении AI-кодирования и важности ревью кода человеком.
  • Ограничения и проблемы с GitHub actions: метered billing, что делает использование менее выгодным при большом объеме изменений.
  • Аналогия с многотабличной игрой в покер для объяснения концепции work trees.

Предупреждения и распространённые ошибки

  • Избегать слишком общих и крупных GitHub issues — лучше разбивать задачи на маленькие, четко определённые.
  • Не стоит полностью полагаться на AI для коммитов без ревью — всегда проверять код, чтобы избежать ошибок.
  • Не использовать GitHub actions для больших и значимых изменений из-за затрат на API и ограничений.
  • Work trees требуют повторного утверждения разрешений при каждой новой сессии, что ведёт к «бэбиситтингу» и потере времени.
  • Избегать накопления контекста в Cloud Code — лучше очищать контекст после каждой задачи, чтобы избежать путаницы и лишних затрат токенов.
  • Не стоит сразу запускать большое количество задач параллельно, если база кода тесно связана — это ведет к конфликтам и усложнению процесса.

Ресурсы и следующие шаги

  • Использовать официальную документацию GitHub flow и GitHub CLI.
  • Ознакомиться с публикацией Бориса (создателя Cloud Code) о лучших практиках агентного кодирования.
  • Прочитать статью Томаса Тацика «All of My AI skeptic friends are nuts» для глубокого понимания работы с AI в разработке.
  • Смотреть видео автора про «Claude Code pro tips» для расширения навыков.
  • Настроить собственный workflow с использованием slash-команд Cloud Code, GitHub Actions, Puppeteer и scratch pads.
  • Экспериментировать с work trees для управления несколькими параллельными задачами.
  • Следить за обновлениями Anthropic и Claude для оптимизации затрат и улучшения интеграций.

Основные темы

  • Workflow разработки с использованием Cloud Code и GitHub.
  • Цикл разработки: планирование, создание, тестирование, деплой.
  • Создание и управление GitHub issues.
  • Интеграция GitHub CLI и GitHub Actions.
  • Использование Puppeteer для UI тестирования.
  • Роль человека и AI в кодировании и ревью.
  • Важность четких, атомарных задач.
  • Управление контекстом и памятью AI-ассистента.
  • Практическое использование work trees.
  • Опыт и советы по работе с AI в реальных проектах.

Основные выводы и инсайты

  • Claude Code — мощный CLI-инструмент для написания кода, который можно интегрировать с другими командными утилитами и запускать с аргументами.
  • Работа с изображениями в Claude Code упрощает создание интерфейсов и обратную связь через скриншоты, которые можно вставлять вручную или автоматизировать через Puppeteer MCP сервер.
  • MCP (Modular Code Protocol) серверы позволяют интегрировать Claude Code с базами данных, API и документацией, расширяя возможности разработки.
  • Файл claude.md — ключевой элемент, задающий контекст и правила работы с проектом, который загружается при каждом запросе к Claude Code.
  • Слэш-команды (slash commands) — шаблоны запросов, которые можно настраивать и запускать с параметрами для автоматизации типовых задач.
  • Важно активно управлять контекстом и сессиями: использовать отмену, прерывать генерацию, регулярно коммитить изменения в систему контроля версий.
  • Мониторинг использования токенов и управление затратами — необходимая практика, особенно при оплате за токены. Интеграция с системами мониторинга (например, Data Dog) помогает контролировать расходы.
  • Обновление до тарифных планов Claude Max значительно снижает стоимость использования.

Практические стратегии

  • Использовать командную строку для запуска Claude Code с параметрами, в том числе в headless режиме (-p).
  • Вставлять изображения в терминал (через drag-and-drop или сочетания клавиш) для передачи макетов и обратной связи.
  • Настроить Puppeteer MCP сервер для автоматического снятия скриншотов и интеграции с Claude Code.
  • Создавать и регулярно обновлять claude.md с инструкциями по проекту, стилю кода, тестированию и др. Использовать команду /init для автоматического создания файла.
  • Создавать слэш-команды для часто повторяющихся задач (рефакторинг, линтинг, ревью PR) и запускать их с параметрами.
  • Часто прерывать генерацию (клавиша Escape), отменять последние действия и возвращаться к предыдущим версиям.
  • Интегрировать Claude Code с Git и GitHub CLI для управления версиями и автоматизации PR, ревью, коммитов.
  • Следить за индикатором автокомпактизации контекста, выполнять компактирование на естественных точках завершения задач, а при необходимости очищать память.
  • Использовать внешнюю память (GitHub Issues, scratchpads) для планирования работы и снижения нагрузки на контекст.
  • При оплате за токены отслеживать расход и анализировать данные через OpenTelemetry и системы мониторинга.
  • Рассмотреть переход на подписку Claude Max для снижения стоимости и расширения возможностей.

Конкретные детали и примеры

  • Вставка изображений на Mac: drag-and-drop или Shift+Command+Control+4 для скриншота + Control+V для вставки.
  • Использование Puppeteer MCP сервера для автоматизации сбора скриншотов приложения.
  • Пример использования MCP сервера Postgres для прямой работы с базой данных.
  • Пример создания игры Bluey Uno, где правила подтянулись с сайта unorules.com.
  • Команда /init для создания файла claude.md с обзором структуры проекта.
  • Стоимость использования Claude Code: около $150 за 3 дня на тарифе $100 Claude Max.
  • Возможность использовать GitHub MCP сервер вместо установки GitHub CLI.
  • Инструмент Anthropic prompt optimizer для улучшения claude.md.

Предупреждения и типичные ошибки

  • Не перегружать claude.md избыточной или повторяющейся информацией — это ухудшает качество работы модели.
  • Не бояться прерывать генерацию Claude Code при ошибках — это улучшает результативность сессий.
  • Избегать чрезмерной амбициозности Claude Code, которая приводит к сложным для отката изменениям.
  • Всегда использовать систему контроля версий и часто делать коммиты, чтобы легко откатываться.
  • Следить за использованием токенов, чтобы не переплатить.
  • Не забывать регулярно очищать или компактировать контекст, чтобы избежать потери производительности.
  • Не полагаться только на внутреннюю память сессии — использовать внешние инструменты для хранения данных.

Ресурсы и дальнейшие шаги

  • Статья Бориса Чёрни (Boris Churnney) — основной источник советов (ссылка в описании видео).
  • Anthropic prompt optimizer — инструмент для оптимизации claude.md.
  • Puppeteer MCP сервер — для автоматизации скриншотов.
  • Интеграция с Data Dog через OpenTelemetry для мониторинга использования.
  • Использование GitHub CLI и GitHub MCP сервер для работы с репозиториями.
  • Подписка Claude Max для экономии на токенах и увеличения лимитов.
  • Рекомендуется изучить подробнее документацию по MCP серверам и слэш-командам.

Основные темы видео

  • Работа с Claude Code как CLI-инструментом
  • Использование и вставка изображений в терминал
  • Автоматизация через MCP серверы и Puppeteer
  • Настройка и поддержка файла claude.md для контекстных подсказок
  • Создание и использование слэш-команд для типовых задач
  • Советы по управлению сессиями и контекстом
  • Интеграция с Git и GitHub для контроля версий и ревью кода
  • Управление затратами и мониторинг использования токенов
  • Лучшие практики и рекомендации по работе с Claude Code

How to Build a Real-Time Web Research Bot Using Anthropic’s New Web Search API

In the rapidly evolving world of AI, staying updated with the latest information is crucial. Traditional AI models often rely on static training data, which can be months or even years old. That’s why Anthropic’s recent announcement of web search capabilities via their cloud API is a game changer. It enables developers to build AI-powered research bots that fetch real-time data from the web — without relying on external scraping tools or additional servers.

In this blog post, we’ll explore how to leverage Anthropic’s new web search API to build a real-time research assistant in Python. We’ll cover a demo example, key implementation details, useful options, and pricing considerations.


What’s New with Anthropic’s Web Search API?

Before this update, building a research bot that accessed up-to-date information meant integrating third-party tools or managing your own scraping infrastructure. Anthropic’s web search API simplifies this by allowing direct querying of the web through their cloud API, keeping everything streamlined in one place.

For example, imagine wanting to know about a breaking news event that happened just hours ago — such as the recent selection of the first American Pope (recorded May 8th, 2025). Since this information isn’t part of the AI’s training data, it needs to perform a live web search to generate an accurate and current report.


Building Your First Web Search Request: A “Hello World” Example

Getting started is straightforward. Here’s an overview of the basic steps using the Anthropic Python client:

  1. Set your Anthropic API Key as an environment variable. This allows the client to authenticate requests seamlessly.

  2. Instantiate the Anthropic client in Python.

  3. Send a message to the model with your question. For example, “Who is the new pope?”

  4. Add the tools parameter with web_search enabled. This tells the model to access live web data.

Here’s a snippet summarizing this:

```python
from anthropic import Anthropic, HUMAN_PROMPT, AI_PROMPT

client = Anthropic()

response = client.completions.create(
model="claude-3",
messages=[{"role": "user", "content": "Who is the new pope?"}],
tools=["web_search"], # Enable web search tool
max_tokens=1000
)

print(response.choices[0].message.content)
```

Without web search enabled, the model might respond with outdated information (e.g., “As of the last update, it was Pope Francis”). But with web search active, it fetches the latest details, complete with citations from recent news sources.


Understanding the Web Search Response

The response from the API when using web search is richer and more complex than standard completions. It includes:

  • Initial text from the model indicating it is performing a search.
  • Tool usage details showing search queries and pages found.
  • Encrypted content blocks representing scraped snippets (Anthropic encrypts these to avoid direct scraping exposure).
  • Summarized text with citations — a distilled answer referencing URLs, page titles, and quoted text snippets.

Parsing this response can be a bit challenging. The Python client lets you convert the response to a dictionary or JSON format for easier inspection.

For example, you can iterate over the response’s message blocks, extract the main text, and gather citations like URLs and titles. This lets you assemble a report with clickable sources, ideal for building research assistants or automated reporting tools.


Improving Performance with Streaming

Waiting 20 seconds for a full response might be too slow for some applications. Anthropic supports streaming responses through an asynchronous client.

Using the async client, you can receive partial results as they become available and display them in real-time, improving user experience in chatbots or interactive assistants.


Customizing Search Domains: Allowed and Blocked Domains

Anthropic’s API offers parameters to restrict searches to certain domains (allowed_domains) or exclude others (blocked_domains). For example, if you only want information from Reuters, you can specify that in your request:

python tools=[{"name": "web_search", "allowed_domains": ["reuters.com"]}]

However, note that some domains are off-limits due to scraping restrictions (e.g., BBC.co.uk, Reddit). Trying to search those will result in an error.

You can use either allowed_domains or blocked_domains in a single request, but not both simultaneously.


Pricing Overview: How Much Does It Cost?

Anthropic’s web search API pricing stands out as very competitive:

  • $10 per 1,000 searches plus token usage for the normal API calls.
  • Compared to OpenAI’s web search pricing of $30 to $50 per 10,000 calls, Anthropic’s is more affordable.

The pricing difference might be due to different search context sizes or optimizations, but it makes Anthropic a cost-effective choice for integrating live web data.


Wrapping Up

Anthropic’s new web search API opens exciting possibilities for developers building AI applications that require fresh, real-time data from the web. With simple integration, customizable domain filters, streaming support, and competitive pricing, it’s a compelling option for research bots, news aggregators, and knowledge assistants.

If you want to try this out yourself, check out the Anthropic Python client, set your API key, and start experimenting with live web queries today!


Useful Links


Author: Greg
Recorded May 8th, 2025

Feel free to leave comments or questions below if you want help building your own web research bot!

How to Build a Remote MCP Server with Python and FastMCP: A Step-by-Step Guide

In the rapidly evolving world of AI and large language models (LLMs), new tools and integrations continue to push the boundaries of what’s possible. One of the most exciting recent developments is Enthropic’s announcement of remote MCP (Model Control Protocol) server support within Claude, an AI assistant platform. This breakthrough means that users can now connect to MCP servers simply by providing a URL—no complex local setup or developer-level skills required.

In this blog post, we’ll explore what remote MCP servers are, why they matter, and how you can build your own using Python and the FastMCP framework. Whether you’re a developer or an AI enthusiast, this guide will give you the knowledge and tools to create powerful, accessible AI integrations.


What is an MCP Server?

An MCP server serves as a bridge between large language models and external tools or data sources. This enables LLMs like Claude to perform tasks or fetch real-time information beyond their static knowledge base. Traditionally, MCP servers were local setups requiring developer expertise to configure and maintain, limiting their accessibility.


Why Remote MCP Servers are a Game-Changer

Remote MCP servers allow users to connect to MCP servers hosted anywhere via a simple URL. This innovation dramatically lowers the barrier to entry, making it easier for less technical users to enhance their AI assistants with custom tools. For example, a remote MCP server can provide up-to-the-minute data like the current time, weather, or stock prices—capabilities that standard LLMs often lack due to knowledge cutoffs.

Claude’s new integration support means you can now:

  • Add MCP servers by entering a URL in Claude’s settings.
  • Automatically discover available tools and their parameters.
  • Seamlessly invoke those tools during conversations with Claude.

This marks a significant step toward more interactive, capable AI assistants.


Demo: Adding a Current Time Tool to Claude

To illustrate the power of remote MCP servers, here’s a quick example:

  1. Problem: Claude cannot provide the current time because its knowledge is frozen at a cutoff date.
  2. Solution: Create a remote MCP server that returns the current date and time.
  3. Integration: Add the MCP server URL to Claude’s settings under “Integrations.”
  4. Usage: Ask Claude, “What is the current time?” Claude recognizes it has access to the time tool, invokes it with the correct parameters (like time zone), and returns an accurate, up-to-date answer.

This simple enhancement vastly improves Claude’s utility for real-world tasks.


Building Your Own Remote MCP Server in Python with FastMCP

Step 1: Set Up Your Environment

Begin by visiting gomcp.com or the FastMCP GitHub repository for documentation and code examples.

Install FastMCP via pip:

bash pip install fastmcp

Step 2: Create the MCP Server

Here’s a basic MCP server script that provides the current date and time:

```python
from fastmcp import MCPServer
from datetime import datetime
import pytz

server = MCPServer(name="DateTime Server", instructions="Provides the current date and time.")

@server.tool(name="current_datetime", description="Returns the current date and time given a timezone.")
def current_datetime(time_zone: str = "UTC") -> str:
try:
tz = pytz.timezone(time_zone)
now = datetime.now(tz)
return now.strftime("%Y-%m-%d %H:%M:%S %Z")
except Exception as e:
return f"Error: {str(e)}"

if name == "main":
server.run()
```

Step 3: Run Locally and Test with MCP Inspector

FastMCP offers an MCP Inspector tool for debugging and testing your server:

bash npx fastmcp inspector my_server.py

This GUI lets you invoke your tools and view responses directly, providing a deterministic way to debug interactions with your MCP server.

Step 4: Deploy as a Remote MCP Server

To make your MCP server accessible remotely, you need to use a transport protocol suitable for networking.

  • The default stdin/stdout transport works locally.
  • For remote access, use Server-Sent Events (SSE) transport or, soon, the more efficient streamable HTTP transport (currently in development).

Modify your server code to use SSE transport and deploy it on a cloud platform such as Render.com. Assign a custom domain (e.g., datetime.yourdomain.ai) pointing to your deployment.

Once deployed, add your server URL in Claude’s integrations, and it will be ready for use remotely.


The Future of MCP Servers

The adoption of remote MCP servers is poised to explode, as they become far easier to create and integrate with AI assistants like Claude. This will likely spur more companies to launch their own MCP servers, offering a diverse ecosystem of tools accessible via URLs.

For developers, this is an exciting time to dive into MCP and FastMCP development. Even those with limited coding experience can now build meaningful AI enhancements quickly.


Final Thoughts

  • MCP servers empower AI models to access real-time data and perform specialized tasks.
  • Remote MCP servers eliminate the technical hurdles of local setup.
  • FastMCP and Python provide a straightforward path to building your own MCP servers.
  • Claude’s new integrations make adding MCP servers as simple as entering a URL.
  • The future will see more widespread adoption and innovation in MCP technology.

If you want to stay ahead in AI tooling, start experimenting with FastMCP today. Build your own remote MCP server, connect it to Claude, and unlock new capabilities for your AI assistant.

Happy coding!


Resources


Have questions or want to share your MCP server projects? Drop a comment below or connect with me on Twitter!

Why Cloud Code Outshines OpenAI’s Codeex: A Developer’s Perspective

Hey there! I’m Greg, a developer who has spent hundreds of dollars experimenting with AI-powered coding assistants over the past few months. Lately, I’ve made Cloud Code my go-to coding agent, especially when starting new projects or navigating large, older codebases. With the recent launch of OpenAI’s Codeex, I was eager to give it a shot and pit it against Cloud Code in a head-to-head comparison. Spoiler alert: Codeex fell short in several key areas.

In this blog post, I’ll share my firsthand experience with both tools, highlight what OpenAI needs to improve in Codeex, and explain why developer experience is crucial for AI coding assistants to truly shine.


First Impressions Matter: The Developer Experience

Right from the start, Codeex’s developer experience felt frustrating. Although I have a Tier 5 OpenAI account—which is supposed to grant access to the latest GPT-4 models—Codeex informed me that GPT-4 was unavailable. Instead of gracefully falling back to a supported model, the system simply failed when I tried to use GPT-4 Mini.

To make matters worse, the interface for switching models was confusing. I had to use a /help command to discover a /model command with a list of options ranging from GPT-3.5 to Babbage and even DALL·E (an image generation model that doesn’t belong here). Most of these options didn’t work with the product, so I was left guessing which model to pick. This was a baffling experience—why show options that don’t actually work? It felt like a basic user experience bug that should have been caught during testing.

For developers, the first interaction with a tool should be smooth and intuitive—no guesswork, no dead ends. Sadly, Codeex made me jump through unnecessary hoops just to get started.


API Key Management: A Security and Usability Concern

Cloud Code shines in how it manages API keys. It securely authenticates you via OAuth, then automatically stores your API key in a local config file. This seamless process means you can focus on coding without worrying about environment variables or security risks.

Codeex, on the other hand, expects you to manually set your OpenAI API key as a global environment variable or in a .env file. This approach has several drawbacks:

  • Security Risk: Having a global API key in your environment exposes it to any local script or app, increasing the chances of accidental leaks.
  • Lack of Separation: You can’t easily dedicate a separate API key for Codeex usage, which complicates cost tracking and project management.
  • Inconvenience: Managing environment variables across multiple projects can become tedious.

Cloud Code’s approach is more secure, user-friendly, and better suited for developers juggling multiple projects.


Cost Management: Transparency and Control Matter

AI coding assistants can get expensive, and managing usage costs is critical. Cloud Code offers helpful features to keep your spending in check:

  • /cost Command: View your session’s spend anytime.
  • /compact Command: Summarize and compress chat history to reduce token usage and lower costs.

Codeex lacks these features entirely. There is no way to check how much you’ve spent during a session or to compact conversation history to reduce billing. This opacity can lead to unpleasant surprises on your bill and makes cost management stressful.


Project Context Awareness: Smarter by Design

One of Cloud Code’s standout features is its ability to scan your project directory on startup, building an understanding of your codebase. It lets you save this context into a claw.md file, so it doesn’t have to reanalyze your project every time you launch the tool. You can even specify project-specific preferences and coding conventions.

Codeex, by contrast, offers zero context-awareness upon startup. It simply opens a chat window with your chosen model and waits for input. This puts the burden on the developer to manually introduce project context, which is inefficient and time-consuming.

For a coding agent, understanding your existing codebase from the get-go is a game-changer that Codeex currently misses.


User Interface: Polished vs. Minimal Viable

Cloud Code’s command-line interface (CLI) is thoughtfully designed with clear separation between input and output areas, syntax highlighting, and even color schemes optimized for color-blind users. The UI feels intentional, refined, and comfortable for extended use.

Codeex feels like a bare minimum implementation. Its output logs scroll continuously without clear visual breaks, it lacks syntax highlighting, and it provides only rudimentary feedback like elapsed wait time messages. This minimalism contributes to a frustrating user experience.


Stability and Reliability: Crashes Are a Dealbreaker

Cloud Code has never crashed on me. Codeex, unfortunately, has crashed multiple times, especially when switching models. Each crash means reconfiguring preferences and losing all previous session context—a major productivity killer.

Reliability is table stakes for developer tools, and Codeex’s instability makes it feel unready for prime time.


Advanced Features: MCP Server Integration

Cloud Code supports adding MCP (Machine Control Protocol) servers, enabling advanced use cases like controlling a browser via Puppeteer to close the feedback loop by viewing changes in real-time. This kind of extensibility greatly expands what you can do with the tool.

Codeex currently lacks support for MCP servers, limiting its potential for power users.


The Origin Story: Why Polished Tools Matter

During a recent Cloud Code webinar, I learned that Cloud Code began as an internal tool at Anthropic. It gained traction within the company, prompting the team to polish it extensively before releasing it publicly. This internal usage ensured a high-quality, battle-tested product.

In contrast, Codeex feels like it was rushed to market with minimal internal adoption and testing. With just a couple of weeks of internal use and intentional polish, Codeex could improve dramatically.


Final Thoughts: Potential vs. Reality

I have not even touched on the core coding ability or problem-solving skills of Codeex’s models, such as GPT-4 Mini plus codecs. It’s possible that, once the bugs and UX issues are ironed out, Codeex could outperform Cloud Code at a lower cost.

But right now, the frustrating user experience, instability, poor key management, and lack of cost transparency prevent me from fully engaging with Codeex. A well-designed developer experience isn’t just a nice-to-have; it’s essential to unlocking the true power of AI coding assistants.


What OpenAI Needs to Do to Bring Codeex Up to Par

  1. Graceful Model Fallback: Automatically switch to a supported model if the default is unavailable.
  2. Clear and Accurate Model List: Only show models that actually work with the product.
  3. Secure and Convenient API Key Management: Implement OAuth or a dedicated API key setup for the tool.
  4. Cost Transparency: Add commands or UI elements to track session spending and manage token usage.
  5. Project Context Awareness: Automatically scan and remember project details to save time and costs.
  6. Stable, Polished UI: Improve the CLI interface with clear input/output zones, syntax highlighting, and accessibility options.
  7. Reliability: Fix crash bugs to ensure smooth, uninterrupted workflows.
  8. Advanced Feature Support: Enable MCP servers or equivalent extensibility to boost functionality.

Conclusion

AI coding assistants hold incredible promise to revolutionize software development, but only if they respect developers’ time, security, and workflows. Cloud Code exemplifies how thoughtful design and polish can make a tool truly empowering.

OpenAI’s Codeex has potential, but it needs significant improvements in developer experience and stability before it can compete. I look forward to seeing how it evolves and hope these insights help guide its growth.


Thanks for reading! If you’ve tried either Cloud Code or Codeex, I’d love to hear about your experiences in the comments below. Happy coding!

Boost Your Productivity with Claude Desktop, MCP Servers, and Obsidian: A Game-Changing Workflow

Hello! I’m Greg, and today I want to share an exciting workflow that combines Claude Desktop, MCP servers, and Obsidian to achieve impressive productivity gains with minimal effort. Whether you’re a writer, researcher, or knowledge worker, this setup can transform the way you create and manage content.

What is Claude Desktop?

Claude Desktop is the desktop application version of Claude, an AI assistant developed by Anthropic. Unlike the web version, Claude Desktop can act as an MCP (Model Context Protocol) client. This capability allows it to interact directly with MCP servers — a feature currently unavailable in the web app.

Understanding MCP Servers

MCP, or Model Context Protocol, is an open standard developed by Anthropic that enables AI models to access and interact with external context. This context can include databases, tools, or programmatic functions that the model can invoke to enhance its responses.

One simple MCP server example is the File System MCP Server. This server equips Claude with tools to list, read, write, and create files in your system. It’s an elegant bridge between your AI assistant and your local data.

Why Obsidian?

Obsidian is a popular note-taking app that organizes your notes in a "vault" — essentially a folder of markdown files. Because Obsidian stores notes as local files, it pairs perfectly with the File System MCP server, allowing Claude Desktop to read and edit your Obsidian notes directly.

How This Setup Worked for Me: A Real-World Example

Recently, I gave a talk at the Business of Software conference in the UK about AI. Afterward, Dave Collins, a friend from the conference, asked me for an email interview with 10 questions related to my talk. Normally, answering such a questionnaire can be a procrastination trap for me. But I thought, why not leverage this new Claude + MCP + Obsidian workflow to get it done quickly?

Here’s what I did:

  1. Created a New Obsidian Note: I pasted all 10 questions into a fresh note.

  2. Connected Claude Desktop: I asked Claude if it could access the note, and it confirmed it could.

  3. Interactive Interview: Instead of facing all questions at once, Claude asked me each question one at a time in a conversational manner.

  4. Dictated Responses: Using a tool called Super Whisper, I dictated my answers rather than typing them. This helped me avoid the common pitfall of editing while writing. I simply spoke freely.

  5. Updating the Note: After each answer, I asked Claude to insert my response directly into the original Obsidian note. The process was smooth, though setting up Super Whisper required a bit of tweaking.

  6. Cleanup Pass: After completing all answers, I requested Claude to edit the responses for brevity and clarity, removing repeated ideas while keeping my original voice intact. Claude created a new document for the cleaned-up version to ensure my original answers were safe.

  7. Final Human Edits: I then made a final pass manually within Obsidian to polish the text, add missing details, and remove any unwanted parts.

The Result?

In about 90 minutes, I produced roughly 2,000 words and sent the completed interview to Dave before lunchtime. This is a task that would have normally taken me much longer and caused a lot more friction. The integrated Claude + MCP + Obsidian system made the entire process efficient and enjoyable.

Future Possibilities

This workflow also sparked an idea for future experiments: integrating a Git MCP server with Claude and Obsidian. This would enable version control over notes, allowing you to commit changes programmatically and keep a robust history of your work. Combining Git’s power with Obsidian and Claude could be a real productivity powerhouse.

Why You Should Try This Setup

  • Seamless AI interaction with local files: Work directly on your notes without copy-pasting.
  • Focused writing via dictation: Avoid editing while creating, letting ideas flow naturally.
  • Automated clean-up: Let AI polish your raw drafts to save time.
  • Flexible editing: You retain full control to finalize your content on your own terms.
  • Potential for advanced integrations: Add version control and more with MCP servers.

Getting Started

To replicate this workflow, you’ll need:

  • Claude Desktop app: Install it on your machine.
  • An MCP server: Start with the File System MCP server to enable file access.
  • Obsidian: Use it to organize your notes and vault.
  • Dictation tool: Super Whisper or a similar speech-to-text tool for hands-free writing.

Connecting these components creates a powerful environment to accelerate your writing and note-taking tasks.


In summary, combining Claude Desktop, MCP servers, and Obsidian unlocks a new level of productivity by bridging AI capabilities directly with your local knowledge base. Whether answering interview questions, drafting articles, or managing research, this setup helps you work smarter, not harder.

Give it a try and see how it transforms your workflow!

Cursor vs. Claude Code: Which AI Coding Agent Reigns Supreme?

The emergence of AI-powered coding agents has been one of the most exciting developments for software developers recently. Just this past week, two major players—Cursor and Anthropic’s Claude Code—launched their coding agents simultaneously. Intrigued by which tool might better serve developers, I decided to put both to the test on a real-world Rails application running in production. Here’s a detailed breakdown of my experience, comparing their user experience, code quality, cost, autonomy, and integration with the software development lifecycle.


The Test Setup: A Real Rails App with Complex Needs

My project is a Rails app acting as an email "roaster" for GPTs—essentially bots that process and respond to emails with unique personalities. The codebase is moderately complex and had been untouched for nine months, making it perfect for testing AI assistance on:

  1. Cleaning up test warnings and updating gem dependencies.
  2. Replacing LangChain calls with direct OpenAI API usage.
  3. Adding support for Anthropic’s API.

Both agents used the same underlying model—Claude 3.7 Sonnet—to keep the comparison fair.


User Experience (UX): Terminal Simplicity vs. IDE Integration

Cursor:
Cursor’s agent is integrated into a fully featured IDE and has recently made the agent the primary way to interact with the code. While this offers powerful context and control, I found the interface occasionally clunky—multiple “accept” buttons, cramped terminal panes, and confusing prompts requiring manual clicks. The file editor pane often felt unnecessarily large given that I rarely needed to manually tweak files mid-action.

Claude Code:
Claude Code operates as a CLI tool right in the terminal. You run commands from your project root, and it prompts you with simple yes/no questions to confirm each action. This single-pane approach felt clean, intuitive, and perfectly suited for delegating control to the agent. The lack of a GUI was a non-issue given the agent’s autonomy.

Winner: Claude Code for its streamlined, efficient command-line interaction.


Code Quality and Capability: Documentation Search Matters

Both agents produced similar code given the same model, but Cursor’s ability to search the web for documentation gave it a notable edge. When adding Anthropic support, Claude Code struggled with API syntax and ultimately wrote its own HTTP implementation. Cursor, however, seamlessly referenced web docs to get the calls right, rescuing itself from dead ends.

Winner: Cursor, thanks to its web search integration.


Cost: Subscription vs. Metered Pricing

  • Claude Code: Approximately $8 for 90 minutes of work on these tasks. While reasonable, costs could add up quickly for frequent use.
  • Cursor: $20/month subscription includes 500 premium model requests; I used less than 10% of that for this exercise, roughly costing $2.

Winner: Cursor, offering more usage for less money and a simpler subscription pricing model.


Autonomy: Earning Trust with Incremental Permissions

Claude Code shines here with a granular permission model. Initially, it asks for approval on commands; after repeated approvals, it earns trust to perform actions autonomously. By the end of my session, it was acting independently with minimal prompts.

Cursor, in contrast, lacks this “earned trust” feature. It repeatedly asks for confirmation without a way to grant blanket permissions. Given the nature of coding agents, I believe this is a feature Cursor should adopt soon.

Winner: Claude Code for smarter incremental permissioning.


Integration with Software Development Lifecycle

I emphasize test-driven development (TDD) and version control (Git), so how each agent handled these was crucial.

  • Claude Code: Excellent at generating and running tests before coding features, ensuring quality. Its commit messages were detailed and professional—better than any I’ve written myself. Being a CLI tool, it felt natural coordinating commands and output.

  • Cursor: While it offers a nice Git UI within the IDE and can autogenerate commit messages, these were more generic and less informative. Its handling of test outputs in a small terminal pane felt awkward.

Winner: Claude Code, for superior test and version control workflow integration.


Final Verdict: Use Both, But Lean Towards Claude Code—for Now

Both agents completed all three complex tasks successfully—a testament to how far AI coding assistants have come. It’s remarkable to see agents not only write code but also tests and meaningful commit messages that improve project maintainability.

That said, this is not a binary choice. I recommend developers use both tools in tandem:

  • Use Cursor for day-to-day coding within your IDE, benefiting from its subscription model and web documentation search.
  • Use Claude Code for command-line driven tasks that require incremental permissions, superior test integration, and detailed commit management.

For now, I personally prefer Claude Code for its user experience, autonomy model, and lifecycle integration. But Cursor’s rapid iteration pace means it will likely close these gaps soon.


Takeaway for Developers

If you’re a software developer curious about AI coding agents:

  • Get the $20/month Cursor subscription to familiarize yourself with agent-assisted coding.
  • Experiment with Claude Code in your terminal to experience granular control and trust-building autonomy.
  • Use both to balance cost, control, and convenience.
  • Embrace AI coding agents as powerful collaborators that can help you break through stalled projects and increase productivity.

The future of software development is here—and these AI coding agents are just getting started.


Have you tried Cursor or Claude Code? Share your experiences and thoughts in the comments below!