fa-mcp-sdk 0.2.3
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 +283 -0
- package/dist/core/_types_/types.d.ts +67 -0
- package/dist/core/_types_/types.d.ts.map +1 -0
- package/dist/core/_types_/types.js +2 -0
- package/dist/core/_types_/types.js.map +1 -0
- package/dist/core/bootstrap/dotenv.d.ts +3 -0
- package/dist/core/bootstrap/dotenv.d.ts.map +1 -0
- package/dist/core/bootstrap/dotenv.js +3 -0
- package/dist/core/bootstrap/dotenv.js.map +1 -0
- package/dist/core/bootstrap/init-config.d.ts +11 -0
- package/dist/core/bootstrap/init-config.d.ts.map +1 -0
- package/dist/core/bootstrap/init-config.js +52 -0
- package/dist/core/bootstrap/init-config.js.map +1 -0
- package/dist/core/bootstrap/startup-info.d.ts +6 -0
- package/dist/core/bootstrap/startup-info.d.ts.map +1 -0
- package/dist/core/bootstrap/startup-info.js +43 -0
- package/dist/core/bootstrap/startup-info.js.map +1 -0
- package/dist/core/constants.d.ts +2 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +2 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/consul/access-points-updater.d.ts +5 -0
- package/dist/core/consul/access-points-updater.d.ts.map +1 -0
- package/dist/core/consul/access-points-updater.js +11 -0
- package/dist/core/consul/access-points-updater.js.map +1 -0
- package/dist/core/consul/deregister.d.ts +2 -0
- package/dist/core/consul/deregister.d.ts.map +1 -0
- package/dist/core/consul/deregister.js +21 -0
- package/dist/core/consul/deregister.js.map +1 -0
- package/dist/core/consul/get-consul-api.d.ts +2 -0
- package/dist/core/consul/get-consul-api.d.ts.map +1 -0
- package/dist/core/consul/get-consul-api.js +18 -0
- package/dist/core/consul/get-consul-api.js.map +1 -0
- package/dist/core/consul/register.d.ts +2 -0
- package/dist/core/consul/register.d.ts.map +1 -0
- package/dist/core/consul/register.js +6 -0
- package/dist/core/consul/register.js.map +1 -0
- package/dist/core/db/pg-db.d.ts +50 -0
- package/dist/core/db/pg-db.d.ts.map +1 -0
- package/dist/core/db/pg-db.js +89 -0
- package/dist/core/db/pg-db.js.map +1 -0
- package/dist/core/debug.d.ts +5 -0
- package/dist/core/debug.d.ts.map +1 -0
- package/dist/core/debug.js +32 -0
- package/dist/core/debug.js.map +1 -0
- package/dist/core/ee.d.ts +3 -0
- package/dist/core/ee.d.ts.map +1 -0
- package/dist/core/ee.js +4 -0
- package/dist/core/ee.js.map +1 -0
- package/dist/core/errors/BaseMcpError.d.ts +19 -0
- package/dist/core/errors/BaseMcpError.d.ts.map +1 -0
- package/dist/core/errors/BaseMcpError.js +47 -0
- package/dist/core/errors/BaseMcpError.js.map +1 -0
- package/dist/core/errors/ValidationError.d.ts +5 -0
- package/dist/core/errors/ValidationError.d.ts.map +1 -0
- package/dist/core/errors/ValidationError.js +7 -0
- package/dist/core/errors/ValidationError.js.map +1 -0
- package/dist/core/errors/errors.d.ts +24 -0
- package/dist/core/errors/errors.d.ts.map +1 -0
- package/dist/core/errors/errors.js +49 -0
- package/dist/core/errors/errors.js.map +1 -0
- package/dist/core/index.d.ts +19 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +16 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/init-mcp-server.d.ts +8 -0
- package/dist/core/init-mcp-server.d.ts.map +1 -0
- package/dist/core/init-mcp-server.js +101 -0
- package/dist/core/init-mcp-server.js.map +1 -0
- package/dist/core/logger.d.ts +6 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +53 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/mcp/create-mcp-server.d.ts +6 -0
- package/dist/core/mcp/create-mcp-server.d.ts.map +1 -0
- package/dist/core/mcp/create-mcp-server.js +44 -0
- package/dist/core/mcp/create-mcp-server.js.map +1 -0
- package/dist/core/mcp/prompts.d.ts +10 -0
- package/dist/core/mcp/prompts.d.ts.map +1 -0
- package/dist/core/mcp/prompts.js +56 -0
- package/dist/core/mcp/prompts.js.map +1 -0
- package/dist/core/mcp/resources.d.ts +14 -0
- package/dist/core/mcp/resources.d.ts.map +1 -0
- package/dist/core/mcp/resources.js +72 -0
- package/dist/core/mcp/resources.js.map +1 -0
- package/dist/core/mcp/server-stdio.d.ts +5 -0
- package/dist/core/mcp/server-stdio.d.ts.map +1 -0
- package/dist/core/mcp/server-stdio.js +13 -0
- package/dist/core/mcp/server-stdio.js.map +1 -0
- package/dist/core/token/gen-token-app/gen-token-server.d.ts +2 -0
- package/dist/core/token/gen-token-app/gen-token-server.d.ts.map +1 -0
- package/dist/core/token/gen-token-app/gen-token-server.js +115 -0
- package/dist/core/token/gen-token-app/gen-token-server.js.map +1 -0
- package/dist/core/token/gen-token-app/html.d.ts +2 -0
- package/dist/core/token/gen-token-app/html.d.ts.map +1 -0
- package/dist/core/token/gen-token-app/html.js +500 -0
- package/dist/core/token/gen-token-app/html.js.map +1 -0
- package/dist/core/token/i-token.d.ts +13 -0
- package/dist/core/token/i-token.d.ts.map +1 -0
- package/dist/core/token/i-token.js +2 -0
- package/dist/core/token/i-token.js.map +1 -0
- package/dist/core/token/token-core.d.ts +24 -0
- package/dist/core/token/token-core.d.ts.map +1 -0
- package/dist/core/token/token-core.js +130 -0
- package/dist/core/token/token-core.js.map +1 -0
- package/dist/core/token/token.d.ts +17 -0
- package/dist/core/token/token.d.ts.map +1 -0
- package/dist/core/token/token.js +62 -0
- package/dist/core/token/token.js.map +1 -0
- package/dist/core/utils/formatToolResult.d.ts +7 -0
- package/dist/core/utils/formatToolResult.d.ts.map +1 -0
- package/dist/core/utils/formatToolResult.js +68 -0
- package/dist/core/utils/formatToolResult.js.map +1 -0
- package/dist/core/utils/rate-limit.d.ts +17 -0
- package/dist/core/utils/rate-limit.d.ts.map +1 -0
- package/dist/core/utils/rate-limit.js +56 -0
- package/dist/core/utils/rate-limit.js.map +1 -0
- package/dist/core/utils/utils.d.ts +6 -0
- package/dist/core/utils/utils.d.ts.map +1 -0
- package/dist/core/utils/utils.js +12 -0
- package/dist/core/utils/utils.js.map +1 -0
- package/dist/core/web/about-page/css.d.ts +2 -0
- package/dist/core/web/about-page/css.d.ts.map +1 -0
- package/dist/core/web/about-page/css.js +534 -0
- package/dist/core/web/about-page/css.js.map +1 -0
- package/dist/core/web/about-page/render.d.ts +2 -0
- package/dist/core/web/about-page/render.d.ts.map +1 -0
- package/dist/core/web/about-page/render.js +679 -0
- package/dist/core/web/about-page/render.js.map +1 -0
- package/dist/core/web/cors.d.ts +5 -0
- package/dist/core/web/cors.d.ts.map +1 -0
- package/dist/core/web/cors.js +22 -0
- package/dist/core/web/cors.js.map +1 -0
- package/dist/core/web/favicon-svg.d.ts +7 -0
- package/dist/core/web/favicon-svg.d.ts.map +1 -0
- package/dist/core/web/favicon-svg.js +44 -0
- package/dist/core/web/favicon-svg.js.map +1 -0
- package/dist/core/web/server-http.d.ts +5 -0
- package/dist/core/web/server-http.d.ts.map +1 -0
- package/dist/core/web/server-http.js +275 -0
- package/dist/core/web/server-http.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
2
|
+
// noinspection JSUnusedGlobalSymbols
|
|
3
|
+
import { red, reset } from 'af-color';
|
|
4
|
+
import { appConfig } from './bootstrap/init-config.js';
|
|
5
|
+
import { getAFLogger } from 'af-logger-ts';
|
|
6
|
+
const { level, useFileLogger } = appConfig.logger;
|
|
7
|
+
// Check if we're in STDIO mode to disable console logging
|
|
8
|
+
const isStdioMode = appConfig.mcp.transportType === 'stdio';
|
|
9
|
+
let logger;
|
|
10
|
+
let fileLogger;
|
|
11
|
+
if (appConfig.mcp.transportType === 'stdio') {
|
|
12
|
+
logger = {};
|
|
13
|
+
['log', 'error', 'fatal', 'warn', 'info', 'debug', 'silly', 'trace'].forEach((level) => {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
logger[level] = (...args) => {
|
|
16
|
+
process.stderr.write(`[MY LOG] ${args.map(String).join(' ')}\n`);
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
logger.getSubLogger = () => {
|
|
21
|
+
return logger;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const { logger: l, fileLogger: fl } = getAFLogger({
|
|
26
|
+
level: isStdioMode ? 'error' : level, // Suppress most logs in STDIO mode
|
|
27
|
+
maxSize: '500m',
|
|
28
|
+
name: '\x1b[1P',
|
|
29
|
+
filePrefix: appConfig.name,
|
|
30
|
+
minLogSize: 0,
|
|
31
|
+
minErrorLogSize: 0,
|
|
32
|
+
prettyLogTemplate: '[{{hh}}:{{MM}}:{{ss}}]: {{logLevelName}} [{{name}}] ',
|
|
33
|
+
prettyErrorTemplate: `${red}{{errorMessage}}${reset}\n{{errorStack}}`,
|
|
34
|
+
maskValuesRegEx: [
|
|
35
|
+
// API tokens and keys
|
|
36
|
+
/token['":\s]+['"]\w+['"]/gi,
|
|
37
|
+
/api[_-]?key['":\s]+['"]\w+['"]/gi,
|
|
38
|
+
/secret['":\s]+['"]\w+['"]/gi,
|
|
39
|
+
/password['":\s]+['"]\w+['"]/gi,
|
|
40
|
+
// Authorization headers
|
|
41
|
+
/authorization['":\s]+['"](basic|bearer)\s+\w+['"]/gi,
|
|
42
|
+
// Email patterns (partial masking)
|
|
43
|
+
/([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/gi,
|
|
44
|
+
// URL credentials
|
|
45
|
+
/https?:\/\/[^:]+:[^@]+@/gi,
|
|
46
|
+
],
|
|
47
|
+
noFileLogger: !Boolean(useFileLogger),
|
|
48
|
+
});
|
|
49
|
+
logger = l;
|
|
50
|
+
fileLogger = fl;
|
|
51
|
+
}
|
|
52
|
+
export { logger, fileLogger, useFileLogger };
|
|
53
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger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AAC,KAAK,EAAE,mCAAmC;QACzE,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,SAAS,CAAC,IAAI;QAC1B,UAAU,EAAE,CAAC;QACb,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,sDAAsD;QACzE,mBAAmB,EAAE,GAAG,GAAG,mBAAmB,KAAK,kBAAkB;QACrE,eAAe,EAAE;YACf,sBAAsB;YACtB,4BAA4B;YAC5B,kCAAkC;YAClC,6BAA6B;YAC7B,+BAA+B;YAC/B,wBAAwB;YACxB,qDAAqD;YACrD,mCAAmC;YACnC,sDAAsD;YACtD,kBAAkB;YAClB,2BAA2B;SAC5B;QACD,YAAY,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;KACtC,CAAC,CAAC;IACH,MAAM,GAAG,CAAC,CAAC;IACX,UAAU,GAAG,EAAE,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-mcp-server.d.ts","sourceRoot":"","sources":["../../../src/core/mcp/create-mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAcnE;;GAEG;AACH,wBAAgB,eAAe,IAAK,MAAM,CA4CzC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { appConfig, getProjectData } from '../bootstrap/init-config.js';
|
|
4
|
+
import { getPrompt, getPromptsList } from './prompts.js';
|
|
5
|
+
import { getResource, getResourcesList } from './resources.js';
|
|
6
|
+
/**
|
|
7
|
+
* Create MCP Server instance with registered tool and prompt handlers
|
|
8
|
+
*/
|
|
9
|
+
export function createMcpServer() {
|
|
10
|
+
const server = new Server({
|
|
11
|
+
name: appConfig.name,
|
|
12
|
+
version: appConfig.version,
|
|
13
|
+
}, {
|
|
14
|
+
capabilities: {
|
|
15
|
+
tools: {},
|
|
16
|
+
prompts: {},
|
|
17
|
+
resources: {},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
// Handler for listing available tools
|
|
21
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
22
|
+
const { tools } = getProjectData();
|
|
23
|
+
return { tools };
|
|
24
|
+
});
|
|
25
|
+
// Handler for tool execution
|
|
26
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
27
|
+
const { toolHandler } = getProjectData();
|
|
28
|
+
const result = await toolHandler(request.params);
|
|
29
|
+
return {
|
|
30
|
+
content: result.content,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
// Handler for listing available prompts
|
|
34
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => getPromptsList());
|
|
35
|
+
// Handler for getting prompt content
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => await getPrompt(request));
|
|
38
|
+
// Handler for listing available resources
|
|
39
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => getResourcesList());
|
|
40
|
+
// Handler for reading resource content
|
|
41
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => getResource(request.params.uri));
|
|
42
|
+
return server;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=create-mcp-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-mcp-server.js","sourceRoot":"","sources":["../../../src/core/mcp/create-mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,0BA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AAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjH,0CAA0C;IAC1C,MAAM,CAAC,iBAAiB,CAAC,0BAA0B,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAErF,uCAAuC;IACvC,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAA6B,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9H,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts for fin-office SQL Agent
|
|
3
|
+
* Two-level agent description system for LLM agent selection
|
|
4
|
+
*/
|
|
5
|
+
import { IGetPromptRequest } from '../_types_/types.js';
|
|
6
|
+
export declare function getPromptsList(): {
|
|
7
|
+
prompts: any[];
|
|
8
|
+
};
|
|
9
|
+
export declare const getPrompt: (request: IGetPromptRequest) => Promise<any>;
|
|
10
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/core/mcp/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAkB,MAAM,qBAAqB,CAAC;AAiCxE,wBAAgB,cAAc;;EAK7B;AAED,eAAO,MAAM,SAAS,GAAU,SAAS,iBAAiB,KAAG,OAAO,CAAC,GAAG,CAsBvE,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { getProjectData } from '../bootstrap/init-config.js';
|
|
2
|
+
function createPrompts() {
|
|
3
|
+
const { agentBrief, agentPrompt, customPrompts = [] } = getProjectData();
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
name: 'agent_brief',
|
|
7
|
+
description: 'Brief description of the agent to be selected in the agent system',
|
|
8
|
+
arguments: [],
|
|
9
|
+
content: agentBrief,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: 'agent_prompt',
|
|
13
|
+
description: 'Detailed prompt of the agent',
|
|
14
|
+
arguments: [],
|
|
15
|
+
content: agentPrompt,
|
|
16
|
+
},
|
|
17
|
+
...customPrompts,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
// Lazy initialization - prompts are created when first accessed
|
|
21
|
+
let _prompts = null;
|
|
22
|
+
function getPrompts() {
|
|
23
|
+
if (!_prompts) {
|
|
24
|
+
_prompts = createPrompts();
|
|
25
|
+
}
|
|
26
|
+
return _prompts;
|
|
27
|
+
}
|
|
28
|
+
export function getPromptsList() {
|
|
29
|
+
const prompts = getPrompts();
|
|
30
|
+
return {
|
|
31
|
+
prompts: prompts.map(({ content, ...rest }) => ({ ...rest })),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export const getPrompt = async (request) => {
|
|
35
|
+
const { name } = request.params;
|
|
36
|
+
const prompts = getPrompts();
|
|
37
|
+
let content = prompts.filter((p) => p.name === name).map((p) => p.content)[0] || null;
|
|
38
|
+
if (typeof content === 'function') {
|
|
39
|
+
content = await content(request);
|
|
40
|
+
}
|
|
41
|
+
if (!content) {
|
|
42
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
messages: [
|
|
46
|
+
{
|
|
47
|
+
role: 'system',
|
|
48
|
+
content: {
|
|
49
|
+
type: 'text',
|
|
50
|
+
text: content,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/core/mcp/prompts.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,SAAS,aAAa;IACpB,MAAM,EAAE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,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,OAAO;iBACd;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources for Agent
|
|
3
|
+
*/
|
|
4
|
+
export declare const getResourcesList: () => {
|
|
5
|
+
resources: any[];
|
|
6
|
+
};
|
|
7
|
+
export declare const getResource: (uri: string) => {
|
|
8
|
+
contents: {
|
|
9
|
+
uri: any;
|
|
10
|
+
mimeType: any;
|
|
11
|
+
text: any;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/core/mcp/resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwDH,eAAO,MAAM,gBAAgB;;CAK5B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM;;;;;;CAiBtC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Resources for Agent
|
|
3
|
+
*/
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import { ROOT_PROJECT_DIR } from '../constants.js';
|
|
7
|
+
import { appConfig, getProjectData } from '../bootstrap/init-config.js';
|
|
8
|
+
let readme = fs.readFileSync(path.join(ROOT_PROJECT_DIR, './README.md'), 'utf-8');
|
|
9
|
+
let packageJson;
|
|
10
|
+
try {
|
|
11
|
+
packageJson = JSON.parse(fs.readFileSync(path.join(ROOT_PROJECT_DIR, './package.json'), 'utf-8'));
|
|
12
|
+
readme = readme.replace(/\[!\[Version]\([^)]+\)]\(([^)]+\))/, `Version: ${packageJson.version}`);
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
console.error(err);
|
|
16
|
+
}
|
|
17
|
+
const createResources = () => {
|
|
18
|
+
let { customResources, requiredHttpHeaders } = getProjectData();
|
|
19
|
+
customResources = (customResources || []);
|
|
20
|
+
const resources = [
|
|
21
|
+
{
|
|
22
|
+
uri: 'doc://readme',
|
|
23
|
+
name: `README - ${appConfig.productName}`,
|
|
24
|
+
description: `${appConfig.productName} project documentation:
|
|
25
|
+
installation, launch (STDIO/HTTP), MCP API, configuration, testing and deployment.`,
|
|
26
|
+
mimeType: 'text/plain',
|
|
27
|
+
content: readme,
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
requiredHttpHeaders = (requiredHttpHeaders || []);
|
|
31
|
+
if (requiredHttpHeaders.length) {
|
|
32
|
+
resources.push({
|
|
33
|
+
uri: 'required://http-headers',
|
|
34
|
+
name: 'Required http headers',
|
|
35
|
+
description: 'Required http headers',
|
|
36
|
+
mimeType: 'application/json',
|
|
37
|
+
content: requiredHttpHeaders,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return [...resources, ...customResources];
|
|
41
|
+
};
|
|
42
|
+
// Lazy initialization - resources are created when first accessed
|
|
43
|
+
let _resources = null;
|
|
44
|
+
const getResources = () => {
|
|
45
|
+
if (!_resources) {
|
|
46
|
+
_resources = createResources();
|
|
47
|
+
}
|
|
48
|
+
return _resources;
|
|
49
|
+
};
|
|
50
|
+
export const getResourcesList = () => {
|
|
51
|
+
const resources = getResources();
|
|
52
|
+
return {
|
|
53
|
+
resources: resources.map(({ content, ...rest }) => ({ ...rest })),
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export const getResource = (uri) => {
|
|
57
|
+
const resources = getResources();
|
|
58
|
+
const resource = resources.find((r) => r.uri === uri);
|
|
59
|
+
if (!resource) {
|
|
60
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
contents: [
|
|
64
|
+
{
|
|
65
|
+
uri: resource.uri,
|
|
66
|
+
mimeType: resource.mimeType,
|
|
67
|
+
text: resource.content,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/core/mcp/resources.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGxE,IAAI,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;AAClF,IAAI,WAAgB,CAAC;AACrB,IAAI,CAAC;IACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAClG,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,oCAAoC,EAAE,YAAY,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;AACnG,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAGD,MAAM,eAAe,GAAG,GAAoB,EAAE;IAC5C,IAAI,EAAE,eAAe,E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,GAAW,EAAE,EAAE;IACzC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IAEtD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,QAAQ,CAAC,GAAG;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,IAAI,EAAE,QAAQ,CAAC,OAAO;aACvB;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-stdio.d.ts","sourceRoot":"","sources":["../../../src/core/mcp/server-stdio.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAsB,gBAAgB,IAAK,OAAO,CAAC,IAAI,CAAC,CAIvD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
|
+
import { createMcpServer } from './create-mcp-server.js';
|
|
3
|
+
// Create server instance
|
|
4
|
+
const server = createMcpServer();
|
|
5
|
+
/**
|
|
6
|
+
* Start STDIO server
|
|
7
|
+
*/
|
|
8
|
+
export async function startStdioServer() {
|
|
9
|
+
const transport = new StdioServerTransport();
|
|
10
|
+
await server.connect(transport);
|
|
11
|
+
console.error('MCP Server running on stdio');
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=server-stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-stdio.js","sourceRoot":"","sources":["../../../src/core/mcp/server-stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,yBAAyB;AACzB,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen-token-server.d.ts","sourceRoot":"","sources":["../../../../src/core/token/gen-token-app/gen-token-server.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,uGA+H7C,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { appConfig } from '../../bootstrap/init-config.js';
|
|
2
|
+
import express from 'express';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { getHTMLPage } from './html.js';
|
|
5
|
+
import { checkToken, generateToken } from '../token-core.js';
|
|
6
|
+
import { isMainModule } from '../../utils/utils.js';
|
|
7
|
+
export const generateTokenApp = (port) => {
|
|
8
|
+
port = port || Number(process.env.TOKEN_GEN_PORT || 3030);
|
|
9
|
+
const logger = {
|
|
10
|
+
info: (msg, ...args) => console.log(chalk.cyan('[TOKEN-GEN]'), msg, ...args),
|
|
11
|
+
error: (msg, ...args) => console.error(chalk.red('[TOKEN-GEN ERROR]'), msg, ...args),
|
|
12
|
+
};
|
|
13
|
+
const app = express();
|
|
14
|
+
app.use(express.json());
|
|
15
|
+
app.use(express.urlencoded({ extended: true }));
|
|
16
|
+
const timeToSeconds = {
|
|
17
|
+
minutes: 60,
|
|
18
|
+
hours: 60 * 60,
|
|
19
|
+
days: 60 * 60 * 24,
|
|
20
|
+
months: 60 * 60 * 24 * 30,
|
|
21
|
+
years: 60 * 60 * 24 * 365,
|
|
22
|
+
};
|
|
23
|
+
app.get('/', (_req, res) => {
|
|
24
|
+
res.send(getHTMLPage());
|
|
25
|
+
});
|
|
26
|
+
app.post('/api/generate-token', (req, res) => {
|
|
27
|
+
try {
|
|
28
|
+
const { user, timeValue, timeUnit, payload } = req.body;
|
|
29
|
+
if (!user || !timeValue || !timeUnit) {
|
|
30
|
+
return res.json({
|
|
31
|
+
success: false,
|
|
32
|
+
error: 'Need to fill in the user and token lifetime',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const multiplier = timeToSeconds[timeUnit];
|
|
36
|
+
if (!multiplier) {
|
|
37
|
+
return res.json({
|
|
38
|
+
success: false,
|
|
39
|
+
error: 'Invalid Time Unit',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const liveTimeSec = timeValue * multiplier;
|
|
43
|
+
const token = generateToken(user, liveTimeSec, payload || {});
|
|
44
|
+
logger.info(`Generated token for user: ${user}, duration: ${timeValue} ${timeUnit}`);
|
|
45
|
+
return res.json({
|
|
46
|
+
success: true,
|
|
47
|
+
token: token,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
logger.error('Error generating token:', error);
|
|
52
|
+
return res.json({
|
|
53
|
+
success: false,
|
|
54
|
+
error: error.message,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
app.post('/api/validate-token', (req, res) => {
|
|
59
|
+
try {
|
|
60
|
+
const { token } = req.body;
|
|
61
|
+
if (!token) {
|
|
62
|
+
return res.json({
|
|
63
|
+
success: false,
|
|
64
|
+
error: 'Token Not Transferred',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const result = checkToken(token);
|
|
68
|
+
if ('errorReason' in result) {
|
|
69
|
+
return res.json({
|
|
70
|
+
success: false,
|
|
71
|
+
error: result.errorReason,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
logger.info(`Token validated successfully for user: ${result.payload?.user}`);
|
|
75
|
+
return res.json({
|
|
76
|
+
success: true,
|
|
77
|
+
payload: result.payload,
|
|
78
|
+
tokenType: result.inTokenType,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
logger.error('Error validating token:', error);
|
|
83
|
+
return res.json({
|
|
84
|
+
success: false,
|
|
85
|
+
error: error.message,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
app.get('/api/service-info', (_req, res) => {
|
|
90
|
+
try {
|
|
91
|
+
res.json({
|
|
92
|
+
success: true,
|
|
93
|
+
serviceName: appConfig.name,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
logger.error('Error getting service info:', error);
|
|
98
|
+
res.json({
|
|
99
|
+
success: false,
|
|
100
|
+
error: error.message,
|
|
101
|
+
serviceName: 'mcp-server', // fallback
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return app.listen(port, () => {
|
|
106
|
+
logger.info(`Token Generator Server started on port ${port}`);
|
|
107
|
+
logger.info(`Open http://localhost:${port} in your browser`);
|
|
108
|
+
logger.info('Press Ctrl+C to stop the server');
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
// Auto-start if this file is run directly
|
|
112
|
+
if (isMainModule(import.meta.url)) {
|
|
113
|
+
generateTokenApp();
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=gen-token-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen-token-server.js","sourceRoot":"","sources":["../../../../src/core/token/gen-token-app/gen-token-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,OAA8B,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAA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