Skip to content

Commit ad3e2bf

Browse files
author
Ubuntu
committed
docs: Add MCP integration documentation
- Add MCP badge to README - Add MCP Integration section explaining MCP support - Add MCP-INTEGRATION.md guide for configuring MCP servers - Add MCP-PROTOCOL-BLOG.md with protocol details - Add docs/README.md for documentation structure
1 parent 75c989e commit ad3e2bf

File tree

4 files changed

+455
-0
lines changed

4 files changed

+455
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![Electron](https://img.shields.io/badge/Electron-31.0.2-47848f.svg)](https://electronjs.org/)
33
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6.3-blue.svg)](https://www.typescriptlang.org/)
44
[![React](https://img.shields.io/badge/React-18.3.1-61dafb.svg)](https://reactjs.org/)
5+
[![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-1.0-blue.svg)](https://modelcontextprotocol.io/)
56

67
## 🎬 Preview
78

@@ -49,6 +50,16 @@ https://github.com/user-attachments/assets/0c181c70-d1f1-4c5d-a6f5-a73147e75182
4950
| **🛠️ Platform** | macOS/Windows/Linux, rate limit handling, multi-provider AI |
5051
| **🎨 UX** | Dark/light themes, resizable panels, kill switch, conversation history |
5152

53+
## 🔗 MCP Integration
54+
55+
SpeakMCP supports the Model Context Protocol (MCP) for extensible tool integration. Configure MCP servers to add:
56+
57+
- **Filesystem access** - Read/write files via voice
58+
- **GitHub management** - Issues, PRs, commits through conversation
59+
- **Database queries** - Query databases with natural language
60+
61+
📖 **[Read the MCP Integration Guide](./docs/MCP-INTEGRATION.md)**
62+
5263
## 🛠️ Development
5364

5465
```bash

docs/MCP-INTEGRATION.md

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
# MCP Server Integration Guide
2+
3+
SpeakMCP leverages the Model Context Protocol (MCP) to create a powerful voice-controlled personal AI assistant. This guide covers how to configure and use MCP servers with SpeakMCP.
4+
5+
## 🎯 Overview
6+
7+
SpeakMCP acts as an **MCP Client** that connects to any **MCP Server**, enabling:
8+
- Voice-controlled file operations
9+
- GitHub repository management via voice
10+
- Database queries through conversation
11+
- Custom tool integration
12+
13+
## 📦 Pre-built MCP Servers
14+
15+
### Core Servers (npm-based)
16+
17+
#### 1. Filesystem Server
18+
Access and modify files via voice commands.
19+
20+
```json
21+
{
22+
"mcpServers": {
23+
"filesystem": {
24+
"command": "npx",
25+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/files"]
26+
}
27+
}
28+
}
29+
```
30+
31+
**Voice Commands:**
32+
- "Read the README.md file"
33+
- "Create a new file called notes.txt"
34+
- "List all files in the project directory"
35+
36+
#### 2. GitHub Server
37+
Manage repositories, issues, and pull requests.
38+
39+
```json
40+
{
41+
"mcpServers": {
42+
"github": {
43+
"command": "npx",
44+
"args": ["-y", "@modelcontextprotocol/server-github"],
45+
"env": {
46+
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
47+
}
48+
}
49+
}
50+
}
51+
```
52+
53+
**Voice Commands:**
54+
- "Create a new issue titled 'Bug found'"
55+
- "Show me open pull requests"
56+
- "List recent commits"
57+
58+
#### 3. PostgreSQL Server
59+
Query databases through conversation.
60+
61+
```json
62+
{
63+
"mcpServers": {
64+
"postgres": {
65+
"command": "npx",
66+
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:password@localhost:5432/database"]
67+
}
68+
}
69+
}
70+
```
71+
72+
**Voice Commands:**
73+
- "Show me all users from the database"
74+
- "Count how many orders we have today"
75+
76+
## 🔧 Configuration
77+
78+
### Adding MCP Servers
79+
80+
1. Open SpeakMCP settings
81+
2. Navigate to **MCP Servers**
82+
3. Add your server configuration in JSON format:
83+
84+
```json
85+
{
86+
"mcpServers": {
87+
"server-name": {
88+
"command": "npx",
89+
"args": ["-y", "@package/name", "--flag", "value"],
90+
"env": {
91+
"API_KEY": "your-key"
92+
}
93+
}
94+
}
95+
}
96+
```
97+
98+
### Server Options
99+
100+
| Option | Type | Description |
101+
|--------|------|-------------|
102+
| `command` | string | Executable command (npx, path/to/binary) |
103+
| `args` | string[] | Command arguments |
104+
| `env` | object | Environment variables |
105+
| `disabled` | boolean | Disable server without removing |
106+
107+
## 🏗️ Architecture
108+
109+
```
110+
┌─────────────────────────────────────────────────────────┐
111+
│ SpeakMCP │
112+
│ ┌─────────────┐ ┌─────────────┐ ┌───────────────┐ │
113+
│ │ Voice Input │→│ MCP Client │→│ MCP Server(s) │ │
114+
│ └─────────────┘ └─────────────┘ └───────────────┘ │
115+
│ ↓ ↓ ↓ │
116+
│ ┌─────────────────────────────────────────────────┐ │
117+
│ │ AI Processing Layer │ │
118+
│ │ OpenAI / Groq / Gemini / Anthropic │ │
119+
│ └─────────────────────────────────────────────────┘ │
120+
│ ↓ │
121+
│ Output to Active App │
122+
└─────────────────────────────────────────────────────────┘
123+
```
124+
125+
## 🛠️ Custom MCP Server Development
126+
127+
### Quick Start
128+
129+
```typescript
130+
// server.ts
131+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
132+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
133+
import {
134+
CallToolRequestSchema,
135+
ListToolsRequestSchema,
136+
} from "@modelcontextprotocol/sdk/types.js";
137+
138+
const server = new Server(
139+
{ name: "my-custom-server", version: "1.0.0" },
140+
{ capabilities: { tools: {} } }
141+
);
142+
143+
// Define your tools
144+
const TOOLS = {
145+
my_tool: {
146+
name: "my_tool",
147+
description: "Does something useful",
148+
inputSchema: {
149+
type: "object",
150+
properties: {
151+
param1: { type: "string", description: "First parameter" },
152+
},
153+
required: ["param1"],
154+
},
155+
},
156+
};
157+
158+
// List available tools
159+
server.setRequestHandler(ListToolsRequestSchema, async () => {
160+
return { tools: Object.values(TOOLS) };
161+
});
162+
163+
// Handle tool calls
164+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
165+
const { name, arguments: args } = request.params;
166+
167+
if (name === "my_tool") {
168+
const result = await myToolFunction(args.param1);
169+
return { content: [{ type: "text", text: result }] };
170+
}
171+
172+
throw new Error(`Unknown tool: ${name}`);
173+
});
174+
175+
async function myToolFunction(param1: string) {
176+
// Your logic here
177+
return `Processed: ${param1}`;
178+
}
179+
180+
// Start the server
181+
const transport = new StdioServerTransport();
182+
server.connect(transport);
183+
```
184+
185+
### Register Custom Server in SpeakMCP
186+
187+
```json
188+
{
189+
"mcpServers": {
190+
"my-custom": {
191+
"command": "node",
192+
"args": ["/path/to/your/server.js"]
193+
}
194+
}
195+
}
196+
```
197+
198+
## 📚 Use Cases
199+
200+
### 1. Developer Workflow
201+
```
202+
Voice: "Create a new React component for user profile"
203+
→ MCP filesystem server creates file
204+
→ MCP GitHub server creates branch
205+
→ SpeakMCP outputs: Component ready for editing
206+
```
207+
208+
### 2. Data Analysis
209+
```
210+
Voice: "Show me sales data from last week"
211+
→ MCP PostgreSQL server runs query
212+
→ AI summarizes: "Revenue up 15%..."
213+
```
214+
215+
### 3. Content Creation
216+
```
217+
Voice: "Write a blog post about MCP Protocol"
218+
→ MCP filesystem reads reference files
219+
→ AI generates draft
220+
→ Output to your editor
221+
```
222+
223+
## 🔐 Security
224+
225+
- **Local execution**: MCP servers run locally, no data sent externally
226+
- **OAuth 2.1**: Secure authentication for cloud services
227+
- **Environment variables**: Keep API keys out of config files
228+
229+
## 🚀 Community Servers
230+
231+
| Server | Purpose | Install |
232+
|--------|---------|---------|
233+
| `@modelcontextprotocol/server-filesystem` | File operations | `npx -y @modelcontextprotocol/server-filesystem /path` |
234+
| `@modelcontextprotocol/server-github` | GitHub integration | `npx -y @modelcontextprotocol/server-github` |
235+
| `@modelcontextprotocol/server-postgres` | PostgreSQL queries | `npx -y @modelcontextprotocol/server-postgres <connection>` |
236+
| `@modelcontextprotocol/server-google-maps` | Maps & location | `npx -y @modelcontextprotocol/server-google-maps` |
237+
238+
## 📖 Resources
239+
240+
- [MCP Protocol Documentation](https://modelcontextprotocol.io/)
241+
- [SpeakMCP GitHub](https://github.com/aj47/SpeakMCP)
242+
- [MCP Server Registry](https://github.com/modelcontextprotocol/servers)
243+
244+
---
245+
246+
*Part of the SpeakMCP Documentation Suite*

0 commit comments

Comments
 (0)