Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/cli/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1869,13 +1869,17 @@ function formatServerIdentity(serverInfo: Implementation): string[] {
chalk.bold('Server:') + ` ${serverInfo.name} (version: ${serverInfo.version || 'N/A'})`,
];

const bullet = chalk.dim('*');
const description = serverInfo.description?.trim();
if (description) {
lines.push(...description.split('\n').map((line) => chalk.gray(line)));
// Continuation lines of a multi-line description stay aligned under its first line
const [first, ...rest] = description.split('\n');
const continuationIndent = ' '.repeat('* Description: '.length);
lines.push(`${bullet} Description: ${first}`, ...rest.map((line) => continuationIndent + line));
}

if (serverInfo.websiteUrl) {
lines.push(theme.cyan(serverInfo.websiteUrl));
lines.push(`${bullet} Website: ${theme.cyan(serverInfo.websiteUrl)}`);
}

return lines;
Expand Down
7 changes: 4 additions & 3 deletions test/unit/cli/output.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1082,9 +1082,10 @@ describe('formatServerDetails', () => {
const output = formatServerDetails(details, '@notion');

expect(output).toContain('Notion MCP (version: 1.2.0)');
expect(output).toContain("Notion's official MCP server.");
expect(output).toContain('Use your workspace as a system of record.');
expect(output).toContain('https://developers.notion.com/docs/mcp');
expect(output).toContain(
"* Description: Notion's official MCP server.\n Use your workspace as a system of record."
);
expect(output).toContain('* Website: https://developers.notion.com/docs/mcp');
});

it('keeps the server line alone when no description or website URL is advertised', () => {
Expand Down
Loading