adds support for explicit version (#289)
This commit is contained in:
1 parent
cb52cbb03b
commit
a48cf65c9d
8 files changed
+136
-3010
No files matched your search
+1
-9
@@ -2,16 +2,8 @@ import tools from './tools/index.js';
|
||||
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
||||
import pkg from '../package.json' with { type: 'json' };
|
||||
import { isToolPermittedByUser } from './config.js';
|
||||
import { type SmitheryConfig, setOptions } from './config.js';
|
||||
export { configSchema } from './config.js';
|
||||
|
||||
type CreateMcpServerOptions = {
|
||||
config: SmitheryConfig;
|
||||
};
|
||||
|
||||
export default function createMcpServer(options?: CreateMcpServerOptions): McpServer {
|
||||
if (options?.config) setOptions(options.config);
|
||||
|
||||
export default function createMcpServer(): McpServer {
|
||||
const mcpServer = new McpServer(
|
||||
{
|
||||
version: pkg.version,
|
||||
|
||||
Reference in new issue
Block a user