Home / MCP / Task MCP Server

Task MCP Server

Provides a dual-interface MCP server for managing tasks via STDIO and HTTP+SSE, with validation and error handling.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "task_mcp_http": {
            "url": "https://mcp.example.com/mcp"
        }
    }
}

You can run a dual-interface MCP server that exposes task management operations over STDIO for CLI and AI agent use, and over HTTP+SSE for web-based clients. It connects to an external Task API and provides a structured, validated set of task operations with robust error handling.

How to use

Use the STDIO interface when you want to integrate the server with CLI tools or AI agents that communicate through standard input and output. Use the HTTP+SSE interface when you want to access the server from a browser or any HTTP client.

Common usage patterns include listing tasks, creating new tasks, updating task details, and deleting completed tasks. The server provides a complete MCP protocol implementation and handles validation and errors to ensure reliable integration.

How to install

Prerequisites you need before starting:

- Node.js 16.x or higher

- npm (or pnpm) as your package manager

Step-by-step commands to set up and run the server:

# 1. Install dependencies
npm install

# 2. Create configuration file with your Task API credentials
# Example values shown as placeholders
TASK_MANAGER_API_BASE_URL=https://your-task-api-url.com/api
TASK_MANAGER_API_KEY=your_api_key_here
TASK_MANAGER_HTTP_PORT=3000

# 3. Build the project
npm run build

Additional configuration and usage notes

Configuration relies on environment variables that wire the MCP server to your external Task API and HTTP port. The following environment variables are used:

- TASK_MANAGER_API_BASE_URL: Base URL for the external Task API (required)

- TASK_MANAGER_API_KEY: API key for authenticating with the Task API (required)

- TASK_MANAGER_HTTP_PORT: Port on which the HTTP+SSE server listens (default 3000)

- PORT: Alternative port name (takes precedence if set)

You can override the HTTP port by setting TASK_MANAGER_HTTP_PORT or PORT, then access the HTTP interface at the server URL and path used by your environment (for example, http://localhost:3000/mcp).

Environment and runtime details

The server supports two runtime modes:

- STDIO Mode for CLI-based or AI agent integration

- HTTP+SSE Mode for web clients

To start in STDIO mode you typically run the start script directly, or invoke the runtime with the built distribution.

To start in HTTP mode you run the HTTP-specific start command and then connect via a browser or HTTP client to the designated endpoint.

Troubleshooting

If you encounter connection issues, verify that your TASK_MANAGER_API_BASE_URL and TASK_MANAGER_API_KEY are correct and that the external Task API is reachable.

Ensure the HTTP port you configured is open and not blocked by a firewall.

Notes

This MCP server is designed to work with an external Task API service and to provide a consistent interface for task operations across STDIO and HTTP+SSE protocols.

Available tools

listTasks

Lists all tasks with optional filtering by status, category, and priority.

createTask

Creates a new task with provided description, category, and priority.

updateTask

Updates an existing task’s details such as description, status, category, or priority.

deleteTask

Deletes a task by its identifier.