horizon-mcp 0.0.0-development
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/README.md +138 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/debug-connection.d.ts +3 -0
- package/dist/prompts/debug-connection.d.ts.map +1 -0
- package/dist/prompts/debug-connection.js +17 -0
- package/dist/prompts/debug-connection.js.map +1 -0
- package/dist/prompts/explain-feature.d.ts +3 -0
- package/dist/prompts/explain-feature.d.ts.map +1 -0
- package/dist/prompts/explain-feature.js +32 -0
- package/dist/prompts/explain-feature.js.map +1 -0
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +14 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/integrate-feature.d.ts +3 -0
- package/dist/prompts/integrate-feature.d.ts.map +1 -0
- package/dist/prompts/integrate-feature.js +35 -0
- package/dist/prompts/integrate-feature.js.map +1 -0
- package/dist/prompts/setup-auth.d.ts +3 -0
- package/dist/prompts/setup-auth.d.ts.map +1 -0
- package/dist/prompts/setup-auth.js +26 -0
- package/dist/prompts/setup-auth.js.map +1 -0
- package/dist/resources/index.d.ts +6 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +208 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +15 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/__tests__/api-client.test.d.ts +2 -0
- package/dist/tools/__tests__/api-client.test.d.ts.map +1 -0
- package/dist/tools/__tests__/api-client.test.js +156 -0
- package/dist/tools/__tests__/api-client.test.js.map +1 -0
- package/dist/tools/api-client.d.ts +25 -0
- package/dist/tools/api-client.d.ts.map +1 -0
- package/dist/tools/api-client.js +78 -0
- package/dist/tools/api-client.js.map +1 -0
- package/dist/tools/auth.d.ts +3 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +123 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/cloud-save.d.ts +3 -0
- package/dist/tools/cloud-save.d.ts.map +1 -0
- package/dist/tools/cloud-save.js +50 -0
- package/dist/tools/cloud-save.js.map +1 -0
- package/dist/tools/connection.d.ts +3 -0
- package/dist/tools/connection.d.ts.map +1 -0
- package/dist/tools/connection.js +20 -0
- package/dist/tools/connection.js.map +1 -0
- package/dist/tools/feedback.d.ts +3 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +36 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/gift-codes.d.ts +3 -0
- package/dist/tools/gift-codes.d.ts.map +1 -0
- package/dist/tools/gift-codes.js +52 -0
- package/dist/tools/gift-codes.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/leaderboard.d.ts +3 -0
- package/dist/tools/leaderboard.d.ts.map +1 -0
- package/dist/tools/leaderboard.js +96 -0
- package/dist/tools/leaderboard.js.map +1 -0
- package/dist/tools/news.d.ts +3 -0
- package/dist/tools/news.d.ts.map +1 -0
- package/dist/tools/news.js +29 -0
- package/dist/tools/news.js.map +1 -0
- package/dist/tools/remote-config.d.ts +3 -0
- package/dist/tools/remote-config.d.ts.map +1 -0
- package/dist/tools/remote-config.js +42 -0
- package/dist/tools/remote-config.js.map +1 -0
- package/dist/tools/tool-helpers.d.ts +24 -0
- package/dist/tools/tool-helpers.d.ts.map +1 -0
- package/dist/tools/tool-helpers.js +54 -0
- package/dist/tools/tool-helpers.js.map +1 -0
- package/dist/tools/user-logs.d.ts +3 -0
- package/dist/tools/user-logs.d.ts.map +1 -0
- package/dist/tools/user-logs.js +30 -0
- package/dist/tools/user-logs.js.map +1 -0
- package/package.json +52 -0
- package/src/resources/api/app-api.md +495 -0
- package/src/resources/docs/auth.md +280 -0
- package/src/resources/docs/cloud-save.md +180 -0
- package/src/resources/docs/feedback.md +126 -0
- package/src/resources/docs/gift-codes.md +153 -0
- package/src/resources/docs/leaderboard.md +201 -0
- package/src/resources/docs/news.md +114 -0
- package/src/resources/docs/overview.md +80 -0
- package/src/resources/docs/remote-config.md +149 -0
- package/src/resources/docs/user-logs.md +144 -0
- package/src/resources/quickstart/godot.md +224 -0
- package/src/resources/quickstart/unity.md +317 -0
- package/src/resources/quickstart/unreal.md +390 -0
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# horizOn MCP Server
|
|
2
|
+
|
|
3
|
+
**MCP server for horizOn Backend-as-a-Service** -- gives AI coding assistants documentation, live API tools, and workflow prompts for game and app development.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick Install
|
|
8
|
+
|
|
9
|
+
Add to your MCP client configuration (Claude Desktop, Cursor, etc.):
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"horizOn": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "horizon-mcp"],
|
|
17
|
+
"env": {
|
|
18
|
+
"HORIZON_API_KEY": "your-api-key-here"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
### Resources (13 docs)
|
|
28
|
+
|
|
29
|
+
Documentation resources are served directly from the MCP server. No API key required.
|
|
30
|
+
|
|
31
|
+
| URI | Description |
|
|
32
|
+
|-----|-------------|
|
|
33
|
+
| `horizon://overview` | What is horizOn, core concepts (Account vs User), features, tier system, API structure, and SDKs |
|
|
34
|
+
| `horizon://docs/auth` | Authentication methods (Anonymous, Email, Google), endpoints, SDK code examples, and common errors |
|
|
35
|
+
| `horizon://docs/leaderboard` | Leaderboard score submission, top entries, user rank, entries around user, with SDK examples |
|
|
36
|
+
| `horizon://docs/cloud-save` | Cloud save/load for JSON and binary data, tier size limits, SDK examples |
|
|
37
|
+
| `horizon://docs/remote-config` | Server-side key-value configuration: feature flags, game balance, A/B testing. SDK examples |
|
|
38
|
+
| `horizon://docs/news` | In-game news and announcements with language filtering. SDK examples |
|
|
39
|
+
| `horizon://docs/gift-codes` | Gift code validation and redemption for promotional rewards. SDK examples |
|
|
40
|
+
| `horizon://docs/feedback` | Bug reports, feature requests, and general feedback submission. SDK examples |
|
|
41
|
+
| `horizon://docs/user-logs` | Server-side event and error tracking. Requires BASIC tier or higher. SDK examples |
|
|
42
|
+
| `horizon://api/reference` | Complete API reference for all horizOn App API endpoints with request/response schemas |
|
|
43
|
+
| `horizon://quickstart/godot` | Step-by-step guide to integrate horizOn in Godot with GDScript examples |
|
|
44
|
+
| `horizon://quickstart/unity` | Step-by-step guide to integrate horizOn in Unity with C# examples |
|
|
45
|
+
| `horizon://quickstart/unreal` | Guide to integrate horizOn in Unreal Engine using REST API. C++ and cURL examples |
|
|
46
|
+
|
|
47
|
+
### Tools (19 tools)
|
|
48
|
+
|
|
49
|
+
Live API tools that call the horizOn backend. Requires a valid API key.
|
|
50
|
+
|
|
51
|
+
| Tool | Description |
|
|
52
|
+
|------|-------------|
|
|
53
|
+
| `horizon_test_connection` | Test connection to the horizOn API (health check) |
|
|
54
|
+
| `horizon_signup_anonymous` | Create a new anonymous user account |
|
|
55
|
+
| `horizon_signup_email` | Create a new user account with email and password |
|
|
56
|
+
| `horizon_signin_email` | Sign in with email and password |
|
|
57
|
+
| `horizon_signin_anonymous` | Sign in with an anonymous token |
|
|
58
|
+
| `horizon_check_auth` | Check whether a user session is still valid |
|
|
59
|
+
| `horizon_submit_score` | Submit a score to the leaderboard |
|
|
60
|
+
| `horizon_get_leaderboard_top` | Get the top leaderboard entries |
|
|
61
|
+
| `horizon_get_user_rank` | Get a user's leaderboard rank |
|
|
62
|
+
| `horizon_get_leaderboard_around` | Get leaderboard entries around a user's position |
|
|
63
|
+
| `horizon_save_cloud_data` | Save cloud data for a user |
|
|
64
|
+
| `horizon_load_cloud_data` | Load cloud save data for a user |
|
|
65
|
+
| `horizon_get_remote_config` | Get a single remote config value by key |
|
|
66
|
+
| `horizon_get_all_remote_configs` | Get all remote config values |
|
|
67
|
+
| `horizon_get_news` | Get news articles with optional language filtering |
|
|
68
|
+
| `horizon_validate_gift_code` | Validate a gift code without redeeming it |
|
|
69
|
+
| `horizon_redeem_gift_code` | Redeem a gift code for a user |
|
|
70
|
+
| `horizon_submit_feedback` | Submit user feedback (bug reports, feature requests) |
|
|
71
|
+
| `horizon_create_log` | Create a server-side log entry (INFO, WARN, ERROR) |
|
|
72
|
+
|
|
73
|
+
### Prompts (4 prompts)
|
|
74
|
+
|
|
75
|
+
Workflow prompts that guide AI assistants through common horizOn tasks.
|
|
76
|
+
|
|
77
|
+
| Prompt | Description |
|
|
78
|
+
|--------|-------------|
|
|
79
|
+
| `integrate-feature` | Generate integration code for a specific horizOn feature in your game engine |
|
|
80
|
+
| `setup-auth` | Step-by-step guide to set up horizOn authentication in your project |
|
|
81
|
+
| `debug-connection` | Diagnose and fix horizOn connection issues |
|
|
82
|
+
| `explain-feature` | Get a detailed explanation of any horizOn feature |
|
|
83
|
+
|
|
84
|
+
## Configuration
|
|
85
|
+
|
|
86
|
+
| Variable | Required | Description |
|
|
87
|
+
|----------|----------|-------------|
|
|
88
|
+
| `HORIZON_API_KEY` | Yes (for tools) | Your horizOn API key. Get one at [horizon.pm](https://horizon.pm) |
|
|
89
|
+
| `HORIZON_BASE_URL` | No | API base URL. Defaults to `https://horizon.pm` |
|
|
90
|
+
|
|
91
|
+
Resources (documentation) work without an API key. Only the live API tools require authentication.
|
|
92
|
+
|
|
93
|
+
## What is horizOn?
|
|
94
|
+
|
|
95
|
+
horizOn is a multi-tenant Backend-as-a-Service platform built for game and app developers. It provides a managed backend so developers can focus on building their game or app instead of server infrastructure.
|
|
96
|
+
|
|
97
|
+
Core features:
|
|
98
|
+
|
|
99
|
+
- Authentication (Anonymous, Email, Google)
|
|
100
|
+
- Leaderboards
|
|
101
|
+
- Cloud Save
|
|
102
|
+
- Remote Config
|
|
103
|
+
- News and Announcements
|
|
104
|
+
- Gift Codes
|
|
105
|
+
- User Feedback
|
|
106
|
+
- User Logs
|
|
107
|
+
|
|
108
|
+
Learn more at [horizon.pm](https://horizon.pm).
|
|
109
|
+
|
|
110
|
+
## Supported Engines
|
|
111
|
+
|
|
112
|
+
- **Godot 4.5+** -- GDScript SDK
|
|
113
|
+
- **Unity 6** -- C# SDK
|
|
114
|
+
- **Unreal Engine** -- REST API (no official SDK)
|
|
115
|
+
|
|
116
|
+
## Development
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Clone the repository
|
|
120
|
+
git clone https://github.com/nicokimmel/horizOn-mcp.git
|
|
121
|
+
cd horizOn-mcp
|
|
122
|
+
|
|
123
|
+
# Install dependencies
|
|
124
|
+
npm install
|
|
125
|
+
|
|
126
|
+
# Start the server (development mode)
|
|
127
|
+
npm run dev
|
|
128
|
+
|
|
129
|
+
# Build for production
|
|
130
|
+
npm run build
|
|
131
|
+
|
|
132
|
+
# Run tests
|
|
133
|
+
npm test
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { createServer } from "./server.js";
|
|
4
|
+
const server = createServer();
|
|
5
|
+
const transport = new StdioServerTransport();
|
|
6
|
+
await server.connect(transport);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;AAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-connection.d.ts","sourceRoot":"","sources":["../../src/prompts/debug-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAerE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function registerDebugConnectionPrompt(server) {
|
|
2
|
+
server.registerPrompt("debug-connection", {
|
|
3
|
+
title: "Debug horizOn Connection",
|
|
4
|
+
description: "Diagnose and fix horizOn connection issues.",
|
|
5
|
+
}, () => ({
|
|
6
|
+
messages: [
|
|
7
|
+
{
|
|
8
|
+
role: "user",
|
|
9
|
+
content: {
|
|
10
|
+
type: "text",
|
|
11
|
+
text: `My horizOn integration isn't working. Please help me debug the connection.\n\nSteps:\n1. Use the horizon_test_connection tool to check server reachability and API key validity\n2. If the connection fails, diagnose the issue:\n - Is HORIZON_API_KEY set correctly?\n - Is the server URL correct (default: https://horizon.pm)?\n - Is there a network/firewall issue?\n3. If the connection succeeds but features fail, check:\n - Is the user authenticated? (try horizon_check_auth)\n - Are tier limits being hit? (check the feature docs for limits)\n - Is rate limiting active? (10 requests/minute per client)\n4. Provide specific fixes for any issues found`,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=debug-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-connection.js","sourceRoot":"","sources":["../../src/prompts/debug-connection.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE;QACxC,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,6CAA6C;KAC3D,EAAE,GAAG,EAAE,CAAC,CAAC;QACR,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,ypBAAypB;iBAChqB;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain-feature.d.ts","sourceRoot":"","sources":["../../src/prompts/explain-feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6BpE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export function registerExplainFeaturePrompt(server) {
|
|
3
|
+
server.registerPrompt("explain-feature", {
|
|
4
|
+
title: "Explain horizOn Feature",
|
|
5
|
+
description: "Get a detailed explanation of any horizOn feature.",
|
|
6
|
+
argsSchema: {
|
|
7
|
+
feature: z
|
|
8
|
+
.enum([
|
|
9
|
+
"auth",
|
|
10
|
+
"leaderboard",
|
|
11
|
+
"cloud-save",
|
|
12
|
+
"remote-config",
|
|
13
|
+
"news",
|
|
14
|
+
"gift-codes",
|
|
15
|
+
"feedback",
|
|
16
|
+
"user-logs",
|
|
17
|
+
])
|
|
18
|
+
.describe("The feature to explain"),
|
|
19
|
+
},
|
|
20
|
+
}, ({ feature }) => ({
|
|
21
|
+
messages: [
|
|
22
|
+
{
|
|
23
|
+
role: "user",
|
|
24
|
+
content: {
|
|
25
|
+
type: "text",
|
|
26
|
+
text: `Explain the horizOn "${feature}" feature in detail.\n\nPlease:\n1. Read the documentation (resource: horizon://docs/${feature})\n2. Explain what it does and when to use it\n3. Show the API endpoints and their parameters\n4. Provide code examples for Godot, Unity, and REST\n5. List tier limits and restrictions\n6. Share best practices and common pitfalls`,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=explain-feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain-feature.js","sourceRoot":"","sources":["../../src/prompts/explain-feature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,UAAU,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,CAAC,cAAc,CAAC,iBAAiB,EAAE;QACvC,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,oDAAoD;QACjE,UAAU,EAAE;YACV,OAAO,EAAE,CAAC;iBACP,IAAI,CAAC;gBACJ,MAAM;gBACN,aAAa;gBACb,YAAY;gBACZ,eAAe;gBACf,MAAM;gBACN,YAAY;gBACZ,UAAU;gBACV,WAAW;aACZ,CAAC;iBACD,QAAQ,CAAC,wBAAwB,CAAC;SACtC;KACF,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QACnB,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,wBAAwB,OAAO,wFAAwF,OAAO,uOAAuO;iBAC5W;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAK1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { registerIntegrateFeaturePrompt } from "./integrate-feature.js";
|
|
2
|
+
import { registerSetupAuthPrompt } from "./setup-auth.js";
|
|
3
|
+
import { registerDebugConnectionPrompt } from "./debug-connection.js";
|
|
4
|
+
import { registerExplainFeaturePrompt } from "./explain-feature.js";
|
|
5
|
+
/**
|
|
6
|
+
* Registers all horizOn MCP prompts on the given server.
|
|
7
|
+
*/
|
|
8
|
+
export function registerAllPrompts(server) {
|
|
9
|
+
registerIntegrateFeaturePrompt(server);
|
|
10
|
+
registerSetupAuthPrompt(server);
|
|
11
|
+
registerDebugConnectionPrompt(server);
|
|
12
|
+
registerExplainFeaturePrompt(server);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACvC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAChC,6BAA6B,CAAC,MAAM,CAAC,CAAC;IACtC,4BAA4B,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrate-feature.d.ts","sourceRoot":"","sources":["../../src/prompts/integrate-feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiCtE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export function registerIntegrateFeaturePrompt(server) {
|
|
3
|
+
server.registerPrompt("integrate-feature", {
|
|
4
|
+
title: "Integrate horizOn Feature",
|
|
5
|
+
description: "Generate integration code for a specific horizOn feature in your game engine.",
|
|
6
|
+
argsSchema: {
|
|
7
|
+
feature: z
|
|
8
|
+
.enum([
|
|
9
|
+
"auth",
|
|
10
|
+
"leaderboard",
|
|
11
|
+
"cloud-save",
|
|
12
|
+
"remote-config",
|
|
13
|
+
"news",
|
|
14
|
+
"gift-codes",
|
|
15
|
+
"feedback",
|
|
16
|
+
"user-logs",
|
|
17
|
+
])
|
|
18
|
+
.describe("The horizOn feature to integrate"),
|
|
19
|
+
engine: z
|
|
20
|
+
.enum(["godot", "unity", "unreal"])
|
|
21
|
+
.describe("The game engine"),
|
|
22
|
+
},
|
|
23
|
+
}, ({ feature, engine }) => ({
|
|
24
|
+
messages: [
|
|
25
|
+
{
|
|
26
|
+
role: "user",
|
|
27
|
+
content: {
|
|
28
|
+
type: "text",
|
|
29
|
+
text: `I want to integrate the horizOn "${feature}" feature into my ${engine} project.\n\nPlease:\n1. Read the horizOn documentation for this feature (resource: horizon://docs/${feature})\n2. Read the ${engine} quickstart guide (resource: horizon://quickstart/${engine})\n3. Generate complete, production-ready integration code\n4. Include error handling and best practices\n5. Show how to test it works using the horizOn MCP tools\n\nUse the horizOn SDK for ${engine === "godot" ? "Godot (GDScript)" : engine === "unity" ? "Unity (C#)" : "Unreal Engine (REST/HTTP, no SDK)"}`,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=integrate-feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrate-feature.js","sourceRoot":"","sources":["../../src/prompts/integrate-feature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,UAAU,8BAA8B,CAAC,MAAiB;IAC9D,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE;QACzC,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,+EAA+E;QACjF,UAAU,EAAE;YACV,OAAO,EAAE,CAAC;iBACP,IAAI,CAAC;gBACJ,MAAM;gBACN,aAAa;gBACb,YAAY;gBACZ,eAAe;gBACf,MAAM;gBACN,YAAY;gBACZ,UAAU;gBACV,WAAW;aACZ,CAAC;iBACD,QAAQ,CAAC,kCAAkC,CAAC;YAC/C,MAAM,EAAE,CAAC;iBACN,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;iBAClC,QAAQ,CAAC,iBAAiB,CAAC;SAC/B;KACF,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;QAC3B,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,oCAAoC,OAAO,qBAAqB,MAAM,sGAAsG,OAAO,kBAAkB,MAAM,qDAAqD,MAAM,iMAAiM,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mCAAmC,EAAE;iBACjkB;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-auth.d.ts","sourceRoot":"","sources":["../../src/prompts/setup-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwB/D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export function registerSetupAuthPrompt(server) {
|
|
3
|
+
server.registerPrompt("setup-auth", {
|
|
4
|
+
title: "Setup Authentication",
|
|
5
|
+
description: "Step-by-step guide to set up horizOn authentication in your project.",
|
|
6
|
+
argsSchema: {
|
|
7
|
+
engine: z
|
|
8
|
+
.enum(["godot", "unity", "unreal"])
|
|
9
|
+
.describe("Your game engine"),
|
|
10
|
+
method: z
|
|
11
|
+
.enum(["anonymous", "email", "google"])
|
|
12
|
+
.describe("Authentication method"),
|
|
13
|
+
},
|
|
14
|
+
}, ({ engine, method }) => ({
|
|
15
|
+
messages: [
|
|
16
|
+
{
|
|
17
|
+
role: "user",
|
|
18
|
+
content: {
|
|
19
|
+
type: "text",
|
|
20
|
+
text: `Set up horizOn ${method} authentication in my ${engine} project.\n\nPlease:\n1. Read the auth documentation (resource: horizon://docs/auth)\n2. Read the ${engine} quickstart (resource: horizon://quickstart/${engine})\n3. Walk me through the setup step by step\n4. Provide complete code for signup AND signin flows\n5. Include token storage/caching\n6. Show error handling for common issues (invalid credentials, network errors, rate limits)\n7. Test the flow using horizOn MCP tools`,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=setup-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-auth.js","sourceRoot":"","sources":["../../src/prompts/setup-auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE;QAClC,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,sEAAsE;QACxE,UAAU,EAAE;YACV,MAAM,EAAE,CAAC;iBACN,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;iBAClC,QAAQ,CAAC,kBAAkB,CAAC;YAC/B,MAAM,EAAE,CAAC;iBACN,IAAI,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;iBACtC,QAAQ,CAAC,uBAAuB,CAAC;SACrC;KACF,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1B,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,kBAAkB,MAAM,yBAAyB,MAAM,qGAAqG,MAAM,+CAA+C,MAAM,6QAA6Q;iBAC3e;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0BpE;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiR5D"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "fs";
|
|
2
|
+
import { join, dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the docs base directory. When running from src/ the markdown files
|
|
7
|
+
* sit next to this module. When running from dist/ we look in src/resources/.
|
|
8
|
+
*/
|
|
9
|
+
function getDocsBase() {
|
|
10
|
+
// Check if MD files live alongside the compiled module (dev / src)
|
|
11
|
+
if (existsSync(join(__dirname, "docs", "overview.md"))) {
|
|
12
|
+
return __dirname;
|
|
13
|
+
}
|
|
14
|
+
// Fallback: resolve from project root into src/resources (production / dist)
|
|
15
|
+
return join(__dirname, "..", "..", "src", "resources");
|
|
16
|
+
}
|
|
17
|
+
const docsBase = getDocsBase();
|
|
18
|
+
function loadDoc(relativePath) {
|
|
19
|
+
return readFileSync(join(docsBase, relativePath), "utf-8");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Registers all horizOn documentation resources on the given server.
|
|
23
|
+
*/
|
|
24
|
+
export function registerAllResources(server) {
|
|
25
|
+
// Overview
|
|
26
|
+
server.registerResource("overview", "horizon://overview", {
|
|
27
|
+
title: "horizOn Overview",
|
|
28
|
+
description: "What is horizOn, core concepts (Account vs User), features, tier system, API structure, and SDKs.",
|
|
29
|
+
mimeType: "text/markdown",
|
|
30
|
+
}, () => ({
|
|
31
|
+
contents: [
|
|
32
|
+
{
|
|
33
|
+
uri: "horizon://overview",
|
|
34
|
+
mimeType: "text/markdown",
|
|
35
|
+
text: loadDoc("docs/overview.md"),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}));
|
|
39
|
+
// Authentication
|
|
40
|
+
server.registerResource("docs-auth", "horizon://docs/auth", {
|
|
41
|
+
title: "Authentication",
|
|
42
|
+
description: "Authentication methods (Anonymous, Email, Google), endpoints, SDK code examples, and common errors.",
|
|
43
|
+
mimeType: "text/markdown",
|
|
44
|
+
}, () => ({
|
|
45
|
+
contents: [
|
|
46
|
+
{
|
|
47
|
+
uri: "horizon://docs/auth",
|
|
48
|
+
mimeType: "text/markdown",
|
|
49
|
+
text: loadDoc("docs/auth.md"),
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
}));
|
|
53
|
+
// Leaderboards
|
|
54
|
+
server.registerResource("docs-leaderboard", "horizon://docs/leaderboard", {
|
|
55
|
+
title: "Leaderboards",
|
|
56
|
+
description: "Leaderboard score submission, top entries, user rank, entries around user, with SDK examples.",
|
|
57
|
+
mimeType: "text/markdown",
|
|
58
|
+
}, () => ({
|
|
59
|
+
contents: [
|
|
60
|
+
{
|
|
61
|
+
uri: "horizon://docs/leaderboard",
|
|
62
|
+
mimeType: "text/markdown",
|
|
63
|
+
text: loadDoc("docs/leaderboard.md"),
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
}));
|
|
67
|
+
// Cloud Save
|
|
68
|
+
server.registerResource("docs-cloud-save", "horizon://docs/cloud-save", {
|
|
69
|
+
title: "Cloud Save",
|
|
70
|
+
description: "Cloud save/load for JSON and binary data, tier size limits, SDK examples.",
|
|
71
|
+
mimeType: "text/markdown",
|
|
72
|
+
}, () => ({
|
|
73
|
+
contents: [
|
|
74
|
+
{
|
|
75
|
+
uri: "horizon://docs/cloud-save",
|
|
76
|
+
mimeType: "text/markdown",
|
|
77
|
+
text: loadDoc("docs/cloud-save.md"),
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
}));
|
|
81
|
+
// Remote Config
|
|
82
|
+
server.registerResource("docs-remote-config", "horizon://docs/remote-config", {
|
|
83
|
+
title: "Remote Config",
|
|
84
|
+
description: "Server-side key-value configuration: feature flags, game balance, A/B testing. SDK examples.",
|
|
85
|
+
mimeType: "text/markdown",
|
|
86
|
+
}, () => ({
|
|
87
|
+
contents: [
|
|
88
|
+
{
|
|
89
|
+
uri: "horizon://docs/remote-config",
|
|
90
|
+
mimeType: "text/markdown",
|
|
91
|
+
text: loadDoc("docs/remote-config.md"),
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
}));
|
|
95
|
+
// News
|
|
96
|
+
server.registerResource("docs-news", "horizon://docs/news", {
|
|
97
|
+
title: "News",
|
|
98
|
+
description: "In-game news and announcements with language filtering. SDK examples.",
|
|
99
|
+
mimeType: "text/markdown",
|
|
100
|
+
}, () => ({
|
|
101
|
+
contents: [
|
|
102
|
+
{
|
|
103
|
+
uri: "horizon://docs/news",
|
|
104
|
+
mimeType: "text/markdown",
|
|
105
|
+
text: loadDoc("docs/news.md"),
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
}));
|
|
109
|
+
// Gift Codes
|
|
110
|
+
server.registerResource("docs-gift-codes", "horizon://docs/gift-codes", {
|
|
111
|
+
title: "Gift Codes",
|
|
112
|
+
description: "Gift code validation and redemption for promotional rewards. SDK examples.",
|
|
113
|
+
mimeType: "text/markdown",
|
|
114
|
+
}, () => ({
|
|
115
|
+
contents: [
|
|
116
|
+
{
|
|
117
|
+
uri: "horizon://docs/gift-codes",
|
|
118
|
+
mimeType: "text/markdown",
|
|
119
|
+
text: loadDoc("docs/gift-codes.md"),
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
}));
|
|
123
|
+
// Feedback
|
|
124
|
+
server.registerResource("docs-feedback", "horizon://docs/feedback", {
|
|
125
|
+
title: "User Feedback",
|
|
126
|
+
description: "Bug reports, feature requests, and general feedback submission. SDK examples.",
|
|
127
|
+
mimeType: "text/markdown",
|
|
128
|
+
}, () => ({
|
|
129
|
+
contents: [
|
|
130
|
+
{
|
|
131
|
+
uri: "horizon://docs/feedback",
|
|
132
|
+
mimeType: "text/markdown",
|
|
133
|
+
text: loadDoc("docs/feedback.md"),
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
}));
|
|
137
|
+
// User Logs
|
|
138
|
+
server.registerResource("docs-user-logs", "horizon://docs/user-logs", {
|
|
139
|
+
title: "User Logs",
|
|
140
|
+
description: "Server-side event and error tracking. Requires BASIC tier or higher. SDK examples.",
|
|
141
|
+
mimeType: "text/markdown",
|
|
142
|
+
}, () => ({
|
|
143
|
+
contents: [
|
|
144
|
+
{
|
|
145
|
+
uri: "horizon://docs/user-logs",
|
|
146
|
+
mimeType: "text/markdown",
|
|
147
|
+
text: loadDoc("docs/user-logs.md"),
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
}));
|
|
151
|
+
// API Reference
|
|
152
|
+
server.registerResource("api-reference", "horizon://api/reference", {
|
|
153
|
+
title: "App API Reference",
|
|
154
|
+
description: "Complete API reference for all horizOn App API endpoints with request/response schemas.",
|
|
155
|
+
mimeType: "text/markdown",
|
|
156
|
+
}, () => ({
|
|
157
|
+
contents: [
|
|
158
|
+
{
|
|
159
|
+
uri: "horizon://api/reference",
|
|
160
|
+
mimeType: "text/markdown",
|
|
161
|
+
text: loadDoc("api/app-api.md"),
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
}));
|
|
165
|
+
// Quickstart: Godot
|
|
166
|
+
server.registerResource("quickstart-godot", "horizon://quickstart/godot", {
|
|
167
|
+
title: "Godot Quickstart",
|
|
168
|
+
description: "Step-by-step guide to integrate horizOn in Godot with GDScript examples.",
|
|
169
|
+
mimeType: "text/markdown",
|
|
170
|
+
}, () => ({
|
|
171
|
+
contents: [
|
|
172
|
+
{
|
|
173
|
+
uri: "horizon://quickstart/godot",
|
|
174
|
+
mimeType: "text/markdown",
|
|
175
|
+
text: loadDoc("quickstart/godot.md"),
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
}));
|
|
179
|
+
// Quickstart: Unity
|
|
180
|
+
server.registerResource("quickstart-unity", "horizon://quickstart/unity", {
|
|
181
|
+
title: "Unity Quickstart",
|
|
182
|
+
description: "Step-by-step guide to integrate horizOn in Unity with C# examples.",
|
|
183
|
+
mimeType: "text/markdown",
|
|
184
|
+
}, () => ({
|
|
185
|
+
contents: [
|
|
186
|
+
{
|
|
187
|
+
uri: "horizon://quickstart/unity",
|
|
188
|
+
mimeType: "text/markdown",
|
|
189
|
+
text: loadDoc("quickstart/unity.md"),
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
}));
|
|
193
|
+
// Quickstart: Unreal
|
|
194
|
+
server.registerResource("quickstart-unreal", "horizon://quickstart/unreal", {
|
|
195
|
+
title: "Unreal Engine Quickstart",
|
|
196
|
+
description: "Guide to integrate horizOn in Unreal Engine using REST API (no official SDK). C++ and cURL examples.",
|
|
197
|
+
mimeType: "text/markdown",
|
|
198
|
+
}, () => ({
|
|
199
|
+
contents: [
|
|
200
|
+
{
|
|
201
|
+
uri: "horizon://quickstart/unreal",
|
|
202
|
+
mimeType: "text/markdown",
|
|
203
|
+
text: loadDoc("quickstart/unreal.md"),
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D;;;GAGG;AACH,SAAS,WAAW;IAClB,mEAAmE;IACnE,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC;QACvD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,6EAA6E;IAC7E,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;AAE/B,SAAS,OAAO,CAAC,YAAoB;IACnC,OAAO,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,WAAW;IACX,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,oBAAoB,EACpB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,mGAAmG;Q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;QACzB,WAAW,EACT,oEAAoE;QACtE,QAAQ,EAAE,eAAe;KAC1B,EACD,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,4BAA4B;gBACjC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC;aACrC;SACF;KACF,CAAC,CACH,CAAC;IAEF,qBAAqB;IACrB,MAAM,CAAC,gBAAgB,CACrB,mBAAmB,EACnB,6BAA6B,EAC7B;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,sGAAsG;QACxG,QAAQ,EAAE,eAAe;KAC1B,EACD,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,6BAA6B;gBAClC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,OAAO,CAAC,sBAAsB,CAAC;aACtC;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,wBAAgB,YAAY,IAAI,SAAS,CAWxC"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { registerAllResources } from "./resources/index.js";
|
|
3
|
+
import { registerAllTools } from "./tools/index.js";
|
|
4
|
+
import { registerAllPrompts } from "./prompts/index.js";
|
|
5
|
+
export function createServer() {
|
|
6
|
+
const server = new McpServer({
|
|
7
|
+
name: "horizon-mcp",
|
|
8
|
+
version: "0.1.0",
|
|
9
|
+
});
|
|
10
|
+
registerAllResources(server);
|
|
11
|
+
registerAllTools(server);
|
|
12
|
+
registerAllPrompts(server);
|
|
13
|
+
return server;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAE3B,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.test.d.ts","sourceRoot":"","sources":["../../../src/tools/__tests__/api-client.test.ts"],"names":[],"mappings":""}
|