mcp-music-studio 0.1.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.
@@ -0,0 +1,10 @@
1
+ export interface BrowserPlayerOptions {
2
+ abcNotation: string;
3
+ style?: string;
4
+ instrument?: string;
5
+ tempo?: number;
6
+ swing?: number;
7
+ transpose?: number;
8
+ }
9
+ export declare function generatePlayerHtml(options: BrowserPlayerOptions): string;
10
+ export declare function openPlayerInBrowser(options: BrowserPlayerOptions): Promise<string>;
@@ -0,0 +1,28 @@
1
+ export declare const DEFAULT_INSTRUMENT = "Acoustic Grand Piano";
2
+ export declare const DEFAULT_STYLE = "";
3
+ export declare const INSTRUMENTS: Record<string, number>;
4
+ export declare const STYLE_NAMES: readonly ["rock", "jazz", "bossa", "waltz", "march", "reggae", "folk", "classical"];
5
+ export type StyleName = (typeof STYLE_NAMES)[number];
6
+ export declare const STYLE_PRESETS: Record<StyleName, string>;
7
+ export interface MusicToolInput {
8
+ abcNotation?: string;
9
+ instrument?: string;
10
+ style?: string;
11
+ tempo?: number;
12
+ swing?: number;
13
+ transpose?: number;
14
+ }
15
+ export interface InvocationSettings {
16
+ instrument: string;
17
+ style: string;
18
+ }
19
+ export interface PreparedToolInput extends InvocationSettings {
20
+ abcNotation?: string;
21
+ synthOptions: Record<string, unknown>;
22
+ }
23
+ export declare function isStyleName(style: string): style is StyleName;
24
+ export declare function findInstrument(name: string): string | undefined;
25
+ export declare function resolveInvocationSettings(input: Pick<MusicToolInput, "instrument" | "style">): InvocationSettings;
26
+ export declare function applyStyleToAbc(abc: string, style: string): string;
27
+ export declare function injectTempoAndTranspose(abc: string, options: Pick<MusicToolInput, "tempo" | "transpose">): string;
28
+ export declare function prepareToolInput(input: MusicToolInput): PreparedToolInput;
@@ -0,0 +1,6 @@
1
+ import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
2
+ export type ParseOnlyResult = {
3
+ warnings?: string[];
4
+ };
5
+ export type ParseOnlyFn = (abcNotation: string) => ParseOnlyResult[];
6
+ export declare function createPlaySheetMusicResult(abcNotation: string, parseOnly?: ParseOnlyFn): CallToolResult;
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "mcp-music-studio",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "MCP music composition server — multi-instrument playback, style presets, note highlighting, and AI-friendly reference guides. Fork of @modelcontextprotocol/server-sheet-music.",
6
+ "keywords": [
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "music",
10
+ "abc-notation",
11
+ "abcjs",
12
+ "composition",
13
+ "midi",
14
+ "sheet-music"
15
+ ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/linxule/mcp-music-studio"
19
+ },
20
+ "homepage": "https://github.com/linxule/mcp-music-studio#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/linxule/mcp-music-studio/issues"
23
+ },
24
+ "license": "MIT",
25
+ "author": "Xule Lin",
26
+ "main": "dist/server.js",
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build && tsc -p tsconfig.server.json && bun build server.ts --outdir dist --target node && bun build main.ts --outfile dist/index.js --target node --external \"./server.js\" --banner \"#!/usr/bin/env node\"",
32
+ "test": "bunx vitest run",
33
+ "test:watch": "bunx vitest",
34
+ "watch": "cross-env INPUT=mcp-app.html vite build --watch",
35
+ "serve": "bun --watch main.ts",
36
+ "serve:stdio": "bun main.ts --stdio",
37
+ "start": "cross-env NODE_ENV=development bun run build && bun run serve",
38
+ "start:stdio": "cross-env NODE_ENV=development bun run build 1>&2 && bun run serve:stdio",
39
+ "dev": "cross-env NODE_ENV=development concurrently \"bun run watch\" \"bun run serve\"",
40
+ "prepublishOnly": "bun run build"
41
+ },
42
+ "dependencies": {
43
+ "@modelcontextprotocol/ext-apps": "^1.0.0",
44
+ "@modelcontextprotocol/sdk": "^1.24.0",
45
+ "abcjs": "^6.4.4",
46
+ "cors": "^2.8.5",
47
+ "express": "^5.1.0",
48
+ "zod": "^4.1.13"
49
+ },
50
+ "devDependencies": {
51
+ "@types/cors": "^2.8.19",
52
+ "@types/express": "^5.0.0",
53
+ "@types/node": "22.10.0",
54
+ "concurrently": "^9.2.1",
55
+ "cross-env": "^10.1.0",
56
+ "typescript": "^5.9.3",
57
+ "vite": "^6.0.0",
58
+ "vite-plugin-singlefile": "^2.3.0",
59
+ "vitest": "^3.2.4"
60
+ },
61
+ "types": "dist/server.d.ts",
62
+ "exports": {
63
+ ".": {
64
+ "types": "./dist/server.d.ts",
65
+ "default": "./dist/server.js"
66
+ }
67
+ },
68
+ "bin": {
69
+ "mcp-music-studio": "dist/index.js"
70
+ }
71
+ }