25 lines
679 B
TypeScript
25 lines
679 B
TypeScript
|
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||
|
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||
|
|
import { registerResources } from "./resources/index.js";
|
||
|
|
import { registerTools } from "./tools/index.js";
|
||
|
|
|
||
|
|
const mcp = new McpServer(
|
||
|
|
{
|
||
|
|
name: "tasks-mcp-server",
|
||
|
|
version: "0.1.0",
|
||
|
|
},
|
||
|
|
{
|
||
|
|
instructions:
|
||
|
|
"Tools and resources for the Tasks project management app: objects, workspaces, views, and templates.",
|
||
|
|
},
|
||
|
|
);
|
||
|
|
|
||
|
|
registerTools(mcp);
|
||
|
|
registerResources(mcp);
|
||
|
|
|
||
|
|
const transport = new StdioServerTransport();
|
||
|
|
|
||
|
|
await mcp.connect(transport);
|
||
|
|
|
||
|
|
console.error("[tasks-mcp-server] MCP server listening on stdio");
|