Overview

This example demonstrates a complete workflow using ntcli from initial setup through Claude Desktop integration. We’ll deploy multiple MCP servers, configure secrets, and set up production-ready scaling.

Prerequisites

  • Node.js 20+ installed
  • NPM or Yarn package manager
  • A NimbleTools account (created during authentication)

Step-by-Step Workflow

1. Installation and Setup

1

Install ntcli

npm install -g @nimbletools/ntcli
ntcli --version
2

Authenticate

ntcli auth login
# Follow OAuth flow in browser
3

Verify authentication

ntcli auth status

2. Workspace Management

1

Create development workspace

ntcli workspace create data-analysis --description "Data analysis and research workspace"
2

Create production workspace

ntcli workspace create production --description "Production MCP servers"
3

List workspaces

ntcli workspace list
Expected output:
📁 Workspaces:

✅ data-analysis (active)
   Description: Data analysis and research workspace
   Created: 2024-01-15

📁 production  
   Description: Production MCP servers
   Created: 2024-01-15

3. Browse and Deploy MCP Servers

1

Explore available servers

ntcli registry list
You’ll see servers like:
  • nationalparks-mcp - US National Parks data
  • finnhub-mcp - Stock market data
  • reverse-text-mcp - Text manipulation tools
2

Get detailed server information

ntcli registry show nationalparks-mcp
This shows capabilities, required environment variables, and documentation.
3

Deploy National Parks server

ntcli server deploy nationalparks-mcp
Wait for successful deployment message.
4

Deploy additional servers

ntcli server deploy finnhub-mcp
ntcli server deploy reverse-text-mcp

4. Configure Secrets and Environment Variables

1

Set National Parks API key

# Get free API key from https://www.nps.gov/subjects/developer/api-documentation.htm
ntcli secrets set NPS_API_KEY=your-nps-api-key-here
2

Set Finnhub API key

# Get free API key from https://finnhub.io/register
ntcli secrets set FINNHUB_API_KEY=your-finnhub-api-key-here
3

Verify secrets

ntcli secrets list
Expected output:
🔐 Secrets in workspace 'data-analysis':

NPS_API_KEY=***************
FINNHUB_API_KEY=***************

5. Test MCP Server Functionality

1

Test National Parks server

# List available tools
ntcli mcp tools nationalparks-mcp

# Search for parks in Wyoming
ntcli mcp call nationalparks-mcp find_parks --arg stateCode="WY"

# Search for specific park
ntcli mcp call nationalparks-mcp search_parks --arg query="Yellowstone"
2

Test Finnhub server

# List available tools
ntcli mcp tools finnhub-mcp

# Get stock quote
ntcli mcp call finnhub-mcp get_quote --arg symbol="AAPL"

# Get company profile
ntcli mcp call finnhub-mcp get_company_profile --arg symbol="TSLA"
3

Test text manipulation server

# List available tools
ntcli mcp tools reverse-text-mcp

# Reverse text
ntcli mcp call reverse-text-mcp reverse_text --arg text="Hello World"

# Convert to uppercase
ntcli mcp call reverse-text-mcp to_uppercase --arg text="hello world"

6. Production Setup

1

Switch to production workspace

ntcli workspace switch production
2

Deploy servers with production configuration

# Deploy to production workspace
ntcli server deploy nationalparks-mcp
ntcli server deploy finnhub-mcp
3

Set production secrets

ntcli secrets set NPS_API_KEY=your-production-nps-key
ntcli secrets set FINNHUB_API_KEY=your-production-finnhub-key
4

Verify production deployment

ntcli server list --verbose

7. Generate Long-Lived Tokens

1

Create non-expiring token for development

ntcli workspace switch data-analysis
ntcli token refresh --no-expiry
ntcli token show
Save this token for CI/CD or long-running applications.
2

Create production token

ntcli workspace switch production
ntcli token refresh --no-expiry
ntcli token show

8. Claude Desktop Integration

1

Generate Claude Desktop configuration

# Switch to desired workspace
ntcli workspace switch data-analysis

# Generate config for each server
ntcli server claude-config nationalparks-mcp
ntcli server claude-config finnhub-mcp
ntcli server claude-config reverse-text-mcp
2

Combine configurations

Create a complete Claude Desktop config file:
{
  "mcpServers": {
    "nationalparks-mcp": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/v1/workspaces/your-workspace-id/servers/nationalparks-mcp/mcp",
        "--token",
        "your-workspace-token",
        "--insecure"
      ]
    },
    "finnhub-mcp": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint", 
        "https://mcp.nimbletools.ai/v1/workspaces/your-workspace-id/servers/finnhub-mcp/mcp",
        "--token",
        "your-workspace-token",
        "--insecure"
      ]
    },
    "reverse-text-mcp": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/v1/workspaces/your-workspace-id/servers/reverse-text-mcp/mcp", 
        "--token",
        "your-workspace-token",
        "--insecure"
      ]
    }
  }
}
3

Restart Claude Desktop

Restart Claude Desktop to load the new configuration.

9. Test Claude Desktop Integration

1

Test National Parks integration

Ask Claude: “Find national parks in Wyoming and tell me about Yellowstone”
2

Test stock data integration

Ask Claude: “Get the current stock price for Apple and Tesla, and compare their performance”
3

Test text manipulation

Ask Claude: “Reverse this text: ‘Hello from NimbleTools’ and then convert it to uppercase”

Advanced Workflow Examples

Scaling and Monitoring

# Scale up for high traffic
ntcli workspace switch production
ntcli server scale nationalparks-mcp 5
ntcli server scale finnhub-mcp 3

# Monitor performance
ntcli server logs nationalparks-mcp --lines 100 --follow
ntcli server info nationalparks-mcp --verbose

CI/CD Integration Example

#!/bin/bash
# deploy.sh - Example deployment script

set -e

# Authenticate (assumes CI environment variables are set)
ntcli auth login --non-interactive

# Deploy to staging
ntcli workspace switch staging
ntcli server deploy my-mcp-server --version $BUILD_VERSION
ntcli secrets set API_KEY=$STAGING_API_KEY

# Run tests
ntcli mcp call my-mcp-server health_check
if [ $? -eq 0 ]; then
  echo "Staging tests passed"
  
  # Deploy to production
  ntcli workspace switch production
  ntcli server deploy my-mcp-server --version $BUILD_VERSION
  ntcli secrets set API_KEY=$PRODUCTION_API_KEY
  
  # Scale for production load
  ntcli server scale my-mcp-server 3
  
  echo "Production deployment complete"
else
  echo "Staging tests failed, aborting production deployment"
  exit 1
fi

Monitoring and Maintenance

Regular Maintenance Tasks

Complete Command Summary

Here’s a reference of all commands used in this workflow:
npm install -g @nimbletools/ntcli
ntcli --version
ntcli auth login
ntcli auth status
ntcli auth logout  # When needed

Next Steps

After completing this workflow, you can:
  1. Explore more MCP servers from the community registry
  2. Build custom applications using the deployed servers via HTTP API
  3. Set up monitoring and alerting for production workloads
  4. Create custom MCP servers and deploy them to the platform
  5. Integrate with CI/CD pipelines for automated deployments