@echoes-io/mcp-server 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.
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/cli/index.d.ts +2 -0
- package/cli/index.js +6 -0
- package/lib/server.d.ts +25 -0
- package/lib/server.js +33 -0
- package/package.json +89 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 echoes-io
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# mcp-server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol server for AI integration with Echoes storytelling platform
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
The server is distributed as an npm package and can be used without cloning the repository.
|
|
8
|
+
|
|
9
|
+
### Using with MCP Clients
|
|
10
|
+
|
|
11
|
+
Add to your MCP client configuration (e.g., `~/.config/q/mcp.json` for Amazon Q):
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"echoes": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "@echoes-io/mcp-server"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or install globally:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g @echoes-io/mcp-server
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then configure:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"echoes": {
|
|
36
|
+
"command": "echoes-mcp-server"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
Once configured, the server provides tools for:
|
|
45
|
+
- Content management (chapters, episodes, arcs)
|
|
46
|
+
- Word counting and text statistics
|
|
47
|
+
- Database operations via @echoes-io/tracker
|
|
48
|
+
- Timeline synchronization
|
|
49
|
+
|
|
50
|
+
Available tools will be listed by your MCP client.
|
|
51
|
+
|
|
52
|
+
## Development
|
|
53
|
+
|
|
54
|
+
### Scripts
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Run tests
|
|
58
|
+
npm test
|
|
59
|
+
|
|
60
|
+
# Run tests with coverage
|
|
61
|
+
npm run test:coverage
|
|
62
|
+
|
|
63
|
+
# Build
|
|
64
|
+
npm run build
|
|
65
|
+
|
|
66
|
+
# Lint
|
|
67
|
+
npm run lint
|
|
68
|
+
|
|
69
|
+
# Fix linting issues
|
|
70
|
+
npm run lint:fix
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Tech Stack
|
|
74
|
+
|
|
75
|
+
- **Language**: TypeScript (strict mode)
|
|
76
|
+
- **Testing**: Vitest
|
|
77
|
+
- **Linting**: Biome
|
|
78
|
+
- **Build**: TypeScript compiler
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
Part of the [Echoes](https://github.com/echoes-io) project - a multi-POV digital storytelling platform.
|
package/cli/index.d.ts
ADDED
package/cli/index.js
ADDED
package/lib/server.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
export declare function createServer(): Server<{
|
|
3
|
+
method: string;
|
|
4
|
+
params?: {
|
|
5
|
+
[x: string]: unknown;
|
|
6
|
+
_meta?: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
progressToken?: string | number | undefined;
|
|
9
|
+
} | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
method: string;
|
|
13
|
+
params?: {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
_meta?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
_meta?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function runServer(): Promise<void>;
|
package/lib/server.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
|
|
9
|
+
export function createServer() {
|
|
10
|
+
const server = new Server({
|
|
11
|
+
name: pkg.name,
|
|
12
|
+
version: pkg.version,
|
|
13
|
+
}, {
|
|
14
|
+
capabilities: {
|
|
15
|
+
tools: {},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
19
|
+
return {
|
|
20
|
+
tools: [],
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
24
|
+
throw new Error(`Unknown tool: ${request.params.name}`);
|
|
25
|
+
});
|
|
26
|
+
return server;
|
|
27
|
+
}
|
|
28
|
+
export async function runServer() {
|
|
29
|
+
const server = createServer();
|
|
30
|
+
const transport = new StdioServerTransport();
|
|
31
|
+
await server.connect(transport);
|
|
32
|
+
console.error('Echoes MCP Server running on stdio');
|
|
33
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@echoes-io/mcp-server",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Model Context Protocol server for AI integration with Echoes storytelling platform",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "tsx cli/index.ts",
|
|
8
|
+
"start": "node cli/index.js",
|
|
9
|
+
"lint": "concurrently npm:lint:* --prefixColors auto",
|
|
10
|
+
"lint:fix": "biome check --write",
|
|
11
|
+
"lint:lockfile": "lockfile-lint --path package-lock.json",
|
|
12
|
+
"lint:engines": "ls-engines",
|
|
13
|
+
"lint:publish": "publint --strict",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:coverage": "vitest run --coverage",
|
|
16
|
+
"prepare": "[ \"$CI\" = \"true\" ] || [ \"$GITHUB_ACTIONS\" = \"true\" ] && echo 'Skipping husky' && exit 0 || husky",
|
|
17
|
+
"clean": "rimraf --glob ./{cli,lib,test}/**/*.{d.ts,js} ./vitest*.{d.ts,js}",
|
|
18
|
+
"prebuild": "npm run clean",
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"release": "semantic-release"
|
|
21
|
+
},
|
|
22
|
+
"bin": {
|
|
23
|
+
"echoes-mcp-server": "./cli/index.js"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": "./lib/server.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"cli/**/*.{d.ts,js}",
|
|
30
|
+
"lib/**/*.{d.ts,js}"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">= 20"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/echoes-io/mcp-server.git"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"echoes",
|
|
45
|
+
"storytelling",
|
|
46
|
+
"multi-pov"
|
|
47
|
+
],
|
|
48
|
+
"author": "Zweer <n.olivieriachille@gmail.com>",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/echoes-io/mcp-server/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/echoes-io/mcp-server#readme",
|
|
54
|
+
"release": {
|
|
55
|
+
"plugins": [
|
|
56
|
+
"@semantic-release/commit-analyzer",
|
|
57
|
+
"@semantic-release/release-notes-generator",
|
|
58
|
+
"@semantic-release/changelog",
|
|
59
|
+
"@semantic-release/npm",
|
|
60
|
+
"@semantic-release/github",
|
|
61
|
+
"@semantic-release/git"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@biomejs/biome": "^2.2.7",
|
|
66
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
67
|
+
"@semantic-release/git": "^10.0.1",
|
|
68
|
+
"@tsconfig/node22": "^22.0.2",
|
|
69
|
+
"@types/node": "^24.9.1",
|
|
70
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
71
|
+
"concurrently": "^9.2.1",
|
|
72
|
+
"husky": "^9.1.7",
|
|
73
|
+
"lint-staged": "^16.2.5",
|
|
74
|
+
"lockfile-lint": "^4.14.1",
|
|
75
|
+
"ls-engines": "^0.9.3",
|
|
76
|
+
"publint": "^0.3.15",
|
|
77
|
+
"rimraf": "^6.0.1",
|
|
78
|
+
"semantic-release": "^25.0.1",
|
|
79
|
+
"tsx": "^4.19.2",
|
|
80
|
+
"typescript": "^5.9.3",
|
|
81
|
+
"vitest": "^3.2.4"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"@echoes-io/utils": "^1.1.1",
|
|
85
|
+
"@echoes-io/models": "^1.0.0",
|
|
86
|
+
"@echoes-io/tracker": "^1.0.0",
|
|
87
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
88
|
+
}
|
|
89
|
+
}
|