Skip to content

Commit 2da6269

Browse files
authored
Basic MCP server support - no oauth token refresh yet (#126)
* xed ios wizard * mcp connector ui * try to connect to mcp server * log requests * add mcp extensions screen * improve mcp auth ui * save auth plan for later * plan for mcp detail screen * configure mcp server * enable / disable mcp extensions * wire up mcp tools * getOrCreateMcpClient(serverUrl)` always created clients with no auth token. * document mcp support * document mcp * code rabbit review: All three functions now go through the shared cache helpers (`setCachedValue`, `getCachedValue`, `deleteCachedValue`), which keep SecureStore and the in-memory cache in sync — matching the pattern used by every other token in the file.
1 parent b1f0155 commit 2da6269

15 files changed

Lines changed: 1871 additions & 12 deletions

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ An open-source voice assistant for iOS that connects to your data and the web.
88
**Current features**:
99

1010
* Voice interaction via OpenAI Realtime API (note: secure API key storage in iOS keychain)
11-
* Connectors: DeepWiki MCP, Google Drive, GitHub, Hugging Face Papers, Hacker News, Web Search
11+
* Connectors: DeepWiki MCP, Google Drive, GitHub, Hugging Face Papers, Hacker News, Web Search, **MCP** *(user-defined; can be enabled in settings)*
1212

1313
**Roadmap**:
1414

@@ -354,7 +354,9 @@ All connectors use statically defined tools with explicit function definitions,
354354

355355
### MCP Support
356356

357-
Not yet implemented since all tools are currently local. Future versions will add MCP server support via cloud or local tunnel connections.
357+
**MCP** *(can be enabled in settings)*: Connects to external MCP servers via a streamable HTTP endpoint. The MCP connector includes a configuration UI where you specify a Name, MCP Server URL (the HTTP endpoint), and an optional Bearer Token for authentication. The Bearer Token is sent as an `Authorization: Bearer` header on every request. The connector can be enabled or disabled in settings; when disabled, MCP features are hidden.
358+
359+
> **Note:** Only static bearer tokens are supported at this time. OAuth token refresh is not yet implemented.
358360
359361
### Web Search
360362

@@ -372,7 +374,6 @@ OpenAI is currently the only supported backend. Adding support for multiple prov
372374
1. Improve text mode support
373375
1. Investigate async voice processing to reduce cost
374376
1. Add support for alternative voice providers ([Unmute.sh](https://unmute.sh/), [Speaches.ai](https://speaches.ai), self-hosted)
375-
1. Remote MCP integration
376377
1. TypeScript MCP plugin support
377378

378379
## 🤝 How You Can Help

‎app/index.tsx‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { ConfigureTranscription } from "../components/settings/ConfigureTranscri
1616
import { ConfigureVad } from "../components/settings/ConfigureVad";
1717
import { ConfigureVoice } from "../components/settings/ConfigureVoice";
1818
import { ConnectorsConfig } from "../components/settings/ConnectorsConfig";
19+
import { McpExtensionsScreen } from "../components/settings/McpExtensionsScreen";
1920
import { DeveloperMode } from "../components/ui/DeveloperMode";
2021
import { HamburgerButton } from "../components/ui/HamburgerButton";
2122
import {
@@ -101,6 +102,7 @@ export default function Index() {
101102
const [apiKeyConfigVisible, setApiKeyConfigVisible] = useState(false);
102103
const [developerModeVisible, setDeveloperModeVisible] = useState(false);
103104
const [connectorsConfigVisible, setConnectorsConfigVisible] = useState(false);
105+
const [mcpExtensionsVisible, setMcpExtensionsVisible] = useState(false);
104106
const [advancedConfigVisible, setAdvancedConfigVisible] = useState(false);
105107
const [configureToolsVisible, setConfigureToolsVisible] = useState(false);
106108
const [baseConnectionOptions, setBaseConnectionOptions] =
@@ -403,6 +405,11 @@ export default function Index() {
403405
return;
404406
}
405407

408+
if (section.id === "mcp_extensions") {
409+
setMcpExtensionsVisible(true);
410+
return;
411+
}
412+
406413
if (section.id === "apiKey") {
407414
setApiKeyConfigVisible(true);
408415
return;
@@ -600,6 +607,10 @@ export default function Index() {
600607
visible={connectorsConfigVisible}
601608
onClose={() => setConnectorsConfigVisible(false)}
602609
/>
610+
<McpExtensionsScreen
611+
visible={mcpExtensionsVisible}
612+
onClose={() => setMcpExtensionsVisible(false)}
613+
/>
603614
<ConfigureApiKeyScreen
604615
visible={apiKeyConfigVisible}
605616
onClose={() => setApiKeyConfigVisible(false)}

‎components/settings/ConnectorsConfig.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const ConnectorsConfig: React.FC<ConnectorsConfigProps> = ({
4747
useState(false);
4848
const [githubLegacyInfoVisible, setGithubLegacyInfoVisible] = useState(false);
4949
const [gdriveLegacyInfoVisible, setGDriveLegacyInfoVisible] = useState(false);
50-
5150
const handleConnectorPress = (connectorId: ConnectorId) => {
5251
if (connectorId === "github") {
5352
setGithubConfigVisible(true);
@@ -194,6 +193,7 @@ export const ConnectorsConfig: React.FC<ConnectorsConfigProps> = ({
194193
visible={gdriveLegacyInfoVisible}
195194
onClose={() => setGDriveLegacyInfoVisible(false)}
196195
/>
196+
197197
</Modal>
198198
);
199199
};

0 commit comments

Comments
 (0)