@originalvoices/mcp-server 1.0.0 → 1.0.2
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.
- package/README.md +5 -3
- package/dist/index.js +78 -4
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# OriginalVoices MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@originalvoices/mcp-server)
|
|
4
|
+
|
|
3
5
|
An MCP (Model Context Protocol) server that provides access to [OriginalVoices](https://originalvoices.ai) AI twins for audience research.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -67,10 +69,10 @@ Ask questions to a specific audience using OriginalVoices AI twins.
|
|
|
67
69
|
|
|
68
70
|
```json
|
|
69
71
|
{
|
|
70
|
-
"audience": "
|
|
72
|
+
"audience": "UK, 18-30, fitness enthusiasts",
|
|
71
73
|
"questions": [
|
|
72
|
-
"
|
|
73
|
-
"How do you
|
|
74
|
+
"When purchasing running shoes, what's most important to you?",
|
|
75
|
+
"How often do you replace your running shoes?"
|
|
74
76
|
]
|
|
75
77
|
}
|
|
76
78
|
```
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,22 @@ import { z } from "zod";
|
|
|
5
5
|
import OriginalVoices from "originalvoices";
|
|
6
6
|
const server = new McpServer({
|
|
7
7
|
name: "originalvoices",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.2",
|
|
9
9
|
});
|
|
10
10
|
const client = new OriginalVoices({
|
|
11
11
|
apiKey: process.env.ORIGINALVOICES_API_KEY,
|
|
12
12
|
});
|
|
13
|
-
server.tool("ask_twins", "Ask questions to a specific audience using Original Voices AI twins", {
|
|
14
|
-
audience: z
|
|
15
|
-
|
|
13
|
+
server.tool("ask_twins", "Ask questions to a specific audience using Original Voices AI twins. Use this for ad-hoc audience queries with a free-text audience description.", {
|
|
14
|
+
audience: z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(255)
|
|
18
|
+
.describe("The target audience to query. Typically includes demographics such as age range, gender, and location. Examples: 'Women aged 35-55 in the US and UK', 'Gen Z men (18-25) in urban areas'."),
|
|
19
|
+
questions: z
|
|
20
|
+
.array(z.string().min(1).max(2048))
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(15)
|
|
23
|
+
.describe("The questions to ask the Digital Twins. Open-ended questions work best."),
|
|
16
24
|
}, async ({ audience, questions }) => {
|
|
17
25
|
const response = await client.ask.open({
|
|
18
26
|
questions,
|
|
@@ -27,6 +35,72 @@ server.tool("ask_twins", "Ask questions to a specific audience using Original Vo
|
|
|
27
35
|
],
|
|
28
36
|
};
|
|
29
37
|
});
|
|
38
|
+
server.tool("ask_audience", "Ask questions to a previously saved audience by its ID. Use list_projects first to discover projects and their audiences.", {
|
|
39
|
+
audienceId: z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1)
|
|
42
|
+
.describe("The audience ID to query. Obtain IDs from list_projects."),
|
|
43
|
+
questions: z
|
|
44
|
+
.array(z.string().min(1).max(2048))
|
|
45
|
+
.min(1)
|
|
46
|
+
.max(15)
|
|
47
|
+
.describe("The questions to ask the Digital Twins. Open-ended questions work best."),
|
|
48
|
+
}, async ({ audienceId, questions }) => {
|
|
49
|
+
const response = await client.ask.open({
|
|
50
|
+
questions,
|
|
51
|
+
audienceId,
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
text: JSON.stringify(response.data, null, 2),
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
server.tool("ask_project", "Ask questions to a filtered subset of a project's survey panel. Filters respondents by demographics and survey answers using natural language. Use list_projects first to see available projects.", {
|
|
63
|
+
projectId: z
|
|
64
|
+
.string()
|
|
65
|
+
.min(1)
|
|
66
|
+
.describe("The project ID to query. Obtain IDs from list_projects."),
|
|
67
|
+
filter: z
|
|
68
|
+
.string()
|
|
69
|
+
.min(1)
|
|
70
|
+
.max(1024)
|
|
71
|
+
.optional()
|
|
72
|
+
.describe("Optional natural language filter to select respondents. If omitted, all respondents are queried. Examples: 'Samsung users', 'women over 30 who worry about battery'."),
|
|
73
|
+
questions: z
|
|
74
|
+
.array(z.string().min(1).max(2048))
|
|
75
|
+
.min(1)
|
|
76
|
+
.max(15)
|
|
77
|
+
.describe("The questions to ask the Digital Twins. Open-ended questions work best."),
|
|
78
|
+
}, async ({ projectId, filter, questions }) => {
|
|
79
|
+
const response = await client.ask.project(projectId, {
|
|
80
|
+
questions,
|
|
81
|
+
filter,
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
content: [
|
|
85
|
+
{
|
|
86
|
+
type: "text",
|
|
87
|
+
text: JSON.stringify(response.data, null, 2),
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
server.tool("list_projects", "List all research projects in the user's organization. Each project contains survey questions and pre-defined audiences. Use this to discover projects before using ask_project or ask_audience.", {}, async () => {
|
|
93
|
+
// SDK projects.list() has a bug (hits /v1/audiences), so use client.get directly
|
|
94
|
+
const response = await client.get("/v1/projects");
|
|
95
|
+
return {
|
|
96
|
+
content: [
|
|
97
|
+
{
|
|
98
|
+
type: "text",
|
|
99
|
+
text: JSON.stringify(response.data, null, 2),
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
});
|
|
30
104
|
async function main() {
|
|
31
105
|
const transport = new StdioServerTransport();
|
|
32
106
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@originalvoices/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"mcpName": "io.github.ovlabs/originalvoices",
|
|
5
|
+
"description": "MCP server for OriginalVoices - Ask AI twins questions about any audience",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"bin": {
|
|
@@ -21,11 +22,11 @@
|
|
|
21
22
|
"twins",
|
|
22
23
|
"audience-research"
|
|
23
24
|
],
|
|
24
|
-
"author": "
|
|
25
|
+
"author": "OriginalVoices",
|
|
25
26
|
"license": "MIT",
|
|
26
27
|
"repository": {
|
|
27
28
|
"type": "git",
|
|
28
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/ovlabs/mcp-server-originalvoices.git"
|
|
29
30
|
},
|
|
30
31
|
"engines": {
|
|
31
32
|
"node": ">=20"
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
],
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
38
|
-
"originalvoices": "^0.
|
|
39
|
+
"originalvoices": "^0.14.1",
|
|
39
40
|
"zod": "^4.3.5"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|