Skip to content

Add ATXP MCP server integration for image, video, and browse tools#1

Merged
robdimarco-atxp merged 1 commit into
mainfrom
robdimarco/atxp-405-create-a-template-instance-for-generating-cloudflare-chat
Oct 13, 2025
Merged

Add ATXP MCP server integration for image, video, and browse tools#1
robdimarco-atxp merged 1 commit into
mainfrom
robdimarco/atxp-405-create-a-template-instance-for-generating-cloudflare-chat

Conversation

@robdimarco-atxp
Copy link
Copy Markdown
Contributor

Summary

This PR adds ATXP MCP (Model Context Protocol) server integration to the Cloudflare chat template, providing advanced capabilities:

  • 🎨 Image Generation via image.mcp.atxp.ai
  • 🎬 Video Creation via video.mcp.atxp.ai
  • 🌐 Web Browsing via browse.mcp.atxp.ai

Changes

Server Implementation (src/server.ts)

  • Added initializeMcpServers() method that connects to three ATXP MCP servers on first message
  • Uses ATXP proxy URLs (${atxpConnection}&server=${server}) to avoid per-request charges
  • Enhanced system prompt to describe new capabilities and guide the AI on when to use them
  • Added error handling for individual MCP server connection failures

Documentation (README.md)

  • Added MCP Tool Capabilities section with detailed descriptions
  • Provided example prompts for each capability (image, video, browse)
  • Updated Features section to highlight new capabilities

Implementation Details

The MCP servers are initialized lazily on the first chat message using the ATXP connection string already configured for LLM access. This approach:

  1. Leverages the existing ATXP_CONNECTION environment variable
  2. Uses the documented ATXP proxy format from https://docs.atxp.ai/proxy
  3. Avoids per-request MCP charges by using proxy URLs
  4. Provides automatic capability discovery via the agents package

Testing

  • ✅ Development server starts successfully
  • ✅ TypeScript compilation passes
  • ✅ Code formatting and linting pass
  • ✅ MCP initialization logic tested locally

Related Issues

Fixes ATXP-405 (Create a template instance for generating Cloudflare chat example)
Fixes ATXP-409 (Add video, browse and image MCP tools to the demonstration)

🤖 Generated with Claude Code

- Integrate image.mcp.atxp.ai for image generation capabilities
- Integrate video.mcp.atxp.ai for video creation from text prompts
- Integrate browse.mcp.atxp.ai for web browsing and screenshot capabilities
- Use ATXP proxy URLs to avoid per-request charges
- Initialize MCP servers on first chat message
- Enhanced system prompt to describe new capabilities
- Updated README with MCP tool documentation and example prompts

This implements ATXP-409 and enhances the template created in ATXP-405
with advanced MCP capabilities that demonstrate the power of the ATXP
platform for building AI agents.

Fixes ATXP-405
Fixes ATXP-409

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robdimarco-atxp robdimarco-atxp merged commit 41ed9f8 into main Oct 13, 2025
1 check passed
@robdimarco-atxp robdimarco-atxp deleted the robdimarco/atxp-405-create-a-template-instance-for-generating-cloudflare-chat branch October 13, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant