personascope-mcp 1.0.0

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.
Files changed (3) hide show
  1. package/README.md +65 -0
  2. package/index.js +117 -0
  3. package/package.json +14 -0
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # PersonaScope MCP Server
2
+
3
+ Access PersonaScope personality data from any MCP-compatible AI assistant (Claude Code, Cursor, Windsurf, etc.).
4
+
5
+ ## Installation
6
+
7
+ Add to your Claude Code configuration (`~/.claude/settings.json`):
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "personascope": {
13
+ "command": "npx",
14
+ "args": ["-y", "personascope-mcp"]
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ Or run locally:
21
+ ```bash
22
+ cd mcp-server
23
+ npm install
24
+ node index.js
25
+ ```
26
+
27
+ ## Available Tools
28
+
29
+ ### `lookup_personality_type`
30
+ Look up any of the 27 SBTI personality types by code.
31
+ ```
32
+ Input: { "code": "SLAY" }
33
+ Output: Full type data — archetype, tagline, description, strengths, blind spots
34
+ ```
35
+
36
+ ### `list_personality_types`
37
+ List all 27 SBTI types with their codes and archetypes.
38
+
39
+ ### `explain_trait`
40
+ Explain a Big Five personality trait and what scores mean.
41
+ ```
42
+ Input: { "trait": "openness" }
43
+ Output: Trait description, high/low descriptors, example behaviors
44
+ ```
45
+
46
+ ### `recommend_module`
47
+ Get a PersonaScope module recommendation based on a goal.
48
+ ```
49
+ Input: { "goal": "career clarity" }
50
+ Output: Recommended module with description and link
51
+ ```
52
+
53
+ ## Configuration
54
+
55
+ The server connects to `https://persona.sig.ai` by default. Override with:
56
+ ```bash
57
+ PERSONASCOPE_API_URL=http://localhost:3001 node index.js
58
+ ```
59
+
60
+ ## Data Source
61
+
62
+ All data comes from the PersonaScope Public API:
63
+ - `GET /api/public/types` — SBTI personality types
64
+ - `GET /api/public/traits` — Big Five traits
65
+ - API docs: https://persona.sig.ai/openapi.json
package/index.js ADDED
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
+ import { z } from "zod";
6
+
7
+ const API_BASE = process.env.PERSONASCOPE_API_URL || "https://persona.sig.ai";
8
+
9
+ async function fetchJSON(path) {
10
+ const res = await fetch(`${API_BASE}${path}`);
11
+ if (!res.ok) throw new Error(`API error: ${res.status}`);
12
+ return res.json();
13
+ }
14
+
15
+ // Module catalog for recommendations
16
+ const MODULES = [
17
+ { name: "Personality Assessment", url: "/modules/personality.html", keywords: ["personality", "big five", "traits", "mbti", "assessment", "test"], description: "50-question Big Five personality assessment with MBTI-style mapping. The foundation for all other modules." },
18
+ { name: "Talent Deep Dive", url: "/modules/talent.html", keywords: ["talent", "strengths", "skills", "career", "abilities", "working style"], description: "AI-guided conversation to identify your transferable strengths and natural working style." },
19
+ { name: "Dream Job Finder", url: "/modules/dream-job.html", keywords: ["job", "career", "work", "employment", "profession", "role"], description: "Match your personality to career environments where you'll thrive." },
20
+ { name: "Soul Mate Blueprint", url: "/modules/soul-mate.html", keywords: ["relationship", "love", "partner", "dating", "compatibility", "attachment"], description: "Explore your relationship patterns and compatibility needs." },
21
+ { name: "Dream Home Finder", url: "/modules/dream-home.html", keywords: ["home", "living", "house", "apartment", "space", "environment"], description: "Define your ideal living environment based on your nervous system needs." },
22
+ { name: "Dream Vacation Planner", url: "/modules/dream-vacation.html", keywords: ["vacation", "travel", "trip", "holiday", "adventure", "destination"], description: "Design travel experiences that restore your specific energy type." },
23
+ { name: "5/10 Year Vision", url: "/modules/vision.html", keywords: ["vision", "future", "goals", "planning", "life", "purpose", "direction"], description: "Convert ambition into a coherent life strategy aligned with your personality." },
24
+ { name: "SBTI Test", url: "/modules/sbti.html", keywords: ["sbti", "type", "archetype", "personality type", "which type"], description: "27 unique personality archetypes. Fun, shareable, uncomfortably accurate." },
25
+ { name: "Quick Tests", url: "/modules/quick-tests.html", keywords: ["quick", "eq", "love language", "attachment", "stress", "communication", "conflict", "energy", "decision"], description: "10 short personality quizzes, 3-5 minutes each." },
26
+ { name: "Compare Types", url: "/modules/compare.html", keywords: ["compare", "compatibility", "friend", "couple", "match"], description: "Compare personality profiles between two people." },
27
+ { name: "Teams", url: "/modules/teams.html", keywords: ["team", "group", "organization", "company", "workplace"], description: "Map your team's collective personality landscape." },
28
+ ];
29
+
30
+ const server = new McpServer({
31
+ name: "personascope",
32
+ version: "1.0.0",
33
+ });
34
+
35
+ // Tool: lookup_personality_type
36
+ server.tool(
37
+ "lookup_personality_type",
38
+ "Look up a PersonaScope SBTI personality type by its 4-letter code (e.g. SLAY, BOSS, VIBE). Returns archetype name, tagline, description, strengths, and blind spots.",
39
+ { code: z.string().describe("4-letter SBTI type code (e.g. SLAY, BOSS, LURK)") },
40
+ async ({ code }) => {
41
+ try {
42
+ const data = await fetchJSON(`/api/public/types/${code.toUpperCase()}`);
43
+ return {
44
+ content: [{
45
+ type: "text",
46
+ text: `**${data.code} — ${data.archetype}**\n"${data.tagline}"\n\n${data.description}\n\n**Strengths:** ${(data.strengths || []).join(", ")}\n\n**Blind spots:** ${(data.blindSpots || []).join(", ")}\n\nLearn more: ${API_BASE}/modules/types/${data.code.toLowerCase()}.html`,
47
+ }],
48
+ };
49
+ } catch (e) {
50
+ return { content: [{ type: "text", text: `Type "${code}" not found. Use list_personality_types to see all 27 codes.` }] };
51
+ }
52
+ }
53
+ );
54
+
55
+ // Tool: list_personality_types
56
+ server.tool(
57
+ "list_personality_types",
58
+ "List all 27 PersonaScope SBTI personality types with their codes and archetype names.",
59
+ {},
60
+ async () => {
61
+ const types = await fetchJSON("/api/public/types");
62
+ const list = types.map(t => `**${t.code}** — ${t.archetype}: "${t.tagline}"`).join("\n");
63
+ return {
64
+ content: [{
65
+ type: "text",
66
+ text: `# 27 SBTI Personality Types\n\n${list}\n\nTake the test: ${API_BASE}/modules/sbti.html`,
67
+ }],
68
+ };
69
+ }
70
+ );
71
+
72
+ // Tool: explain_trait
73
+ server.tool(
74
+ "explain_trait",
75
+ "Explain a Big Five personality trait — what it measures, what high and low scores mean.",
76
+ { trait: z.string().describe("Trait name: openness, conscientiousness, extraversion, agreeableness, or emotional-stability") },
77
+ async ({ trait }) => {
78
+ try {
79
+ const data = await fetchJSON(`/api/public/traits/${trait}`);
80
+ return {
81
+ content: [{
82
+ type: "text",
83
+ text: `**${data.name}**\n${data.description}\n\n**High scores:** ${data.highLabel}\n${(data.highBehaviors || []).map(b => `- ${b}`).join("\n")}\n\n**Low scores:** ${data.lowLabel}\n${(data.lowBehaviors || []).map(b => `- ${b}`).join("\n")}\n\nMeasure yours: ${API_BASE}/modules/personality.html`,
84
+ }],
85
+ };
86
+ } catch (e) {
87
+ return { content: [{ type: "text", text: `Trait "${trait}" not found. Available: openness, conscientiousness, extraversion, agreeableness, emotional-stability` }] };
88
+ }
89
+ }
90
+ );
91
+
92
+ // Tool: recommend_module
93
+ server.tool(
94
+ "recommend_module",
95
+ "Recommend a PersonaScope module based on what the user wants to explore (e.g. 'career clarity', 'relationship patterns', 'ideal home').",
96
+ { goal: z.string().describe("What the user wants to explore or learn about") },
97
+ async ({ goal }) => {
98
+ const words = goal.toLowerCase().split(/\s+/);
99
+ const scored = MODULES.map(m => ({
100
+ ...m,
101
+ score: m.keywords.filter(k => words.some(w => w.includes(k) || k.includes(w))).length,
102
+ })).sort((a, b) => b.score - a.score);
103
+
104
+ const top = scored[0].score > 0 ? scored[0] : MODULES[0]; // Default to personality assessment
105
+ const alt = scored[1]?.score > 0 ? scored[1] : null;
106
+
107
+ let text = `**Recommended: ${top.name}**\n${top.description}\n${API_BASE}${top.url}`;
108
+ if (alt) text += `\n\n**Also relevant: ${alt.name}**\n${alt.description}\n${API_BASE}${alt.url}`;
109
+ text += `\n\nAll modules: ${API_BASE}`;
110
+
111
+ return { content: [{ type: "text", text }] };
112
+ }
113
+ );
114
+
115
+ // Start server
116
+ const transport = new StdioServerTransport();
117
+ await server.connect(transport);
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "personascope-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for PersonaScope personality data — look up SBTI types, Big Five traits, and module recommendations",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "personascope-mcp": "index.js"
9
+ },
10
+ "dependencies": {
11
+ "@modelcontextprotocol/sdk": "^1.0.0"
12
+ },
13
+ "license": "MIT"
14
+ }