The CS Insight server provides a common blockchain wrapper for the CoinSpace API, allowing you to interact with blockchain data through a standardized interface. This service acts as an intermediary layer that simplifies blockchain data access and management.
To install the CS Insight server, you'll need Node.js and npm installed on your system. Follow these steps to get started:
Clone the repository:
git clone https://github.com/CoinSpace/cs-insight.git
cd cs-insight
Install dependencies:
npm install
Set up environment variables by creating a .env
file in the project root:
PORT=3000
NETWORK=mainnet
API_PREFIX=/api
The server can be configured using the following environment variables:
Variable | Description | Default |
---|---|---|
PORT |
The port number for the server | 3000 |
NETWORK |
Blockchain network (mainnet or testnet ) |
mainnet |
API_PREFIX |
URL prefix for API endpoints | /api |
The server supports various cryptocurrencies, each requiring specific configuration. For each cryptocurrency, you need to set up the appropriate API endpoint in your configuration.
To start the server, run:
npm start
The server provides the following API endpoints:
GET {API_PREFIX}/addr/{address}
Returns details about a specific blockchain address including balance and transaction history.
GET {API_PREFIX}/tx/{txid}
Returns detailed information about a specific transaction.
GET {API_PREFIX}/addr/{address}/utxo
Returns the unspent transaction outputs (UTXOs) for a specific address.
POST {API_PREFIX}/tx/send
Request body:
{
"rawtx": "signed_transaction_hex"
}
Broadcasts a signed transaction to the blockchain network.
Using curl to get address information:
curl -X GET http://localhost:3000/api/addr/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Broadcasting a transaction:
curl -X POST http://localhost:3000/api/tx/send \
-H "Content-Type: application/json" \
-d '{"rawtx":"01000000017b1eabe0209b1fe794124575ef807057..."}'
If you encounter issues with the server:
You can enable verbose logging by setting the DEBUG
environment variable:
DEBUG=cs-insight:* npm start
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "workos-mcp" '{"command":"npx","args":["-y","workos-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"workos-mcp": {
"command": "npx",
"args": [
"-y",
"workos-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"workos-mcp": {
"command": "npx",
"args": [
"-y",
"workos-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect