A TypeScript-based server implementation for Model Context Protocol (MCP) that provides integration tools for various services like JIRA and TODO management.
src/
├── config/ # Tool configurations
│ ├── jira-tool.config.ts
│ └── todo-tool.config.ts
├── constant/ # Constant definitions
│ └── tool-name.ts
├── schema/ # Zod schemas for validation
│ ├── jira.ts
│ └── todo.ts
├── server/ # Server management
│ └── mcp-server-tool-manager.ts
├── tools/ # Tool implementations
│ ├── jira/
│ │ └── create-issue.ts
│ └── todo/
│ └── create-todo.ts
└── index.ts # Main entry point
// 1. Add constant
export const NEW_TOOL = {
ACTION: "action_name"
} as const;
// 2. Create schema
export const newToolSchema = z.object({
// ... schema definition
});
// 3. Implement handler
export const handleAction = async (
args: z.infer<typeof newToolSchema>,
extra: RequestHandlerExtra
): Promise<CallToolResult> => {
// ... implementation
};
// 4. Add configuration
export const newToolConfig = {
name: "New Tool",
version: "1.0.0",
tools: [
{
name: NEW_TOOL.ACTION,
schema: newToolSchema,
handler: handleAction,
},
],
};