Skip to content

feat: wire MCP bridge, OpenAI routing, and persistent voice agent#1

Open
rapdev-turner wants to merge 2 commits intomainfrom
feat/jarvis-mcp-openai-autovault
Open

feat: wire MCP bridge, OpenAI routing, and persistent voice agent#1
rapdev-turner wants to merge 2 commits intomainfrom
feat/jarvis-mcp-openai-autovault

Conversation

@rapdev-turner
Copy link
Copy Markdown
Owner

Summary

  • MCP bridge: new src/openjarvis/mcp/claude_bridge.py reads ~/.claude/settings.json and spawns configured MCP servers (Slack, GitHub, Apple) as subprocesses via StdioTransport, exposing their tools natively to any agent
  • StdioTransport: add env parameter so MCP servers inherit the correct credentials at spawn time
  • jarvis_voice.py: full rewrite as an in-process persistent OrchestratorAgent
    • conversation history maintained across all turns in a session
    • SOUL.md + USER.md injected as system prompt at startup
    • Obsidian vault content retrieved semantically per query
    • --model flag for runtime model selection (Claude default, GPT-4o when OPENAI_API_KEY is present)
    • --no-mcp flag to skip MCP server startup for faster iteration

Test plan

  • uv run python jarvis_voice.py --no-mcp — verifies agent initializes with Claude, vault retrieval, and profile tools
  • uv run python jarvis_voice.py — verifies Slack, GitHub, Apple MCP servers connect and report tool counts on startup
  • Ask a question that requires vault context — verify relevant Obsidian notes appear in response
  • Ask Jarvis to update the user profile — verify ~/.openjarvis/USER.md is modified via user_profile_manage
  • uv run python jarvis_voice.py --model gpt-4o with OPENAI_API_KEY set — verifies OpenAI routing

- StdioTransport: add env parameter so MCP server subprocesses inherit
  the correct credentials from Claude Code config
- mcp/claude_bridge.py: new module that reads ~/.claude/settings.json and
  spawns configured MCP servers (Slack, GitHub, Apple) as native tools
- jarvis_voice.py: full rewrite as in-process persistent OrchestratorAgent
  - conversation history maintained across all turns in a session
  - SOUL.md + USER.md injected as system prompt at startup
  - Obsidian vault context retrieved semantically per query
  - MCP tools loaded at startup (--no-mcp flag to skip)
  - --model flag for runtime model selection (claude-sonnet-4-6 default,
    gpt-4o when OPENAI_API_KEY is present)
- Replace hasattr function-attribute state with module-level None sentinels
  in jarvis_voice.py (cleaner lazy init pattern)
- Replace print() calls with logger.info/warning in claude_bridge.py
  (library code must not write to stdout)
- Add StdioTransport env parameter tests: verify vars reach subprocess,
  verify default-None backward compatibility
- Add full test suite for claude_bridge: config loading, merging,
  missing/malformed files, tool discovery, failure isolation, env passthrough
- Add pytest to dev dependencies
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