mcp-server-shortcut
This project provides MCP server configuration for Windsurf and Cursor. Users can add custom servers using the Shortcut API token, making it easy to set up. Built in TypeScript, it serves as a handy tool for developers.
GitHub Stars
67
User Rating
Not Rated
Favorites
0
Views
20
Forks
28
Issues
10
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Node.js: 18.0.0以上npm: 8.0.0以上Installation
Installation
Prerequisites
Please specify required software and versions:Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Installation Steps
1. Clone Repository
bash
git clone https://github.com/useshortcut/mcp-server-shortcut
cd mcp-server-shortcut
2. Install Dependencies
bash
npm install
3. Configure MCP Server
Editmcp.json to add the MCP server:
json
{
"mcpServers": {
"shortcut": {
"command": "npx",
"args": [
"-y",
"@shortcut/mcp@latest"
],
"env": {
"SHORTCUT_API_TOKEN": ""
}
}
}
}
4. Start Server
bash
npm start
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Configuration file not loading correctly Solution: Verify configuration file path and syntax.Configuration
Configuration
Basic Configuration
MCP Server Setup
Editmcp.json as follows:
json
{
"mcpServers": {
"shortcut": {
"command": "npx",
"args": [
"-y",
"@shortcut/mcp@latest"
],
"env": {
"SHORTCUT_API_TOKEN": ""
}
}
}
}
Environment Variables
Set the following environment variables as needed:bash
export SHORTCUT_API_TOKEN="your-api-token"
Security Settings
Store API keys in environment variables or secure configuration files
Set appropriate file access permissions
Configuration Example
Basic Configuration
json
{
"mcpServers": {
"shortcut": {
"command": "npx",
"args": [
"-y",
"@shortcut/mcp@latest"
],
"env": {
"SHORTCUT_API_TOKEN": ""
}
}
}
}
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Using with Claude Desktop
1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands
Available tools from this MCP server:
- tool1: Description of tool1
- tool2: Description of tool2
Programmatic Usage
javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');
const client = new MCPClient();
await client.connect();
// Execute tool
const result = await client.callTool('toolName', {
parameter1: 'value1',
parameter2: 'value2'
});
console.log(result);
Advanced Examples
Automation Script
bash
#!/bin/bash
Batch processing example
for file in *.txt; do
mcp-tool process "$file"
done
API Integration
python
Python example
import requests
import json
def call_mcp_tool(tool_name, params):
response = requests.post(
'http://localhost:3000/mcp/call',
json={
'tool': tool_name,
'parameters': params
}
)
return response.json()
Usage example
result = call_mcp_tool('analyze', {
'input': 'sample data',
'options': {'format': 'json'}
})
Use Cases
Automating task management projects using the Shortcut API
Setting up a development environment with Windsurf
Developing applications utilizing the MCP server via Cursor
Integrating with AI tools in Claude Code
Real-time data processing using Zed