You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Look up a symbol (function, class, or method) in a codebase — returns source code, callers, callees, and architectural domain',
1125
+
{
1126
+
symbol: z.string().describe('Name of the symbol to look up (e.g. "filter_queryset", "UserModel.save")'),
1127
+
directory: z.string().optional().describe('Path to the repository directory'),
1128
+
},
1129
+
({ symbol, directory }) => ({
1130
+
messages: [{
1131
+
role: 'user' as const,
1132
+
content: {
1133
+
type: 'text' as const,
1134
+
text: `Use the symbol_context tool to look up "${symbol}"${directory ? ` in the repository at ${directory}` : ''}. Return the definition location, source code, callers, callees, and architectural domain.`,
1135
+
},
1136
+
}],
1137
+
}),
1138
+
);
1139
+
1140
+
this.server.prompt(
1141
+
'explore-architecture',
1142
+
'Explore the architectural structure of a codebase — surfaces subsystems, entry points, and key components via the codebase overview',
1143
+
{
1144
+
directory: z.string().describe('Path to the repository directory'),
1145
+
focus: z.string().optional().describe('Optional area or subsystem to focus on'),
1146
+
},
1147
+
({ directory, focus }) => ({
1148
+
messages: [{
1149
+
role: 'user' as const,
1150
+
content: {
1151
+
type: 'text' as const,
1152
+
text: `Explore the architecture of the repository at ${directory}${focus ? `, focusing on ${focus}` : ''}. Use the symbol_context tool to look up key classes and entry points. Summarize the main subsystems, their responsibilities, and how they interact.`,
1153
+
},
1154
+
}],
1155
+
}),
1156
+
);
1157
+
}
1158
+
1159
+
private setupResources() {
1160
+
this.server.resource(
1161
+
'configuration',
1162
+
'supermodel://docs/configuration',
1163
+
{
1164
+
description: 'Supermodel MCP Server configuration reference — environment variables and CLI options',
1165
+
mimeType: 'text/markdown',
1166
+
},
1167
+
async (uri) => ({
1168
+
contents: [{
1169
+
uri: uri.toString(),
1170
+
mimeType: 'text/markdown',
1171
+
text: `# Configuration Reference\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| \`SUPERMODEL_API_KEY\` | Yes | — | API key from [dashboard.supermodeltools.com](https://dashboard.supermodeltools.com) |\n| \`SUPERMODEL_BASE_URL\` | No | \`https://api.supermodeltools.com\` | Override API endpoint |\n| \`SUPERMODEL_CACHE_DIR\` | No | — | Directory for pre-computed graph cache files |\n| \`SUPERMODEL_TIMEOUT_MS\` | No | \`900000\` | API request timeout in milliseconds |\n| \`SUPERMODEL_NO_API_FALLBACK\` | No | — | Set to disable on-demand API calls (cache-only mode) |\n| \`SUPERMODEL_EXPERIMENT\` | No | — | Experiment mode (e.g. \`graphrag\`) |\n\n## CLI Usage\n\n\`\`\`bash\nnpx @supermodeltools/mcp-server [directory] [--precache]\n\`\`\`\n\n| Argument | Description |\n|----------|-------------|\n| \`directory\` | Default working directory for tool calls |\n| \`--precache\` | Generate and cache the graph for the directory on startup |\n\n## Pre-computing Graphs\n\n\`\`\`bash\nnpx @supermodeltools/mcp-server precache /path/to/repo --output-dir ./cache\n\`\`\`\n`,
1172
+
}],
1173
+
}),
1174
+
);
1175
+
1176
+
this.server.resource(
1177
+
'quickstart',
1178
+
'supermodel://docs/quickstart',
1179
+
{
1180
+
description: 'Supermodel MCP Server quick start guide — install, configure, and start using in under 5 minutes',
1181
+
mimeType: 'text/markdown',
1182
+
},
1183
+
async (uri) => ({
1184
+
contents: [{
1185
+
uri: uri.toString(),
1186
+
mimeType: 'text/markdown',
1187
+
text: `# Quick Start Guide\n\n## 1. Get an API Key\n\nSign up at [dashboard.supermodeltools.com](https://dashboard.supermodeltools.com) to get your free API key.\n\n## 2. Install\n\n\`\`\`bash\nnpm install -g @supermodeltools/mcp-server\n\`\`\`\n\nOr run directly with npx (no install needed):\n\n\`\`\`bash\nnpx @supermodeltools/mcp-server\n\`\`\`\n\n## 3. Add to Your MCP Client\n\n### Claude Code\n\n\`\`\`bash\nclaude mcp add supermodel --env SUPERMODEL_API_KEY=your-key -- npx -y @supermodeltools/mcp-server\n\`\`\`\n\n### Cursor\n\nAdd to \`~/.cursor/mcp.json\`:\n\n\`\`\`json\n{\n "mcpServers": {\n "supermodel": {\n "command": "npx",\n "args": ["-y", "@supermodeltools/mcp-server"],\n "env": { "SUPERMODEL_API_KEY": "your-key" }\n }\n }\n}\n\`\`\`\n\n## 4. Use the Tools\n\n- **\`symbol_context\`**: Look up any function, class, or method with full caller/callee graph and source code\n- Supports batch lookups via the \`symbols\` array\n- Use \`brief: true\` for compact output when looking up 3+ symbols\n\n## Next Steps\n\n- Read the [configuration reference](supermodel://docs/configuration) for advanced options\n- Use \`precache\` to pre-compute graphs for faster responses\n- See the [GitHub repo](https://github.com/supermodeltools/mcp) for more\n`,
0 commit comments