MCPcopy Index your code
hub / github.com/PaystackOSS/paystack-mcp-server / createServer

Function createServer

src/server.ts:32–55  ·  view source on GitHub ↗
(cliApiKey?: string)

Source from the content-addressed store, hash-verified

30`;
31
32async function createServer(cliApiKey?: string) {
33 const server = new McpServer(
34 {
35 name: 'paystack',
36 version: '0.0.1',
37 },
38 {
39 instructions: SERVER_INSTRUCTIONS,
40 },
41 );
42
43 const oasPath = path.join(__dirname, './', 'data/paystack.openapi.yaml');
44 const openapi = new OpenAPIParser(oasPath);
45
46 await openapi.parse();
47
48 const bundledSkillPath = path.join(__dirname, 'data', 'paystack-skill.md');
49 const skillContent = await loadSkillContent(bundledSkillPath);
50
51 registerAllTools(server, openapi, cliApiKey);
52 registerAllResources(server, openapi, skillContent);
53
54 return server;
55}
56
57export async function startServer(cliApiKey?: string) {
58 const server = await createServer(cliApiKey);

Callers 1

startServerFunction · 0.85

Calls 4

parseMethod · 0.95
loadSkillContentFunction · 0.90
registerAllToolsFunction · 0.90
registerAllResourcesFunction · 0.90

Tested by

no test coverage detected