stravinsky 0.1.12__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.
Potentially problematic release.
This version of stravinsky might be problematic. Click here for more details.
- stravinsky-0.1.12/.gitignore +35 -0
- stravinsky-0.1.12/.mcp.json +3 -0
- stravinsky-0.1.12/.stravinsky/agents/agent_9b9fd4f0.log +0 -0
- stravinsky-0.1.12/.stravinsky/agents/agent_9b9fd4f0.out +1 -0
- stravinsky-0.1.12/.stravinsky/agents.json +17 -0
- stravinsky-0.1.12/CLAUDE.md +192 -0
- stravinsky-0.1.12/PKG-INFO +198 -0
- stravinsky-0.1.12/README.md +167 -0
- stravinsky-0.1.12/assets/logo.png +0 -0
- stravinsky-0.1.12/assets/logo.png.txt +2 -0
- stravinsky-0.1.12/assets/logo_small.png +0 -0
- stravinsky-0.1.12/mcp_bridge/__init__.py +5 -0
- stravinsky-0.1.12/mcp_bridge/auth/__init__.py +32 -0
- stravinsky-0.1.12/mcp_bridge/auth/cli.py +208 -0
- stravinsky-0.1.12/mcp_bridge/auth/oauth.py +418 -0
- stravinsky-0.1.12/mcp_bridge/auth/openai_oauth.py +350 -0
- stravinsky-0.1.12/mcp_bridge/auth/token_store.py +195 -0
- stravinsky-0.1.12/mcp_bridge/config/__init__.py +14 -0
- stravinsky-0.1.12/mcp_bridge/config/hooks.py +174 -0
- stravinsky-0.1.12/mcp_bridge/prompts/__init__.py +18 -0
- stravinsky-0.1.12/mcp_bridge/prompts/delphi.py +110 -0
- stravinsky-0.1.12/mcp_bridge/prompts/dewey.py +183 -0
- stravinsky-0.1.12/mcp_bridge/prompts/document_writer.py +155 -0
- stravinsky-0.1.12/mcp_bridge/prompts/explore.py +118 -0
- stravinsky-0.1.12/mcp_bridge/prompts/frontend.py +112 -0
- stravinsky-0.1.12/mcp_bridge/prompts/multimodal.py +58 -0
- stravinsky-0.1.12/mcp_bridge/prompts/stravinsky.py +329 -0
- stravinsky-0.1.12/mcp_bridge/server.py +866 -0
- stravinsky-0.1.12/mcp_bridge/tools/__init__.py +31 -0
- stravinsky-0.1.12/mcp_bridge/tools/agent_manager.py +665 -0
- stravinsky-0.1.12/mcp_bridge/tools/background_tasks.py +166 -0
- stravinsky-0.1.12/mcp_bridge/tools/code_search.py +301 -0
- stravinsky-0.1.12/mcp_bridge/tools/continuous_loop.py +67 -0
- stravinsky-0.1.12/mcp_bridge/tools/lsp/__init__.py +29 -0
- stravinsky-0.1.12/mcp_bridge/tools/lsp/tools.py +526 -0
- stravinsky-0.1.12/mcp_bridge/tools/model_invoke.py +233 -0
- stravinsky-0.1.12/mcp_bridge/tools/project_context.py +141 -0
- stravinsky-0.1.12/mcp_bridge/tools/session_manager.py +302 -0
- stravinsky-0.1.12/mcp_bridge/tools/skill_loader.py +212 -0
- stravinsky-0.1.12/mcp_bridge/tools/task_runner.py +97 -0
- stravinsky-0.1.12/mcp_bridge/utils/__init__.py +1 -0
- stravinsky-0.1.12/pyproject.toml +69 -0
- stravinsky-0.1.12/uv.lock +1503 -0
|
@@ -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
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
There are **27 `.py` files** in `./mcp_bridge`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent_9b9fd4f0": {
|
|
3
|
+
"id": "agent_9b9fd4f0",
|
|
4
|
+
"prompt": "Count the number of .py files in ./mcp_bridge",
|
|
5
|
+
"agent_type": "explore",
|
|
6
|
+
"description": "Count Python files",
|
|
7
|
+
"status": "running",
|
|
8
|
+
"created_at": "2026-01-01T17:39:29.807394",
|
|
9
|
+
"parent_session_id": null,
|
|
10
|
+
"started_at": "2026-01-01T17:39:29.807732",
|
|
11
|
+
"completed_at": null,
|
|
12
|
+
"result": null,
|
|
13
|
+
"error": null,
|
|
14
|
+
"pid": 26959,
|
|
15
|
+
"progress": null
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -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,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stravinsky
|
|
3
|
+
Version: 0.1.12
|
|
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.0.0
|
|
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
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff>=0.4.0; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
<div align="center">
|
|
33
|
+
<img src="https://raw.githubusercontent.com/GratefulDave/stravinsky/main/assets/logo.png" width="300" alt="Stravinsky Logo">
|
|
34
|
+
<h1>Stravinsky</h1>
|
|
35
|
+
<p><strong>The Avant-Garde MCP Bridge for Claude Code</strong></p>
|
|
36
|
+
<p><em>Movement • Rhythm • Precision</em></p>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## What is Stravinsky?
|
|
42
|
+
|
|
43
|
+
**Multi-model AI orchestration** with OAuth authentication for Claude Code.
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- 🔐 **OAuth Authentication** - Secure browser-based auth for Google (Gemini) and OpenAI (ChatGPT)
|
|
48
|
+
- 🤖 **Multi-Model Support** - Seamlessly invoke Gemini and GPT models from Claude
|
|
49
|
+
- 🛠️ **31 MCP Tools** - Model invocation, code search, LSP integrations, session management, and more
|
|
50
|
+
- 🧠 **7 Specialized Agents** - Stravinsky (orchestrator), Delphi (advisor), Dewey (documentation), and more
|
|
51
|
+
- 🔄 **Background Tasks** - Spawn parallel agents with full tool access via Claude Code CLI
|
|
52
|
+
- 📝 **LSP Integration** - Full Language Server Protocol support for Python (jedi)
|
|
53
|
+
- 🔍 **AST-Aware Search** - Structural code search and refactoring with ast-grep
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
### Installation
|
|
58
|
+
|
|
59
|
+
**From PyPI (Recommended):**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# One-shot with uvx - no installation needed!
|
|
63
|
+
claude mcp add stravinsky -- uvx stravinsky
|
|
64
|
+
|
|
65
|
+
# Or install globally first:
|
|
66
|
+
uv tool install stravinsky
|
|
67
|
+
claude mcp add stravinsky -- stravinsky
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**From Source (for development):**
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uv tool install --editable /path/to/stravinsky
|
|
74
|
+
claude mcp add stravinsky -- stravinsky
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Authentication
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Login to Google (Gemini)
|
|
81
|
+
stravinsky-auth login gemini
|
|
82
|
+
|
|
83
|
+
# Login to OpenAI (ChatGPT Plus/Pro required)
|
|
84
|
+
stravinsky-auth login openai
|
|
85
|
+
|
|
86
|
+
# Check status
|
|
87
|
+
stravinsky-auth status
|
|
88
|
+
|
|
89
|
+
# Logout
|
|
90
|
+
stravinsky-auth logout gemini
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Add to Your CLAUDE.md
|
|
94
|
+
|
|
95
|
+
After installing globally, add this to your project's `CLAUDE.md`:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## Stravinsky MCP (Parallel Agents)
|
|
99
|
+
|
|
100
|
+
Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
|
|
101
|
+
|
|
102
|
+
### Agent Tools
|
|
103
|
+
|
|
104
|
+
- `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
|
|
105
|
+
- `agent_output(task_id, block)` - Get results (block=True to wait)
|
|
106
|
+
- `agent_progress(task_id)` - Check real-time progress
|
|
107
|
+
- `agent_list()` - Overview of all running agents
|
|
108
|
+
- `agent_cancel(task_id)` - Stop a running agent
|
|
109
|
+
|
|
110
|
+
### Agent Types
|
|
111
|
+
|
|
112
|
+
- `explore` - Codebase search, "where is X?" questions
|
|
113
|
+
- `dewey` - Documentation research, implementation examples
|
|
114
|
+
- `frontend` - UI/UX work, component design
|
|
115
|
+
- `delphi` - Strategic advice, architecture review
|
|
116
|
+
|
|
117
|
+
### Parallel Execution (MANDATORY)
|
|
118
|
+
|
|
119
|
+
For ANY task with 2+ independent steps:
|
|
120
|
+
|
|
121
|
+
1. **Immediately use agent_spawn** for each independent component
|
|
122
|
+
2. Fire all agents simultaneously, don't wait
|
|
123
|
+
3. Monitor with agent_progress, collect with agent_output
|
|
124
|
+
|
|
125
|
+
### ULTRATHINK / ULTRAWORK
|
|
126
|
+
|
|
127
|
+
- **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
|
|
128
|
+
- **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Tools (31)
|
|
132
|
+
|
|
133
|
+
| Category | Tools |
|
|
134
|
+
| ---------------- | ---------------------------------------------------------------------------------- |
|
|
135
|
+
| **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
|
|
136
|
+
| **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
|
|
137
|
+
| **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
|
|
138
|
+
| **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
|
|
139
|
+
| **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
|
|
140
|
+
| **Sessions** | `session_list`, `session_read`, `session_search` |
|
|
141
|
+
| **Skills** | `skill_list`, `skill_get` |
|
|
142
|
+
|
|
143
|
+
## Agent Prompts (7)
|
|
144
|
+
|
|
145
|
+
| Prompt | Purpose |
|
|
146
|
+
| ----------------- | ------------------------------------------------------------- |
|
|
147
|
+
| `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
|
|
148
|
+
| `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
|
|
149
|
+
| `dewey` | Documentation and multi-repository research specialist. |
|
|
150
|
+
| `explore` | Specialized for codebase-wide search and structural analysis. |
|
|
151
|
+
| `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
|
|
152
|
+
| `document_writer` | Technical documentation and specification writer. |
|
|
153
|
+
| `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Install in development mode
|
|
159
|
+
uv pip install -e .
|
|
160
|
+
|
|
161
|
+
# Run server
|
|
162
|
+
stravinsky
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Project Structure
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
stravinsky/
|
|
169
|
+
├── mcp_bridge/ # Python MCP server
|
|
170
|
+
│ ├── server.py # Entry point
|
|
171
|
+
│ ├── auth/ # OAuth (Google & OpenAI)
|
|
172
|
+
│ ├── tools/ # Model invoke, search, skills
|
|
173
|
+
│ ├── prompts/ # Agent system prompts
|
|
174
|
+
│ └── config/ # Bridge configuration
|
|
175
|
+
├── pyproject.toml # Build system
|
|
176
|
+
└── README.md # This file
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Troubleshooting
|
|
180
|
+
|
|
181
|
+
### OpenAI "Port 1455 in use"
|
|
182
|
+
|
|
183
|
+
The Codex CLI uses the same port. Stop it with: `killall codex`
|
|
184
|
+
|
|
185
|
+
### OpenAI Authentication Failed
|
|
186
|
+
|
|
187
|
+
- Ensure you have a ChatGPT Plus/Pro subscription
|
|
188
|
+
- Tokens expire occasionally; run `stravinsky-auth login openai` to refresh
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
MIT
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
<div align="center">
|
|
197
|
+
<small>Built with obsession by the Google Deepmind team.</small>
|
|
198
|
+
</div>
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
|
|
62
|
+
## Add to Your CLAUDE.md
|
|
63
|
+
|
|
64
|
+
After installing globally, add this to your project's `CLAUDE.md`:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Stravinsky MCP (Parallel Agents)
|
|
68
|
+
|
|
69
|
+
Use Stravinsky MCP tools. **DEFAULT: spawn parallel agents for multi-step tasks.**
|
|
70
|
+
|
|
71
|
+
### Agent Tools
|
|
72
|
+
|
|
73
|
+
- `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access
|
|
74
|
+
- `agent_output(task_id, block)` - Get results (block=True to wait)
|
|
75
|
+
- `agent_progress(task_id)` - Check real-time progress
|
|
76
|
+
- `agent_list()` - Overview of all running agents
|
|
77
|
+
- `agent_cancel(task_id)` - Stop a running agent
|
|
78
|
+
|
|
79
|
+
### Agent Types
|
|
80
|
+
|
|
81
|
+
- `explore` - Codebase search, "where is X?" questions
|
|
82
|
+
- `dewey` - Documentation research, implementation examples
|
|
83
|
+
- `frontend` - UI/UX work, component design
|
|
84
|
+
- `delphi` - Strategic advice, architecture review
|
|
85
|
+
|
|
86
|
+
### Parallel Execution (MANDATORY)
|
|
87
|
+
|
|
88
|
+
For ANY task with 2+ independent steps:
|
|
89
|
+
|
|
90
|
+
1. **Immediately use agent_spawn** for each independent component
|
|
91
|
+
2. Fire all agents simultaneously, don't wait
|
|
92
|
+
3. Monitor with agent_progress, collect with agent_output
|
|
93
|
+
|
|
94
|
+
### ULTRATHINK / ULTRAWORK
|
|
95
|
+
|
|
96
|
+
- **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis
|
|
97
|
+
- **ULTRAWORK**: Maximum parallel execution - spawn agents aggressively for every subtask
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Tools (31)
|
|
101
|
+
|
|
102
|
+
| Category | Tools |
|
|
103
|
+
| ---------------- | ---------------------------------------------------------------------------------- |
|
|
104
|
+
| **Model Invoke** | `invoke_gemini`, `invoke_openai`, `get_system_health` |
|
|
105
|
+
| **Environment** | `get_project_context`, `task_spawn`, `task_status`, `task_list` |
|
|
106
|
+
| **Agents** | `agent_spawn`, `agent_output`, `agent_cancel`, `agent_list`, `agent_progress` |
|
|
107
|
+
| **Code Search** | `ast_grep_search`, `ast_grep_replace`, `grep_search`, `glob_files` |
|
|
108
|
+
| **LSP** | `lsp_diagnostics`, `lsp_hover`, `lsp_goto_definition`, `lsp_find_references`, etc. |
|
|
109
|
+
| **Sessions** | `session_list`, `session_read`, `session_search` |
|
|
110
|
+
| **Skills** | `skill_list`, `skill_get` |
|
|
111
|
+
|
|
112
|
+
## Agent Prompts (7)
|
|
113
|
+
|
|
114
|
+
| Prompt | Purpose |
|
|
115
|
+
| ----------------- | ------------------------------------------------------------- |
|
|
116
|
+
| `stravinsky` | Task orchestration, planning, and goal-oriented execution. |
|
|
117
|
+
| `delphi` | Strategic technical advisor (GPT-based) for hard debugging. |
|
|
118
|
+
| `dewey` | Documentation and multi-repository research specialist. |
|
|
119
|
+
| `explore` | Specialized for codebase-wide search and structural analysis. |
|
|
120
|
+
| `frontend` | UI/UX Engineer (Gemini-optimized) for component prototyping. |
|
|
121
|
+
| `document_writer` | Technical documentation and specification writer. |
|
|
122
|
+
| `multimodal` | Visual analysis expert for UI screenshots and diagrams. |
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Install in development mode
|
|
128
|
+
uv pip install -e .
|
|
129
|
+
|
|
130
|
+
# Run server
|
|
131
|
+
stravinsky
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Project Structure
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
stravinsky/
|
|
138
|
+
├── mcp_bridge/ # Python MCP server
|
|
139
|
+
│ ├── server.py # Entry point
|
|
140
|
+
│ ├── auth/ # OAuth (Google & OpenAI)
|
|
141
|
+
│ ├── tools/ # Model invoke, search, skills
|
|
142
|
+
│ ├── prompts/ # Agent system prompts
|
|
143
|
+
│ └── config/ # Bridge configuration
|
|
144
|
+
├── pyproject.toml # Build system
|
|
145
|
+
└── README.md # This file
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Troubleshooting
|
|
149
|
+
|
|
150
|
+
### OpenAI "Port 1455 in use"
|
|
151
|
+
|
|
152
|
+
The Codex CLI uses the same port. Stop it with: `killall codex`
|
|
153
|
+
|
|
154
|
+
### OpenAI Authentication Failed
|
|
155
|
+
|
|
156
|
+
- Ensure you have a ChatGPT Plus/Pro subscription
|
|
157
|
+
- Tokens expire occasionally; run `stravinsky-auth login openai` to refresh
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
<div align="center">
|
|
166
|
+
<small>Built with obsession by the Google Deepmind team.</small>
|
|
167
|
+
</div>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Authentication module
|
|
2
|
+
from .token_store import TokenStore, TokenData
|
|
3
|
+
from .oauth import (
|
|
4
|
+
perform_oauth_flow as gemini_oauth_flow,
|
|
5
|
+
refresh_access_token as gemini_refresh_token,
|
|
6
|
+
ANTIGRAVITY_CLIENT_ID,
|
|
7
|
+
ANTIGRAVITY_SCOPES,
|
|
8
|
+
ANTIGRAVITY_HEADERS,
|
|
9
|
+
)
|
|
10
|
+
from .openai_oauth import (
|
|
11
|
+
perform_oauth_flow as openai_oauth_flow,
|
|
12
|
+
refresh_access_token as openai_refresh_token,
|
|
13
|
+
CLIENT_ID as OPENAI_CLIENT_ID,
|
|
14
|
+
OPENAI_CALLBACK_PORT,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
# Token Store
|
|
19
|
+
"TokenStore",
|
|
20
|
+
"TokenData",
|
|
21
|
+
# Gemini OAuth
|
|
22
|
+
"gemini_oauth_flow",
|
|
23
|
+
"gemini_refresh_token",
|
|
24
|
+
"ANTIGRAVITY_CLIENT_ID",
|
|
25
|
+
"ANTIGRAVITY_SCOPES",
|
|
26
|
+
"ANTIGRAVITY_HEADERS",
|
|
27
|
+
# OpenAI OAuth
|
|
28
|
+
"openai_oauth_flow",
|
|
29
|
+
"openai_refresh_token",
|
|
30
|
+
"OPENAI_CLIENT_ID",
|
|
31
|
+
"OPENAI_CALLBACK_PORT",
|
|
32
|
+
]
|