polydev-ai 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,160 +1,217 @@
1
- # Polydev AI MCP Server
1
+ # Polydev AI
2
2
 
3
- Get diverse AI perspectives from multiple LLMs via Model Context Protocol (MCP). Supports Cline, Claude Code, and other MCP clients with local CLI detection and remote AI perspectives.
3
+ **Advanced Model Context Protocol Platform with Multi-LLM Integrations**
4
+
5
+ [polydev.ai](https://polydev.ai) | Live Platform
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ Polydev AI is an advanced Model Context Protocol (MCP) platform providing comprehensive multi-LLM integrations, subscription-based CLI access, OAuth bridges, and advanced tooling for AI development.
4
12
 
5
13
  ## Features
6
14
 
7
- - 🤖 **Multi-Model AI Perspectives**: Get responses from GPT-4, Claude, Gemini, and more
8
- - 🔧 **Local CLI Detection**: Automatically detect and use Claude Code, Codex CLI, Gemini CLI
9
- - ⚡ **Smart Caching**: Intelligent refresh intervals based on CLI status
10
- - 🔄 **Fallback Support**: Local CLI + remote perspectives for comprehensive responses
11
- - 🔐 **Secure**: Token-based authentication with your Polydev account
15
+ ### 🤖 Comprehensive LLM Integration
12
16
 
13
- ## Installation
17
+ - **API-Based Providers**: Direct integration with 8+ providers (Anthropic, OpenAI, Google, etc.)
18
+ - **Subscription-Based CLI Access**: Use your existing ChatGPT Plus, Claude Pro, GitHub Copilot subscriptions
19
+ - **Unified Interface**: Single API for all providers with consistent streaming responses
20
+ - **Auto-Detection**: Automatic CLI tool discovery and path configuration
14
21
 
15
- ### For Claude Code Users
22
+ ### 🔧 CLI Provider Support
16
23
 
17
- ```bash
18
- # Install globally
19
- npm install -g polydev-ai
24
+ | Provider | Integration | Authentication |
25
+ |----------|-------------|----------------|
26
+ | **Codex CLI** | Access GPT-5 with high reasoning | ChatGPT Plus subscription |
27
+ | **Claude Code CLI** | Claude via Anthropic | Anthropic Pro subscription |
28
+ | **Gemini CLI** | Google Cloud | Google Cloud authentication |
29
+ | **GitHub Copilot** | VS Code Language Model API | GitHub Copilot subscription |
20
30
 
21
- # Or use directly with npx
22
- npx polydev-ai
23
- ```
31
+ ### 🛠 Advanced Tooling
24
32
 
25
- ### For Cline Users
26
-
27
- Add to your MCP settings (`.cline/mcp_servers.json`):
28
-
29
- ```json
30
- {
31
- "mcpServers": {
32
- "polydev": {
33
- "command": "npx",
34
- "args": ["polydev-ai"],
35
- "env": {
36
- "POLYDEV_USER_TOKEN": "your_token_here"
37
- }
38
- }
39
- }
40
- }
41
- ```
33
+ - **Model Context Protocol (MCP)**: Hosted MCP server with OAuth authentication
34
+ - **Multi-Authentication**: Both OAuth and API token support for maximum flexibility
35
+ - **Process Execution**: Cross-platform CLI management with timeout handling
36
+ - **Path Auto-Discovery**: Smart detection of CLI installations across Windows, macOS, Linux
37
+ - **Real-time Status**: Live CLI availability and authentication checking
42
38
 
43
- ## Configuration
39
+ ### 🔒 Security & Authentication
44
40
 
45
- ### Get Your Token
41
+ - **Encrypted Storage**: Browser-based API key encryption using SubtleCrypto API
42
+ - **OAuth Bridges**: Secure authentication flows
43
+ - **Subscription Auth**: No API costs - use existing subscriptions
44
+ - **Local Storage**: Keys never leave your device
46
45
 
47
- 1. Sign up at [polydev.ai](https://polydev.ai)
48
- 2. Go to your dashboard and copy your MCP token
49
- 3. Set the environment variable:
46
+ ### 📊 Monitoring & Analytics
50
47
 
51
- ```bash
52
- export POLYDEV_USER_TOKEN="pd_your_token_here"
53
- ```
48
+ - **PostHog Integration**: Advanced user analytics and feature tracking
49
+ - **BetterStack Monitoring**: System health and performance monitoring
50
+ - **Upstash Redis**: High-performance caching layer
51
+ - **Supabase Auth**: Robust authentication system
54
52
 
55
- ### Claude Code Integration
53
+ ## Tech Stack
56
54
 
57
- Add to your Claude Code MCP configuration:
55
+ | Layer | Technology |
56
+ |-------|------------|
57
+ | **Frontend** | Next.js 15 (App Router), React 18, TypeScript, Tailwind CSS, shadcn/ui |
58
+ | **Backend** | Supabase (PostgreSQL + Auth), Upstash Redis |
59
+ | **AI Integration** | Custom TypeScript handlers for 8+ LLM providers |
60
+ | **CLI Integration** | Cross-platform process execution utilities |
61
+ | **Streaming** | Server-Sent Events for real-time responses |
62
+ | **Monitoring** | PostHog Analytics, BetterStack |
58
63
 
59
- ```json
60
- "polydev": {
61
- "disabled": false,
62
- "timeout": 120,
63
- "type": "http",
64
- "url": "https://www.polydev.ai/api/mcp"
65
- },
66
- ```
64
+ ## Supported LLM Providers
67
65
 
68
- ## Available Tools
66
+ | Provider | Models | Context Window | Features |
67
+ |----------|--------|----------------|----------|
68
+ | **Anthropic** | Claude 3.5 Sonnet, Haiku, Opus | 200K tokens | Best for reasoning and code |
69
+ | **OpenAI** | GPT-4o, GPT-4 Turbo, GPT-3.5 | 128K tokens | Versatile, widely adopted |
70
+ | **Google Gemini** | Gemini 1.5 Pro, Flash | 1M+ tokens | Large context window |
71
+ | **OpenRouter** | 100+ models | Varies | Access to multiple providers |
72
+ | **Groq** | Open-source models | Varies | Ultra-fast inference |
73
+ | **Perplexity** | Search-optimized models | Varies | AI search and reasoning |
74
+ | **DeepSeek** | Reasoning models | Varies | Advanced reasoning capabilities |
75
+ | **Mistral AI** | European AI models | Varies | Strong performance, EU-based |
69
76
 
70
- - `get_perspectives` - Get AI responses from multiple models
71
- - `force_cli_detection` - Force detection of local CLI tools
72
- - `get_cli_status` - Check status of CLI tools (Claude Code, Codex, Gemini)
73
- - `send_cli_prompt` - Send prompts to local CLI with perspectives fallback
77
+ ## MCP Tools Available
74
78
 
75
- ## Usage Examples
79
+ - **Research**: Exa (web search), DeepWiki, Context7
80
+ - **Storage**: Supabase, Upstash Redis, Memory (knowledge graph)
81
+ - **Development**: GitHub, Git, Filesystem
82
+ - **Infrastructure**: Vercel, Stripe
83
+ - **AI**: Polydev (multi-model consultation)
84
+ - **Communication**: Resend (email)
76
85
 
77
- ### Get Multi-Model Perspectives
86
+ ## Architecture
78
87
 
79
- ```typescript
80
- // Use the get_perspectives tool
81
- {
82
- "prompt": "How do I optimize React performance?",
83
- "models": ["gpt-4", "claude-3-sonnet", "gemini-pro"]
84
- }
88
+ ```
89
+ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
90
+ │ Frontend UI │────│ Process Utils │────│ CLI Tools │
91
+ │ (React/TS) │ │ (Node.js) │ │ (External) │
92
+ └─────────────────┘ └──────────────────┘ └─────────────────┘
93
+ │ │ │
94
+ │ │ │
95
+ ▼ ▼ ▼
96
+ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
97
+ │ LLM Service │ │ CLI Handlers │ │ Subscriptions │
98
+ │ (Unified API) │ │ (Per Provider) │ │ (ChatGPT+, etc) │
99
+ └─────────────────┘ └──────────────────┘ └─────────────────┘
100
+ │ │
101
+ │ │
102
+ ▼ ▼
103
+ ┌─────────────────┐ ┌──────────────────┐
104
+ │ Supabase │ │ MCP Platform │
105
+ │ (Auth + DB) │ │ (16+ Tools) │
106
+ └─────────────────┘ └──────────────────┘
85
107
  ```
86
108
 
87
- ### Check CLI Status
109
+ ## Quick Start
88
110
 
89
- ```typescript
90
- // Check all CLI tools
91
- await get_cli_status({})
111
+ ### Prerequisites
92
112
 
93
- // Check specific tool
94
- await get_cli_status({ provider_id: "claude_code" })
95
- ```
113
+ - Node.js 18+
114
+ - npm or yarn package manager
115
+ - (Optional) CLI tools for subscription-based access:
116
+ - Codex CLI for ChatGPT Plus integration
117
+ - Claude Code CLI for Anthropic Pro integration
118
+ - Gemini CLI for Google Cloud integration
119
+ - VS Code with GitHub Copilot for Copilot integration
96
120
 
97
- ### Send CLI Prompt with Fallback
121
+ ### Installation
98
122
 
99
- ```typescript
100
- await send_cli_prompt({
101
- provider_id: "claude_code",
102
- prompt: "Write a Python function to parse JSON",
103
- mode: "args"
104
- })
105
- ```
123
+ ```bash
124
+ # Clone the repository
125
+ git clone https://github.com/backspacevenkat/polydev-ai.git
126
+ cd polydev-ai
106
127
 
107
- ## Supported CLI Tools
128
+ # Install dependencies
129
+ npm install
108
130
 
109
- - **Claude Code** (`claude`) - Anthropic's official CLI
110
- - **Codex CLI** (`codex`) - OpenAI's code CLI
111
- - **Gemini CLI** (`gemini`) - Google's Gemini CLI
131
+ # Configure environment variables
132
+ cp .env.example .env.local
112
133
 
113
- ## Smart Refresh System
134
+ # Start development server
135
+ npm run dev
136
+ ```
114
137
 
115
- The MCP server automatically detects CLI status changes:
138
+ Open the application at http://localhost:3000
116
139
 
117
- - **Unavailable CLIs**: Check every 2 minutes
118
- - **Unauthenticated CLIs**: Check every 3 minutes
119
- - **Working CLIs**: Check every 10 minutes
120
- - **Fallback detection**: Check every 5 minutes
140
+ ### Quick Configuration
141
+
142
+ 1. **API Key Setup**: Go to Settings → API Keys tab to configure traditional API access
143
+ 2. **CLI Setup**: Go to Settings → CLI Subscriptions tab to set up subscription-based access
144
+ 3. **Provider Selection**: Choose your preferred LLM provider from the dropdown
145
+ 4. **Test Integration**: Use the chat interface to test your configuration
121
146
 
122
147
  ## Environment Variables
123
148
 
124
- - `POLYDEV_USER_TOKEN` - Your Polydev authentication token (required)
125
- - `POLYDEV_CLI_DEBUG` - Enable CLI debugging output
126
- - `CLAUDE_CODE_PATH` - Custom path to Claude Code CLI
127
- - `CODEX_CLI_PATH` - Custom path to Codex CLI
128
- - `GEMINI_CLI_PATH` - Custom path to Gemini CLI
149
+ ```env
150
+ # Supabase
151
+ NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
152
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
153
+ SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
154
+
155
+ # PostHog Analytics
156
+ NEXT_PUBLIC_POSTHOG_KEY=your_posthog_key
157
+ NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
129
158
 
130
- ## Troubleshooting
159
+ # Upstash Redis
160
+ UPSTASH_REDIS_REST_URL=your_upstash_redis_url
161
+ UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token
162
+
163
+ # BetterStack Logging
164
+ BETTERSTACK_LOGS_TOKEN=your_betterstack_token
165
+ ```
131
166
 
132
- ### CLI Not Detected
167
+ ## CLI Provider Setup
133
168
 
134
- 1. Ensure the CLI is installed and in your PATH
135
- 2. Check authentication: `claude auth status` / `codex login status`
136
- 3. Enable debugging: `export POLYDEV_CLI_DEBUG=1`
169
+ ### Codex CLI (ChatGPT Plus Integration)
170
+
171
+ ```bash
172
+ # Install and authenticate
173
+ codex auth
174
+ codex --version
175
+ ```
137
176
 
138
- ### Token Issues
177
+ ### Claude Code CLI (Anthropic Pro Integration)
139
178
 
140
- 1. Verify your token at [polydev.ai/dashboard](https://polydev.ai/dashboard)
141
- 2. Ensure the token starts with `pd_`
142
- 3. Check environment variable is set correctly
179
+ ```bash
180
+ # Install and authenticate
181
+ claude login
182
+ claude --version
183
+ ```
143
184
 
144
- ### Permission Errors
185
+ ### Gemini CLI (Google Cloud Integration)
145
186
 
146
187
  ```bash
147
- # Fix npm permissions
148
- npm config set prefix '~/.npm-global'
149
- export PATH=~/.npm-global/bin:$PATH
188
+ # Install Google Cloud SDK and authenticate
189
+ gcloud auth login
190
+ gcloud auth application-default login
150
191
  ```
151
192
 
152
- ## Support
193
+ ### GitHub Copilot Integration
194
+
195
+ 1. Install VS Code with GitHub Copilot extension
196
+ 2. Sign in with your GitHub account that has Copilot access
197
+ 3. The application will detect VS Code and Copilot availability automatically
198
+
199
+ ## Development Status
153
200
 
154
- - 📧 Email: [support@polydev.ai](mailto:support@polydev.ai)
155
- - 📖 Docs: [polydev.ai/docs](https://polydev.ai/docs)
156
- - 🐛 Issues: [GitHub Issues](https://github.com/backspacevenkat/polydev-website/issues)
201
+ **Current Status**: Active Development
202
+
203
+ The platform is fully functional for:
204
+ - Multi-LLM chat interface with streaming
205
+ - API key management with client-side encryption
206
+ - CLI subscription integration
207
+ - MCP server with 16+ tools
208
+ - Real-time streaming responses
157
209
 
158
210
  ## License
159
211
 
160
- MIT License - see LICENSE file for details.
212
+ MIT
213
+
214
+ ## Links
215
+
216
+ - **Website**: [polydev.ai](https://polydev.ai)
217
+ - **Repository**: [github.com/backspacevenkat/polydev-ai](https://github.com/backspacevenkat/polydev-ai)