stravinsky 0.2.11__tar.gz

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.
Files changed (63) hide show
  1. stravinsky-0.2.11/.github/workflows/publish.yml +38 -0
  2. stravinsky-0.2.11/.gitignore +35 -0
  3. stravinsky-0.2.11/.mcp.json +3 -0
  4. stravinsky-0.2.11/.stravinsky/agents/agent_9b9fd4f0.log +0 -0
  5. stravinsky-0.2.11/.stravinsky/agents/agent_9b9fd4f0.out +1 -0
  6. stravinsky-0.2.11/.stravinsky/agents.json +1 -0
  7. stravinsky-0.2.11/CLAUDE.md +192 -0
  8. stravinsky-0.2.11/PKG-INFO +210 -0
  9. stravinsky-0.2.11/README.md +178 -0
  10. stravinsky-0.2.11/assets/logo.png +0 -0
  11. stravinsky-0.2.11/assets/logo.png.txt +2 -0
  12. stravinsky-0.2.11/assets/logo_small.png +0 -0
  13. stravinsky-0.2.11/error.log +4 -0
  14. stravinsky-0.2.11/install_native_hooks.py +53 -0
  15. stravinsky-0.2.11/mcp_bridge/__init__.py +1 -0
  16. stravinsky-0.2.11/mcp_bridge/auth/__init__.py +32 -0
  17. stravinsky-0.2.11/mcp_bridge/auth/cli.py +215 -0
  18. stravinsky-0.2.11/mcp_bridge/auth/oauth.py +418 -0
  19. stravinsky-0.2.11/mcp_bridge/auth/openai_oauth.py +350 -0
  20. stravinsky-0.2.11/mcp_bridge/auth/token_store.py +195 -0
  21. stravinsky-0.2.11/mcp_bridge/config/__init__.py +14 -0
  22. stravinsky-0.2.11/mcp_bridge/config/hooks.py +174 -0
  23. stravinsky-0.2.11/mcp_bridge/hooks/__init__.py +28 -0
  24. stravinsky-0.2.11/mcp_bridge/hooks/budget_optimizer.py +38 -0
  25. stravinsky-0.2.11/mcp_bridge/hooks/compaction.py +32 -0
  26. stravinsky-0.2.11/mcp_bridge/hooks/directory_context.py +40 -0
  27. stravinsky-0.2.11/mcp_bridge/hooks/edit_recovery.py +41 -0
  28. stravinsky-0.2.11/mcp_bridge/hooks/manager.py +77 -0
  29. stravinsky-0.2.11/mcp_bridge/hooks/truncator.py +19 -0
  30. stravinsky-0.2.11/mcp_bridge/native_hooks/context.py +38 -0
  31. stravinsky-0.2.11/mcp_bridge/native_hooks/edit_recovery.py +46 -0
  32. stravinsky-0.2.11/mcp_bridge/native_hooks/truncator.py +23 -0
  33. stravinsky-0.2.11/mcp_bridge/prompts/__init__.py +18 -0
  34. stravinsky-0.2.11/mcp_bridge/prompts/delphi.py +110 -0
  35. stravinsky-0.2.11/mcp_bridge/prompts/dewey.py +183 -0
  36. stravinsky-0.2.11/mcp_bridge/prompts/document_writer.py +155 -0
  37. stravinsky-0.2.11/mcp_bridge/prompts/explore.py +118 -0
  38. stravinsky-0.2.11/mcp_bridge/prompts/frontend.py +112 -0
  39. stravinsky-0.2.11/mcp_bridge/prompts/multimodal.py +58 -0
  40. stravinsky-0.2.11/mcp_bridge/prompts/stravinsky.py +345 -0
  41. stravinsky-0.2.11/mcp_bridge/server.py +501 -0
  42. stravinsky-0.2.11/mcp_bridge/server_tools.py +531 -0
  43. stravinsky-0.2.11/mcp_bridge/tools/__init__.py +37 -0
  44. stravinsky-0.2.11/mcp_bridge/tools/agent_manager.py +786 -0
  45. stravinsky-0.2.11/mcp_bridge/tools/background_tasks.py +166 -0
  46. stravinsky-0.2.11/mcp_bridge/tools/code_search.py +301 -0
  47. stravinsky-0.2.11/mcp_bridge/tools/continuous_loop.py +67 -0
  48. stravinsky-0.2.11/mcp_bridge/tools/init.py +50 -0
  49. stravinsky-0.2.11/mcp_bridge/tools/lsp/__init__.py +29 -0
  50. stravinsky-0.2.11/mcp_bridge/tools/lsp/tools.py +526 -0
  51. stravinsky-0.2.11/mcp_bridge/tools/model_invoke.py +297 -0
  52. stravinsky-0.2.11/mcp_bridge/tools/project_context.py +141 -0
  53. stravinsky-0.2.11/mcp_bridge/tools/session_manager.py +302 -0
  54. stravinsky-0.2.11/mcp_bridge/tools/skill_loader.py +212 -0
  55. stravinsky-0.2.11/mcp_bridge/tools/task_runner.py +97 -0
  56. stravinsky-0.2.11/mcp_bridge/tools/templates.py +94 -0
  57. stravinsky-0.2.11/mcp_bridge/utils/__init__.py +1 -0
  58. stravinsky-0.2.11/pyproject.toml +70 -0
  59. stravinsky-0.2.11/stdout_handshake_auditor.py +85 -0
  60. stravinsky-0.2.11/tests/manual_test_hooks.py +57 -0
  61. stravinsky-0.2.11/tests/test_hooks.py +56 -0
  62. stravinsky-0.2.11/uv.lock +1483 -0
  63. stravinsky-0.2.11/verify_tools.py +43 -0
@@ -0,0 +1,38 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*" # Trigger on version tags like v0.2.9
7
+ workflow_dispatch: # Allow manual trigger
8
+
9
+ jobs:
10
+ build-and-publish:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write # Required for trusted publishing
14
+ contents: read
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v4
27
+ with:
28
+ version: "latest"
29
+
30
+ - name: Build package
31
+ run: uv build
32
+
33
+ - name: Publish to PyPI
34
+ uses: pypa/gh-action-pypi-publish@release/v1
35
+ with:
36
+ # Uses trusted publishing - no token needed if configured on PyPI
37
+ # Fallback to token if trusted publishing not set up:
38
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,35 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ .Python
6
+ build/
7
+ develop-eggs/
8
+ dist/
9
+ downloads/
10
+ eggs/
11
+ .eggs/
12
+ lib/
13
+ lib64/
14
+ parts/
15
+ sdist/
16
+ var/
17
+ wheels/
18
+ *.egg-info/
19
+ .installed.cfg
20
+ *.egg
21
+ .env
22
+ .venv
23
+ env/
24
+ venv/
25
+ stravinsky/
26
+ .vscode/
27
+ .idea/
28
+ *.swp
29
+ *.swo
30
+ *~
31
+ .DS_Store
32
+ .gemini/
33
+ .claude/
34
+ # .mcp.json
35
+ # uv.lock
@@ -0,0 +1,3 @@
1
+ {
2
+ "mcpServers": {}
3
+ }
@@ -0,0 +1 @@
1
+ There are **27 `.py` files** in `./mcp_bridge`.
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,192 @@
1
+ # Stravinsky - MCP Bridge (Claude Code Bridge)
2
+
3
+ **Claude Code MCP server** for multi-model orchestration with OAuth authentication.
4
+
5
+ ## Commands
6
+
7
+ ### Authentication
8
+
9
+ ```bash
10
+ # Login
11
+ stravinsky-auth login gemini
12
+ stravinsky-auth login openai
13
+
14
+ # Status
15
+ stravinsky-auth status
16
+
17
+ # Logout
18
+ stravinsky-auth logout gemini
19
+ ```
20
+
21
+ ## Setup in Claude Code
22
+
23
+ ### Installation
24
+
25
+ **Option 1: From PyPI (Recommended)**
26
+
27
+ ```bash
28
+ # One-shot installation with uvx
29
+ claude mcp add stravinsky -- uvx stravinsky
30
+
31
+ # Or install globally first
32
+ uv tool install stravinsky
33
+ claude mcp add stravinsky -- stravinsky
34
+ ```
35
+
36
+ **Option 2: From Source (Development)**
37
+
38
+ ```bash
39
+ # Install from local source
40
+ uv tool install --editable .
41
+ claude mcp add stravinsky -- stravinsky
42
+ ```
43
+
44
+ ### Slash Commands (Skills)
45
+
46
+ - `/stravinsky`: Task Orchestrator & Planner
47
+ - `/delphi`: Architecture & Debug Advisor
48
+ - `/dewey`: Documentation & Research
49
+ - `/context`: Refresh Git/Rules/Todo context
50
+ - `/health`: Comprehensive system check
51
+
52
+ ## OAuth Flows
53
+
54
+ ### Gemini (Google Antigravity)
55
+
56
+ - Browser-based OAuth 2.0 with PKCE
57
+ - Uses same credentials as Stravinsky
58
+ - Supports automatic token refresh
59
+
60
+ ### OpenAI (ChatGPT Plus/Pro)
61
+
62
+ - Browser-based OAuth on port 1455 (same as Codex CLI)
63
+ - Requires ChatGPT Plus/Pro subscription
64
+ - Supports automatic token refresh
65
+
66
+ ## Tools (31)
67
+
68
+ | Category | Tools |
69
+ | ---------------- | ---------------------------------------------------------------------------------- |
70
+ | **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
71
+ | **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
72
+ | **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
73
+ | **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
74
+ | **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
75
+ | **Sessions** | `session_list`, `session_read`, `session_search` |
76
+ | **Skills** | `skill_list`, `skill_get` |
77
+
78
+ ### Agent Tools
79
+
80
+ Spawn background agents with **full tool access** via Claude Code CLI:
81
+
82
+ - `agent_spawn(prompt, agent_type, description)` - Launch background agent
83
+ - `agent_output(task_id, block)` - Get output (block=true to wait)
84
+ - `agent_progress(task_id, lines)` - Real-time progress monitoring
85
+ - `agent_cancel(task_id)` - Cancel running agent
86
+ - `agent_list()` - List all agent tasks
87
+
88
+ ### LSP Tools (10)
89
+
90
+ Full Language Server Protocol support for Python (via jedi):
91
+
92
+ - `lsp_hover` - Type info and docs at position
93
+ - `lsp_goto_definition` - Jump to symbol definition
94
+ - `lsp_find_references` - Find all usages
95
+ - `lsp_document_symbols` - File outline
96
+ - `lsp_workspace_symbols` - Search symbols by name
97
+ - `lsp_prepare_rename` - Validate rename
98
+ - `lsp_rename` - Rename symbol across workspace
99
+ - `lsp_code_actions` - Quick fixes and refactorings
100
+ - `lsp_servers` - List available LSP servers
101
+ - `lsp_diagnostics` - Errors and warnings
102
+
103
+ ### AST-Grep Tools
104
+
105
+ - `ast_grep_search` - AST-aware code pattern search
106
+ - `ast_grep_replace` - AST-aware code replacement
107
+
108
+ ## Agent Prompts (7)
109
+
110
+ | Prompt | Purpose |
111
+ | ----------------- | ------------------------------------------------------------- |
112
+ | `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
113
+ | `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
114
+ | `dewey` | Documentation and multi-repository research specialist. |
115
+ | `explore` | Specialized for codebase-wide search and structural analysis. |
116
+ | `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
117
+ | `document_writer` | Technical documentation and specification writer. |
118
+ | `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
119
+
120
+ ## Project Structure
121
+
122
+ ```
123
+ stravinsky/
124
+ ├── mcp_bridge/ # Python MCP server
125
+ │ ├── server.py # Entry point
126
+ │ ├── auth/ # OAuth (Google & OpenAI)
127
+ │ ├── tools/ # Model invoke, search, skills
128
+ │ ├── prompts/ # Agent system prompts (Stravinsky, Delphi, Dewey, etc.)
129
+ │ └── config/ # Bridge configuration
130
+ ├── .mcp.json # Claude Code config
131
+ ├── pyproject.toml # Build system
132
+ └── CLAUDE.md # This guide
133
+ ```
134
+
135
+ ## Architecture
136
+
137
+ 1. **MCP Transport**: Uses standard input/output for interaction with Claude Code.
138
+ 2. **Dynamic Tokens**: OAuth tokens are stored in the system keyring and refreshed on demand.
139
+ 3. **Specialized Models**:
140
+ - `invoke_gemini`: Best for UI, images, and creative generation.
141
+ - `invoke_openai`: Best for complex reasoning and strategic advice.
142
+ 4. **Tool Integrity**: All tools match the behavior of the original TypeScript implementation but are ported to native Python for speed and reliability.
143
+
144
+ ## Troubleshooting
145
+
146
+ ### OpenAI "Port 1455 in use"
147
+
148
+ The Codex CLI uses the same port. Stop it with: `killall codex`
149
+
150
+ ### OpenAI Authentication Failed
151
+
152
+ - Ensure you have a ChatGPT Plus/Pro subscription.
153
+ - Tokens expire occasionally; run `python -m mcp_bridge.auth.cli login openai` to refresh manually if automatic refresh fails.
154
+
155
+ ## Stravinsky MCP (Parallel Agents)
156
+
157
+ Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
158
+
159
+ ### Agent Tools
160
+
161
+ - `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
162
+ - `agent_output(task_id, block)` - Get results (block=True to wait)
163
+ - `agent_progress(task_id)` - Check real-time progress
164
+ - `agent_list()` - Overview of all running agents
165
+ - `agent_cancel(task_id)` - Stop a running agent
166
+
167
+ ### Agent Types
168
+
169
+ - `explore` - Codebase search, "where is X?" questions
170
+ - `dewey` - Documentation research, implementation examples
171
+ - `frontend` - UI/UX work, component design
172
+ - `delphi` - Strategic advice, architecture review
173
+
174
+ ### Parallel Execution (MANDATORY)
175
+
176
+ For ANY task with 2+ independent steps:
177
+
178
+ 1. **Immediately use agent_spawn** for each independent component
179
+ 2. Fire all agents simultaneously, don't wait
180
+ 3. Monitor with agent_progress, collect with agent_output
181
+
182
+ ### ULTRATHINK / ULTRAWORK
183
+
184
+ - **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
185
+ - **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
186
+
187
+ ---
188
+
189
+ ## Learn More
190
+
191
+ - [PyPI Package](https://pypi.org/project/stravinsky/)
192
+ - [Documentation](https://github.com/GratefulDave/stravinsky)
@@ -0,0 +1,210 @@
1
+ Metadata-Version: 2.4
2
+ Name: stravinsky
3
+ Version: 0.2.11
4
+ Summary: MCP Bridge for Claude Code with Multi-Model Support. Install globally: claude mcp add --scope user stravinsky -- uvx stravinsky. Add to CLAUDE.md: See https://pypi.org/project/stravinsky/
5
+ Project-URL: Repository, https://github.com/GratefulDave/stravinsky
6
+ Project-URL: Issues, https://github.com/GratefulDave/stravinsky/issues
7
+ Author: Stravinsky Team
8
+ License: MIT
9
+ Keywords: claude,gemini,mcp,oauth,openai
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: aiofiles>=23.1.0
12
+ Requires-Dist: cryptography>=41.0.0
13
+ Requires-Dist: google-auth-oauthlib>=1.0.0
14
+ Requires-Dist: google-auth>=2.20.0
15
+ Requires-Dist: httpx>=0.24.0
16
+ Requires-Dist: jedi>=0.19.2
17
+ Requires-Dist: keyring>=25.7.0
18
+ Requires-Dist: mcp>=1.2.1
19
+ Requires-Dist: openai>=1.0.0
20
+ Requires-Dist: psutil>=5.9.0
21
+ Requires-Dist: pydantic>=2.0.0
22
+ Requires-Dist: python-dotenv>=1.0.0
23
+ Requires-Dist: rich>=13.0.0
24
+ Requires-Dist: ruff>=0.14.10
25
+ Requires-Dist: tenacity>=8.5.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
28
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ <div align="center">
34
+ <img src="https://raw.githubusercontent.com/GratefulDave/stravinsky/main/assets/logo.png" width="300" alt="Stravinsky Logo">
35
+ <h1>Stravinsky</h1>
36
+ <p><strong>The Avant-Garde MCP Bridge for Claude Code</strong></p>
37
+ <p><em>Movement • Rhythm • Precision</em></p>
38
+ </div>
39
+
40
+ ---
41
+
42
+ ## What is Stravinsky?
43
+
44
+ **Multi-model AI orchestration** with OAuth authentication for Claude Code.
45
+
46
+ ## Features
47
+
48
+ - 🔐 **OAuth Authentication** - Secure browser-based auth for Google (Gemini) and OpenAI (ChatGPT)
49
+ - 🤖 **Multi-Model Support** - Seamlessly invoke Gemini and GPT models from Claude
50
+ - 🛠️ **31 MCP Tools** - Model invocation, code search, LSP integrations, session management, and more
51
+ - 🧠 **7 Specialized Agents** - Stravinsky (orchestrator), Delphi (advisor), Dewey (documentation), and more
52
+ - 🔄 **Background Tasks** - Spawn parallel agents with full tool access via Claude Code CLI
53
+ - 📝 **LSP Integration** - Full Language Server Protocol support for Python (jedi)
54
+ - 🔍 **AST-Aware Search** - Structural code search and refactoring with ast-grep
55
+
56
+ ## Quick Start
57
+
58
+ ### Installation
59
+
60
+ **From PyPI (Recommended):**
61
+
62
+ ```bash
63
+ # One-shot with uvx - no installation needed!
64
+ claude mcp add stravinsky -- uvx stravinsky
65
+
66
+ # Or install globally first:
67
+ uv tool install stravinsky
68
+ claude mcp add stravinsky -- stravinsky
69
+ ```
70
+
71
+ **From Source (for development):**
72
+
73
+ ```bash
74
+ uv tool install --editable /path/to/stravinsky
75
+ claude mcp add stravinsky -- stravinsky
76
+ ```
77
+
78
+ ### Authentication
79
+
80
+ ````bash
81
+ # Login to Google (Gemini)
82
+ stravinsky-auth login gemini
83
+
84
+ # Login to OpenAI (ChatGPT Plus/Pro required)
85
+ stravinsky-auth login openai
86
+
87
+ # Check status
88
+ stravinsky-auth status
89
+
90
+ # Logout
91
+ stravinsky-auth logout gemini
92
+
93
+ ### Repo Auto-Initialization
94
+
95
+ Bootstrap any repository for Stravinsky in one command:
96
+
97
+ ```bash
98
+ # In the root of your project:
99
+ stravinsky-auth init
100
+ ````
101
+
102
+ This will:
103
+
104
+ 1. Create/Update `CLAUDE.md` with Stravinsky parallel execution rules.
105
+ 2. Install standard slash commands into `.claude/commands/stra/`.
106
+
107
+ ````
108
+
109
+ ## Add to Your CLAUDE.md
110
+
111
+ After installing globally, add this to your project's `CLAUDE.md`:
112
+
113
+ ```markdown
114
+ ## Stravinsky MCP (Parallel Agents)
115
+
116
+ Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
117
+
118
+ ### Agent Tools
119
+
120
+ - `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
121
+ - `agent_output(task_id, block)` - Get results (block=True to wait)
122
+ - `agent_progress(task_id)` - Check real-time progress
123
+ - `agent_list()` - Overview of all running agents
124
+ - `agent_cancel(task_id)` - Stop a running agent
125
+
126
+ ### Agent Types
127
+
128
+ - `explore` - Codebase search, "where is X?" questions
129
+ - `dewey` - Documentation research, implementation examples
130
+ - `frontend` - UI/UX work, component design
131
+ - `delphi` - Strategic advice, architecture review
132
+
133
+ ### Parallel Execution (MANDATORY)
134
+
135
+ For ANY task with 2+ independent steps:
136
+
137
+ 1. **Immediately use agent_spawn** for each independent component
138
+ 2. Fire all agents simultaneously, don't wait
139
+ 3. Monitor with agent_progress, collect with agent_output
140
+
141
+ ### ULTRATHINK / ULTRAWORK
142
+
143
+ - **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
144
+ - **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
145
+ ````
146
+
147
+ ## Tools (31)
148
+
149
+ | Category | Tools |
150
+ | ---------------- | ---------------------------------------------------------------------------------- |
151
+ | **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
152
+ | **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
153
+ | **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
154
+ | **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
155
+ | **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
156
+ | **Sessions** | `session_list`, `session_read`, `session_search` |
157
+ | **Skills** | `skill_list`, `skill_get` |
158
+
159
+ ## Agent Prompts (7)
160
+
161
+ | Prompt | Purpose |
162
+ | ----------------- | ------------------------------------------------------------- |
163
+ | `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
164
+ | `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
165
+ | `dewey` | Documentation and multi-repository research specialist. |
166
+ | `explore` | Specialized for codebase-wide search and structural analysis. |
167
+ | `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
168
+ | `document_writer` | Technical documentation and specification writer. |
169
+ | `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
170
+
171
+ ## Development
172
+
173
+ ```bash
174
+ # Install in development mode
175
+ uv pip install -e .
176
+
177
+ # Run server
178
+ stravinsky
179
+ ```
180
+
181
+ ## Project Structure
182
+
183
+ ```
184
+ stravinsky/
185
+ ├── mcp_bridge/ # Python MCP server
186
+ │ ├── server.py # Entry point
187
+ │ ├── auth/ # OAuth (Google & OpenAI)
188
+ │ ├── tools/ # Model invoke, search, skills
189
+ │ ├── prompts/ # Agent system prompts
190
+ │ └── config/ # Bridge configuration
191
+ ├── pyproject.toml # Build system
192
+ └── README.md # This file
193
+ ```
194
+
195
+ ## Troubleshooting
196
+
197
+ ### OpenAI "Port 1455 in use"
198
+
199
+ The Codex CLI uses the same port. Stop it with: `killall codex`
200
+
201
+ ### OpenAI Authentication Failed
202
+
203
+ - Ensure you have a ChatGPT Plus/Pro subscription
204
+ - Tokens expire occasionally; run `stravinsky-auth login openai` to refresh
205
+
206
+ ## License
207
+
208
+ MIT
209
+
210
+ ---
@@ -0,0 +1,178 @@
1
+ <div align="center">
2
+ <img src="https://raw.githubusercontent.com/GratefulDave/stravinsky/main/assets/logo.png" width="300" alt="Stravinsky Logo">
3
+ <h1>Stravinsky</h1>
4
+ <p><strong>The Avant-Garde MCP Bridge for Claude Code</strong></p>
5
+ <p><em>Movement • Rhythm • Precision</em></p>
6
+ </div>
7
+
8
+ ---
9
+
10
+ ## What is Stravinsky?
11
+
12
+ **Multi-model AI orchestration** with OAuth authentication for Claude Code.
13
+
14
+ ## Features
15
+
16
+ - 🔐 **OAuth Authentication** - Secure browser-based auth for Google (Gemini) and OpenAI (ChatGPT)
17
+ - 🤖 **Multi-Model Support** - Seamlessly invoke Gemini and GPT models from Claude
18
+ - 🛠️ **31 MCP Tools** - Model invocation, code search, LSP integrations, session management, and more
19
+ - 🧠 **7 Specialized Agents** - Stravinsky (orchestrator), Delphi (advisor), Dewey (documentation), and more
20
+ - 🔄 **Background Tasks** - Spawn parallel agents with full tool access via Claude Code CLI
21
+ - 📝 **LSP Integration** - Full Language Server Protocol support for Python (jedi)
22
+ - 🔍 **AST-Aware Search** - Structural code search and refactoring with ast-grep
23
+
24
+ ## Quick Start
25
+
26
+ ### Installation
27
+
28
+ **From PyPI (Recommended):**
29
+
30
+ ```bash
31
+ # One-shot with uvx - no installation needed!
32
+ claude mcp add stravinsky -- uvx stravinsky
33
+
34
+ # Or install globally first:
35
+ uv tool install stravinsky
36
+ claude mcp add stravinsky -- stravinsky
37
+ ```
38
+
39
+ **From Source (for development):**
40
+
41
+ ```bash
42
+ uv tool install --editable /path/to/stravinsky
43
+ claude mcp add stravinsky -- stravinsky
44
+ ```
45
+
46
+ ### Authentication
47
+
48
+ ````bash
49
+ # Login to Google (Gemini)
50
+ stravinsky-auth login gemini
51
+
52
+ # Login to OpenAI (ChatGPT Plus/Pro required)
53
+ stravinsky-auth login openai
54
+
55
+ # Check status
56
+ stravinsky-auth status
57
+
58
+ # Logout
59
+ stravinsky-auth logout gemini
60
+
61
+ ### Repo Auto-Initialization
62
+
63
+ Bootstrap any repository for Stravinsky in one command:
64
+
65
+ ```bash
66
+ # In the root of your project:
67
+ stravinsky-auth init
68
+ ````
69
+
70
+ This will:
71
+
72
+ 1. Create/Update `CLAUDE.md` with Stravinsky parallel execution rules.
73
+ 2. Install standard slash commands into `.claude/commands/stra/`.
74
+
75
+ ````
76
+
77
+ ## Add to Your CLAUDE.md
78
+
79
+ After installing globally, add this to your project's `CLAUDE.md`:
80
+
81
+ ```markdown
82
+ ## Stravinsky MCP (Parallel Agents)
83
+
84
+ Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
85
+
86
+ ### Agent Tools
87
+
88
+ - `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
89
+ - `agent_output(task_id, block)` - Get results (block=True to wait)
90
+ - `agent_progress(task_id)` - Check real-time progress
91
+ - `agent_list()` - Overview of all running agents
92
+ - `agent_cancel(task_id)` - Stop a running agent
93
+
94
+ ### Agent Types
95
+
96
+ - `explore` - Codebase search, "where is X?" questions
97
+ - `dewey` - Documentation research, implementation examples
98
+ - `frontend` - UI/UX work, component design
99
+ - `delphi` - Strategic advice, architecture review
100
+
101
+ ### Parallel Execution (MANDATORY)
102
+
103
+ For ANY task with 2+ independent steps:
104
+
105
+ 1. **Immediately use agent_spawn** for each independent component
106
+ 2. Fire all agents simultaneously, don't wait
107
+ 3. Monitor with agent_progress, collect with agent_output
108
+
109
+ ### ULTRATHINK / ULTRAWORK
110
+
111
+ - **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
112
+ - **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
113
+ ````
114
+
115
+ ## Tools (31)
116
+
117
+ | Category | Tools |
118
+ | ---------------- | ---------------------------------------------------------------------------------- |
119
+ | **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
120
+ | **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
121
+ | **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
122
+ | **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
123
+ | **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
124
+ | **Sessions** | `session_list`, `session_read`, `session_search` |
125
+ | **Skills** | `skill_list`, `skill_get` |
126
+
127
+ ## Agent Prompts (7)
128
+
129
+ | Prompt | Purpose |
130
+ | ----------------- | ------------------------------------------------------------- |
131
+ | `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
132
+ | `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
133
+ | `dewey` | Documentation and multi-repository research specialist. |
134
+ | `explore` | Specialized for codebase-wide search and structural analysis. |
135
+ | `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
136
+ | `document_writer` | Technical documentation and specification writer. |
137
+ | `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
138
+
139
+ ## Development
140
+
141
+ ```bash
142
+ # Install in development mode
143
+ uv pip install -e .
144
+
145
+ # Run server
146
+ stravinsky
147
+ ```
148
+
149
+ ## Project Structure
150
+
151
+ ```
152
+ stravinsky/
153
+ ├── mcp_bridge/ # Python MCP server
154
+ │ ├── server.py # Entry point
155
+ │ ├── auth/ # OAuth (Google & OpenAI)
156
+ │ ├── tools/ # Model invoke, search, skills
157
+ │ ├── prompts/ # Agent system prompts
158
+ │ └── config/ # Bridge configuration
159
+ ├── pyproject.toml # Build system
160
+ └── README.md # This file
161
+ ```
162
+
163
+ ## Troubleshooting
164
+
165
+ ### OpenAI "Port 1455 in use"
166
+
167
+ The Codex CLI uses the same port. Stop it with: `killall codex`
168
+
169
+ ### OpenAI Authentication Failed
170
+
171
+ - Ensure you have a ChatGPT Plus/Pro subscription
172
+ - Tokens expire occasionally; run `stravinsky-auth login openai` to refresh
173
+
174
+ ## License
175
+
176
+ MIT
177
+
178
+ ---
Binary file
@@ -0,0 +1,2 @@
1
+ # Placeholder - will be replaced with actual logo
2
+ # For now, README will use generic image
Binary file
@@ -0,0 +1,4 @@
1
+ Building stravinsky @ file:///Users/davidandrews/PycharmProjects/stravinsky
2
+ Built stravinsky @ file:///Users/davidandrews/PycharmProjects/stravinsky
3
+ Installed 61 packages in 150ms
4
+ INFO:mcp_bridge.server:Starting Stravinsky MCP Bridge Server...