Integrate the SpotDraft API into agentic workflows via MCP.
This server provides tools to interact with SpotDraft's contract management features.
get_contract_list: Retrieves a list of contracts.get_contract_download_link: Obtains a download link for a contract.get_contract_status: Gets the status of a specific contract.get_contract_activity_log: Retrieves the activity log (comments) for a contract.get_contract_approvals: Fetches approvals for a specific contract.get_contract_key_pointers: Fetches key pointers for a specific contract.
get_templates: Retrieves a list of contract templates.get_template_details: Fetches details for a specific contract template.get_template_metadata: Fetches metadata for a specific contract template.
get_counter_parties: Retrieves a list of counter parties.get_counter_party_details: Fetches details for a specific counter party.
get_workspace_facets: Retrieves available search facets for filtering and searching contracts in the workspace.get_workspace_facet_options: Gets facet options for contract search filtering.
get_key_pointers: Retrieves key pointers.get_contract_types: Retrieves available contract types.
This software is currently in Alpha and is not covered by any support SLA. It should not be used in production environments.
- Node.js 20 or higher
- SpotDraft API credentials
You will need a Client ID and Client Secret from your SpotDraft account.
Set the following environment variables before running the server:
SPOTDRAFT_CLIENT_ID: Your SpotDraft API Client ID.SPOTDRAFT_CLIENT_SECRET: Your SpotDraft API Client Secret.SPOTDRAFT_BASE_URL(Optional): The base URL for the SpotDraft API. Defaults tohttps://api.spotdraft.com/api. You might need to change this based on your data residency region (e.g.,https://api.us.spotdraft.com/api,https://api.eu.spotdraft.com/api).
To use this with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"spotdraft": {
"command": "npx",
"args": ["@spotdraft/spotdraft-mcp"],
"env": {
"SPOTDRAFT_CLIENT_ID": "<YOUR_CLIENT_ID>",
"SPOTDRAFT_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",
"SPOTDRAFT_BASE_URL": "<SPOTDRAFT_BASE_URL>" (optional)
}
},
"streamable-http-spotdraft": {
"type": "streamable-http",
"url": "http://localhost:3000/mcp?baseUrl=https%3A%2F%2Fapi.us.spotdraft.com%2Fapi",
"note": "For Streamable HTTP connections, add this URL directly in your MCP Client"
}
}
}npx @spotdraft/spotdraft-mcp- Clone the repository:
git clone https://github.com/spotdraft/spotdraft-mcp.git
cd spotdraft-mcp- Install dependencies:
npm install- Build the project:
npm run build- Set environment variables and run:
export SPOTDRAFT_CLIENT_ID="your_client_id"
export SPOTDRAFT_CLIENT_SECRET="your_client_secret"
npm start- Build the Docker image:
docker build -t spotdraft-mcp .- Run in stdio mode (default - for MCP clients):
docker run -e SPOTDRAFT_CLIENT_ID=your_client_id -e SPOTDRAFT_CLIENT_SECRET=your_client_secret spotdraft-mcp- Run in HTTP mode (for web access):
docker run -p 3000:3000 -e SPOTDRAFT_CLIENT_ID=your_client_id -e SPOTDRAFT_CLIENT_SECRET=your_client_secret -e SPOTDRAFT_BASE_URL=https://api.us.spotdraft.com/api spotdraft-mcp node build/index.js --http- Run with custom port:
docker run -p 8080:8080 -e SPOTDRAFT_CLIENT_ID=your_client_id -e SPOTDRAFT_CLIENT_SECRET=your_client_secret -e SPOTDRAFT_BASE_URL=https://api.us.spotdraft.com/api spotdraft-mcp node build/index.js --http --port=8080Create a docker-compose.yml file:
version: '3.8'
services:
spotdraft-mcp:
build: .
ports:
- '3000:3000'
environment:
- SPOTDRAFT_CLIENT_ID=${SPOTDRAFT_CLIENT_ID}
- SPOTDRAFT_CLIENT_SECRET=${SPOTDRAFT_CLIENT_SECRET}
- SPOTDRAFT_BASE_URL=${SPOTDRAFT_BASE_URL}
command: ['node', 'build/index.js', '--http']Then run:
docker-compose upThe server supports two modes:
- Used by MCP clients like Claude Desktop
- Communicates over standard input/output
- No network ports required
- Provides REST endpoints for web access
- Useful for testing and web integrations
- Includes health check endpoint at
/health - Main MCP endpoint at
/mcp
To run in HTTP mode, add the --http flag:
node build/index.js --httpWhen running in HTTP mode, you can pass the base URL using environment variables:
export SPOTDRAFT_BASE_URL="https://api.us.spotdraft.com/api"
node build/index.js --httpWhen running in HTTP mode, the following endpoints are available:
GET /health- Health check endpointPOST /mcp- Main MCP endpoint for tool calls
npm run build- Compile TypeScriptnpm run watch- Watch mode for developmentnpm run inspector- Run MCP inspector for debugging
src/
├── index.ts # Main server file
├── contract/ # Contract management tools
├── counter_parties/ # Counter party tools
├── key_pointers/ # Key pointers tools
└── templates/ # Template management tools
MIT License - see LICENSE file for details.
This is alpha software. For issues and feature requests, please use the GitHub repository.