Skip to main content
Glama
README.mdโ€ข7.87 kB
# PrintCast Agent ๐ŸŽ™๏ธ๐Ÿ“„โœ‰๏ธ An automated voice-to-print service that integrates AI conversational agents with physical printing and delivery. Users can call a phone number, interact with an AI agent to select trending content (GitHub repos, RSS feeds, news), and have it printed and delivered to their address. ## ๐ŸŒŸ Features - **Voice Interface**: Natural conversation through phone calls using ElevenLabs Conversational AI - **Multi-language Support**: Czech and English language support - **Content Sources**: - GitHub Trending repositories - RSS feeds - News articles - **Automated Printing**: CUPS integration for local/network printing - **Delivery Integration**: Support for multiple carriers (Czech Post, Zรกsilkovna, DPD, PPL) - **MCP Server**: Full Model Context Protocol implementation for AI client integration - **Workflow Orchestration**: Complete automation from call to delivery ## ๐Ÿ—๏ธ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Asterisk โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ ElevenLabs โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ Content โ”‚ โ”‚ SIP Server โ”‚ โ”‚ AI Agent โ”‚ โ”‚ Fetcher โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ PrintCast โ”‚ โ”‚ MCP Server โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”‚ Print โ”‚ โ”‚Deliveryโ”‚ โ”‚ AWS โ”‚ โ”‚ Server โ”‚ โ”‚Service โ”‚ โ”‚ Services โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## ๐Ÿ“‹ Prerequisites - Python 3.11+ - Asterisk PBX (optional, for telephony) - CUPS (optional, for printing) - ElevenLabs API key - Carrier API keys (for delivery services) ## ๐Ÿš€ Quick Start ### 1. Clone the repository ```bash git clone https://github.com/yourusername/printcast-agent.git cd printcast-agent ``` ### 2. Install dependencies ```bash pip install -e . ``` ### 3. Configure environment Create a `.env` file: ```bash # Core settings SERVER_NAME=PrintCast Agent DEBUG=false # Asterisk settings ASTERISK_HOST=localhost ASTERISK_PORT=5038 ASTERISK_USERNAME=admin ASTERISK_PASSWORD=your_password # ElevenLabs settings ELEVENLABS_API_KEY=your_api_key ELEVENLABS_VOICE_ID=voice_id # Content sources GITHUB_TOKEN=optional_token NEWS_API_KEY=optional_key RSS_FEEDS=https://news.ycombinator.com/rss,https://feeds.feedburner.com/TechCrunch/ # Printing DEFAULT_PRINTER=default CUPS_SERVER=localhost:631 # Delivery DEFAULT_CARRIER=post SENDER_NAME=PrintCast SENDER_STREET=Your Street SENDER_CITY=Your City SENDER_POSTAL_CODE=12345 SENDER_COUNTRY=CZ # Carrier APIs (optional) ZASILKOVNA_API_KEY=your_key DPD_API_KEY=your_key PPL_API_KEY=your_key ``` ### 4. Run the MCP server ```bash python -m mcp_server.main ``` ## ๐Ÿณ Docker Deployment ### Build the container ```bash podman build -t printcast-agent -f Containerfile . ``` ### Run with Podman ```bash podman run -d \ --name printcast \ -p 8000:8000 \ -p 5038:5038 \ -p 5060:5060 \ -v ./config:/app/config \ --env-file .env \ printcast-agent ``` ## ๐Ÿ“ž Workflow Example 1. **User calls the service** โ†’ Asterisk receives call 2. **AI agent greets user** โ†’ "Welcome to PrintCast! What would you like to print today?" 3. **Content selection** โ†’ User chooses GitHub trending, RSS, or news 4. **Agent reads options** โ†’ "Here are today's top 5 trending repositories..." 5. **User selects items** โ†’ Via voice or DTMF keys 6. **Address collection** โ†’ User provides delivery address 7. **Order confirmation** โ†’ Agent confirms selection and address 8. **Processing** โ†’ System generates PDF, prints, and arranges delivery 9. **Completion** โ†’ User receives tracking number via SMS ## ๐Ÿ› ๏ธ MCP Tools Available The server provides these MCP tools: - `handle_incoming_call` - Process incoming phone calls - `fetch_trending_content` - Get trending content from various sources - `process_user_selection` - Handle user's content selection - `generate_print_preview` - Create print preview - `get_delivery_quote` - Get shipping cost estimate - `end_call_session` - Terminate call session ## ๐Ÿ“Š Monitoring The server provides real-time monitoring through MCP resources: - `resource://sessions/active` - Active call sessions - `resource://config/services` - Service configuration status - `resource://metrics/daily` - Daily usage metrics ## ๐Ÿงช Testing Run tests with pytest: ```bash pytest tests/ -v --cov=src ``` ## ๐Ÿ“ฆ Project Structure ``` printcast-agent/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ mcp_server/ # MCP server implementation โ”‚ โ”œโ”€โ”€ integrations/ # Service integrations โ”‚ โ”‚ โ”œโ”€โ”€ asterisk.py # SIP/telephony โ”‚ โ”‚ โ”œโ”€โ”€ elevenlabs.py # AI voice agent โ”‚ โ”‚ โ”œโ”€โ”€ content.py # Content fetching โ”‚ โ”‚ โ”œโ”€โ”€ printing.py # Print management โ”‚ โ”‚ โ””โ”€โ”€ delivery.py # Shipping services โ”‚ โ”œโ”€โ”€ orchestration/ # Workflow engine โ”‚ โ””โ”€โ”€ utils/ # Utilities โ”œโ”€โ”€ config/ # Configuration files โ”œโ”€โ”€ scripts/ # Deployment scripts โ”œโ”€โ”€ tests/ # Test suite โ”œโ”€โ”€ Containerfile # Container definition โ””โ”€โ”€ pyproject.toml # Project metadata ``` ## ๐Ÿค Integration with MCP Clients ### With Cursor Agent ```bash # Add to Cursor's MCP settings { "printcast": { "command": "python", "args": ["-m", "mcp_server.main"], "cwd": "/path/to/printcast-agent" } } ``` ### With Gemini CLI ```bash # Configure Gemini to use PrintCast MCP server gemini config add-server printcast http://localhost:8000 ``` ## ๐Ÿ“š API Documentation ### Starting a workflow ```python # MCP tool call await handle_incoming_call( caller_id="+420123456789", language="cs" ) ``` ### Fetching content ```python # Get trending GitHub repos repos = await fetch_trending_content( content_type="github", limit=5, language="python" ) ``` ### Processing order ```python # Process user selection result = await process_user_selection( session_id="call_20240101_120000", selected_items=["gh_openai_gpt", "gh_astro_framework"], delivery_address="Vรกclavskรฉ nรกmฤ›stรญ 1, Praha, 11000", delivery_method="post" ) ``` ## ๐Ÿ”’ Security Considerations - All API keys should be kept secure - Use HTTPS/TLS for production deployments - Implement rate limiting for API endpoints - Validate and sanitize all user inputs - Regular security audits recommended ## ๐Ÿ“„ License MIT License - see LICENSE file for details ## ๐Ÿ™ Acknowledgments - ElevenLabs for conversational AI capabilities - Asterisk community for telephony infrastructure - MCP protocol developers - Open source contributors ## ๐Ÿ“ฎ Contact For questions and support: - GitHub Issues: [Report bugs](https://github.com/yourusername/printcast-agent/issues) - Email: team@printcast.ai --- **PrintCast Agent** - Bridging the digital and physical worlds through voice ๐ŸŽ™๏ธโ†’๐Ÿ“„โ†’๐Ÿ“ฎ

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sparesparrow/mcp-project-orchestrator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server