sally-mcp
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"sally": {
"args": [
"/Users/yourname/code/sally-mcp/dist/index.js"
],
"command": "node",
"env": {
"PRIVATE_KEY": "0x...",
"TRANSPORT_MODE": "stdio"
}
}
}
}
服务介绍
Sally MCP Server
AI-Powered Metabolic Health Assistant with Blockchain-Based Payments
Connect to Sally through the Model Context Protocol (MCP) with x402 payment infrastructure
Quick Start Installation Usage API Reference Deployment
What is Sally MCP Server?
Sally MCP Server is a Model Context Protocol (MCP) server that enables AI assistants like Claude Desktop, Cursor, and other MCP-compatible clients to interact with Sally, an AI-powered metabolic health assistant.
Built with the x402 blockchain-based payment protocol, Sally MCP ensures secure, transparent micropayments for each AI interaction while keeping your private keys and data entirely on your local machine.
Key Features
- Metabolic Health Expertise: Chat with Sally about nutrition, metabolism, and health optimization
- x402 Payment Integration: Automatic blockchain-based micropayments for API usage
- Multi-Transport Support: Deploy locally (stdio) or hosted (HTTP/SSE via Smithery)
- Security First: Private keys never leave your device
- MCP Compatible: Works with Claude Desktop, Cursor, and any MCP-compatible client
- Type-Safe: Built with TypeScript and Zod schemas for reliability
- Production Ready: Dockerized and ready for Smithery cloud deployment
Architecture
MCP Client
(Claude, Cursor)
Sally MCP Server x402 Payment
(Local/Smithery) Protocol
Sally API
(Metabolic Health)
Quick Start
Get up and running in 5 minutes:
Prerequisites
- Node.js 18+ and pnpm installed
- An MCP-compatible client (Claude Desktop, Cursor, etc.)
- A dedicated crypto wallet with small funds for x402 transactions
1. Install via Smithery (Recommended)
The easiest way to use Sally MCP is through Smithery:
npx @smithery/cli install @sally-labs/sally-ai-mcp --client claude
2. Install Locally
# Clone and setup
git clone https://github.com/sally-labs/sally-mcp.git
cd sally-mcp
pnpm install
pnpm build
3. Configure Your MCP Client
Add to your MCP client configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"sally": {
"command": "node",
"args": ["/path/to/sally-mcp/dist/index.js"],
"env": {
"PRIVATE_KEY": "0x...",
"TRANSPORT_MODE": "stdio"
}
}
}
}
4. Test the Connection
Restart your MCP client and try:
"Use the chat-with-sally tool to ask: What are the benefits of intermittent fasting?"
Installation
Option A: Deploy with Smithery (Cloud Hosted)
Smithery provides managed hosting for MCP servers with automatic scaling and updates.
# Install Smithery CLI
npm install -g @smithery/cli
# Install Sally MCP
npx @smithery/cli install @sally-labs/sally-ai-mcp --client claude
Configure via Smithery dashboard:
- Private Key: Your dedicated wallet's private key (with 0x prefix)
- The server will be automatically available in your MCP clients
Option B: Local Development Setup
Step 1: Create a Dedicated Wallet
** Security Critical**: Never use your main wallet for MCP integrations.
- Create a new wallet using MetaMask, Coinbase Wallet, or similar
- Transfer a small amount of funds (e.g., $5-10 worth of crypto)
- Export the private key (it should start with
0x) - Store it securely
Step 2: Clone and Install
# Clone repository
git clone https://github.com/sally-labs/sally-mcp.git
cd sally-mcp
# Install dependencies
pnpm install
Step 3: Configure Environment
Create a .env file:
PRIVATE_KEY=0x...
TRANSPORT_MODE=stdio
Step 4: Build and Run
# Build TypeScript
pnpm build
# Run the server
node dist/index.js
MCP Client Configuration
Claude Desktop
- Open Claude Desktop Settings
- Navigate to Developer Edit Config
- Edit
claude_desktop_config.json:
{
"mcpServers": {
"sally": {
"command": "node",
"args": ["/Users/yourname/code/sally-mcp/dist/index.js"],
"env": {
"PRIVATE_KEY": "0x...",
"TRANSPORT_MODE": "stdio"
}
}
}
}
- Restart Claude Desktop
- The Sally tools should appear automatically
Cursor
- Open Cursor Settings
- Navigate to Features MCP Servers
- Add server configuration:
{
"sally": {
"command": "node",
"args": ["/path/to/sally-mcp/dist/index.js"],
"env": {
"PRIVATE_KEY": "0x...",
"TRANSPORT_MODE": "stdio"
}
}
}
- Restart Cursor
Other MCP Clients
Refer to your client's documentation for custom MCP server configuration. You'll need:
- Command:
node - Args:
["/path/to/sally-mcp/dist/index.js"] - Environment Variables:
PRIVATE_KEY,TRANSPORT_MODE=stdio
Usage
Basic Interaction
Once configured, interact with Sally naturally through your MCP client:
"Use chat-with-sally to ask: What foods help stabilize blood sugar?"
"Ask Sally about the relationship between sleep and metabolic health"
"Use Sally to create a meal plan for someone with insulin resistance"
Available Tools
chat-with-sally
Chat with Sally about metabolic health topics.
Parameters:
message(string, required): Your question or message to Sally
Example:
{
"message": "What are the best exercises for improving insulin sensitivity?"
}
Response:
{
"report": {
"message": "Resistance training and high-intensity interval training (HIIT) are particularly effective for improving insulin sensitivity..."
}
}
Understanding Costs
Each interaction with Sally uses x402 micropayments:
- Chat messages: Micropayments per API request
- Payments are automatic from your dedicated wallet
- All transactions are on-chain and verifiable
- Monitor your spending through your wallet or blockchain explorer
Security
Security Architecture
Your Device (Local)
MCP Client
Sally MCP
(Local Process)
Private Key
(Never Leaves)
(Only signed transactions)
Internet / Blockchain
Best Practices
DO:
- Use a dedicated, separate wallet for MCP interactions
- Keep only small amounts ($5-20) in your MCP wallet
- Store your private key securely (password manager, hardware wallet)
- Regularly review your x402 transaction history
- Use test/sandbox environments before mainnet
- Keep your MCP server and dependencies updated
DON'T:
- Use your main wallet's private key
- Share your private key with anyone
- Store private keys in plain text or version control
- Keep large amounts in your MCP wallet
- Reuse private keys across different services
- Commit
.envfiles to git
Security Features
- Local-First: Server runs entirely on your machine (stdio mode)
- No Key Upload: Private keys never transmitted to external servers
- Encrypted Transactions: All payments use blockchain encryption
- Transparent Costs: Every payment is verifiable on-chain
- Isolated Wallet: Dedicated wallet limits exposure
API Reference
Environment Variables
| Variable | Description | Required | Default |
|---|---|---|---|
PRIVATE_KEY |
Your dedicated wallet's private key (with 0x prefix) | Yes* | - |
TRANSPORT_MODE |
Transport mode: stdio or http |
No | stdio |
PORT |
HTTP server port (when TRANSPORT_MODE=http) |
No | 8081 |
*Required for STDIO mode. Optional for HTTP mode (Smithery deployment).
MCP Server Capabilities
{
name: 'x402 MCP Sally Server',
version: '1.0.0',
capabilities: {
tools: true,
prompts: true,
resources: true
}
}
Tool Schemas
chat-with-sally
{
name: 'chat-with-sally',
description: 'Chat with Sally to talk about metabolic health (requires privateKey configuration)',
inputSchema: {
type: 'object',
properties: {
message: {
type: 'string',
description: 'The message to send to Sally'
}
},
required: ['message']
},
annotations: {
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false,
openWorldHint: true
}
}
Deployment
Deploy to Smithery
-
Create Smithery Account: Sign up at smithery.ai
-
Install via Smithery CLI:
npx @smithery/cli install @sally-labs/sally-ai-mcp --client claude -
Configure:
- Add your
PRIVATE_KEYvia Smithery dashboard (optional for browsing) - The server will be available at your Smithery URL
- Add your
-
Connect MCP Clients:
- Smithery automatically configures supported MCP clients
- Or manually add the Smithery URL to your client config
Docker Deployment
Build and run locally:
# Build image
docker build -t sally-mcp .
# Run locally (stdio mode)
docker run -i --rm \
-e PRIVATE_KEY=0x... \
-e TRANSPORT_MODE=stdio \
sally-mcp
# Run as HTTP server
docker run -d -p 8081:8081 \
-e PRIVATE_KEY=0x... \
-e TRANSPORT_MODE=http \
sally-mcp
Deploy to Cloud
The Docker image can be deployed to any container platform:
- AWS ECS/Fargate: Use task definitions with environment variables
- Google Cloud Run: Deploy with secrets for private key
- Azure Container Instances: Configure with environment settings
- Railway/Render: Direct GitHub integration available
Troubleshooting
MCP Server Not Appearing
Symptoms: Server doesn't show up in your MCP client's tools list
Solutions:
- Verify the configuration file path is correct
- Check that Node.js is installed:
node --version - Ensure the server path uses absolute paths:
- macOS/Linux:
/Users/name/path/sally-mcp/dist/index.js - Windows:
C:\\Users\\name\\path\\sally-mcp\\dist\\index.js
- macOS/Linux:
- Build the project first:
pnpm build - Restart your MCP client completely
- Check MCP client logs for errors
Connection Errors
Symptoms: "Failed to connect" or timeout errors
Solutions:
- Verify internet connection
- Check Sally API endpoint is accessible:
curl https://api-x402.asksally.xyz/health - Ensure wallet has sufficient funds
- Confirm private key format (should include
0xprefix and be 66 characters) - Check server logs for detailed errors
Private Key Issues
Symptoms: Authentication or payment failures
Solutions:
- Ensure private key starts with
0xand is exactly 66 characters - Check for extra spaces or line breaks in environment variable
- Verify the wallet has funds on the correct network
- Test the private key format:
# Should be: 0x + 64 hex characters = 66 total echo $PRIVATE_KEY | wc -c
Payment Failures
Symptoms: "Insufficient funds" or payment errors (402 status)
Solutions:
- Check wallet balance on blockchain explorer
- Verify you're on the correct network (mainnet/testnet)
- Ensure gas fees are accounted for
- Try with a larger initial wallet balance
- Review x402 payment logs in server output
Tool Not Triggering
Symptoms: MCP client doesn't recognize tool invocations
Solutions:
- Use explicit phrasing: "Use the chat-with-sally tool"
- Check that tools are listed: verify server initialized correctly
- Restart client after configuration changes
- Check client documentation for tool invocation syntax
- Verify server is running in stdio mode (not http)
Getting Help
If you're still experiencing issues:
- GitHub Issues: github.com/sally-labs/sally-mcp/issues
- Email Support: support@asksally.xyz
- Community: bento.me/a1c
When reporting issues, please include:
- MCP client name and version
- Operating system
- Error messages from logs
- Configuration (with private key redacted)
- Server build output
Development
Setup Development Environment
# Clone repository
git clone https://github.com/sally-labs/sally-mcp.git
cd sally-mcp
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run in stdio mode
PRIVATE_KEY=0x... node dist/index.js
Project Structure
sally-mcp/
index.ts # Main server entry point
package.json # Dependencies and scripts
tsconfig.json # TypeScript configuration
smithery.yaml # Smithery deployment config
Dockerfile # Container image
.dockerignore # Docker build exclusions
.env.example # Environment template
README.md # This file
Building
# TypeScript compilation
pnpm build
# Run production build
node dist/index.js
Testing
Test stdio mode locally:
# Set environment
export PRIVATE_KEY=0x...
export TRANSPORT_MODE=stdio
# Run server
node dist/index.js
Test HTTP mode:
# Start HTTP server
TRANSPORT_MODE=http PORT=8081 node dist/index.js
# Test health endpoint
curl http://localhost:8081/health
# Test MCP initialize
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
# Test tools/list
curl -X POST http://localhost:8081/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
Contributing
We welcome contributions! Here's how to get started:
Ways to Contribute
- Bug Reports: Open an issue with reproduction steps
- Feature Requests: Describe your use case and proposed solution
- Code Contributions: Submit a pull request
- Documentation: Improve guides and examples
- Testing: Add test coverage
Development Workflow
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Test thoroughly
- Commit with clear messages:
git commit -m "feat: add new capability" - Push to your fork:
git push origin feature/my-feature - Open a pull request
Commit Convention
We follow Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentation changesrefactor:Code refactoringtest:Test additions or changeschore:Maintenance tasks
Code Review Process
- All PRs require review before merging
- Ensure TypeScript compiles without errors
- Documentation must be updated for new features
- Breaking changes require clear migration notes
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
- Smithery: smithery.ai/server/@sally-labs/sally-ai-mcp
- GitHub: github.com/sally-labs/sally-mcp
- x402 Protocol: x402.org
- Model Context Protocol: modelcontextprotocol.io
- Support: support@asksally.xyz
- Community: bento.me/a1c
Acknowledgments
Built with:
- Model Context Protocol (MCP) - AI integration standard
- x402 Protocol - Blockchain payment infrastructure
- Smithery - MCP server hosting platform
- viem - Ethereum development toolkit
Made with by the Sally Labs team