clickup-mcp-server
Version:
A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with the ClickUp API
105 lines (81 loc) • 2.45 kB
Markdown
This directory contains examples demonstrating how to use the ClickUp MCP Server in different scenarios.
The `basic-usage.js` file demonstrates how to:
1. Connect to the ClickUp MCP Server
2. List available tools
3. Retrieve workspaces
4. Retrieve spaces
5. Retrieve lists
6. Retrieve tasks
7. Display task details
1. Make sure you have built the ClickUp MCP Server:
```bash
npm run build
```
2. Set your ClickUp API token as an environment variable:
```bash
export CLICKUP_API_TOKEN=your_api_token_here
set CLICKUP_API_TOKEN=your_api_token_here
$env:CLICKUP_API_TOKEN="your_api_token_here"
```
3. Run the example:
```bash
node examples/basic-usage.js
```
To create your own client that uses the ClickUp MCP Server:
1. Install the MCP SDK:
```bash
npm install @modelcontextprotocol/sdk
```
2. Create a transport to communicate with the ClickUp MCP Server:
```javascript
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const transport = new StdioClientTransport({
command: 'node',
args: ['path/to/clickup-mcp-server/build/index.js'],
env: {
CLICKUP_API_TOKEN: 'your_api_token_here'
}
});
```
3. Create an MCP client:
```javascript
const client = new Client(
{
name: 'your-client-name',
version: '1.0.0'
},
{
capabilities: {
tools: {}
}
}
);
```
4. Connect to the ClickUp MCP Server and use its tools:
```javascript
await client.connect(transport);
// Call a tool
const result = await client.callTool({
name: 'get_workspaces',
arguments: {}
});
// Process the result
console.log(result.content[0].text);
// Close the connection when done
await client.close();
```
More examples will be added in the future to demonstrate:
- Using resources instead of tools
- Working with tasks and checklists
- Managing comments and threaded discussions
- Using OAuth authentication
- Integrating with other systems