
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
@trendmoon/mcp-server
Advanced tools
TrendMoon MCP Server - Library and Standalone Server for Cryptocurrency and Social Data
A Model Context Protocol (MCP) server for accessing cryptocurrency and social trend data through the TrendMoon API.
npm install @trendmoon/mcp-server
npm install -g @trendmoon/mcp-server
trendmoon-mcp-server serve [options]
import { TrendmoonMcpServer } from '@trendmoon/mcp-server';
// Create server instance
const mcpServer = new TrendmoonMcpServer({
name: 'my-app-mcp',
version: '1.0.0'
});
// Get MCP server for integration in your app
const server = mcpServer.getMcpServer();
// Access TrendMoon services directly
const services = mcpServer.getServices();
const coinData = await services.coin.getCoinDetails({ symbol: 'BTC' });
trendmoon-mcp-server serve [options]
Options:
-t, --transport <type> Transport type (stdio|http) (default: "stdio")
-p, --port <number> HTTP port (default: "3000")
-h, --host <host> HTTP host (default: "0.0.0.0")
--no-cors Disable CORS
trendmoon-mcp-server serve --transport stdio
trendmoon-mcp-server serve --transport http --port 3000
For MCP Inspector, use: http://localhost:PORT/mcp
searchCoins
: Search cryptocurrenciesgetCoinDetails
: Get cryptocurrency detailsgetPlatforms
: List available platformsgetHistoricalPrice
: Historical prices with MACDcheckEMAPosition
: Position relative to EMA 20/50getSocialTrend
: Crypto social trendsgetProjectSummary
: AI project summarygetKeywordTrend
: Keyword trendssearchSocialPosts
: Search social postsgetSocialTrends
: Multiple social trendsgetTopicPosts
: Posts related to specific topicsgetTopicNews
: News related to specific topicsgetMessagesForChat
: Chat messagessearchMessages
: Search messagesgetChatByUsername
: Chat detailssearchUsers
: Search usersgetUserByIdentifier
: User detailsThe server includes an analyzeCoinPerformance
prompt that automatically combines:
// Library usage
const analysis = await mcpServer.getMcpServer().prompt("analyzeCoinPerformance", {
symbol: "BTC",
timeframe: "24h" // 1h, 24h, 7d, 30d
});
npm run inspect:direct
Opens MCP Inspector interface at http://127.0.0.1:6274
# Start in HTTP mode
npm run start:http:dev
# Test main MCP endpoint
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# Test legacy endpoint (compatibility)
curl -X POST http://localhost:3000/ \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}'
# Health check
curl http://localhost:3000/health
# Server info
curl http://localhost:3000/info
When running in HTTP mode, you can connect MCP Inspector to:
http://localhost:3000/mcp
src/
├── lib/ # Library code
│ ├── server/
│ │ ├── TrendmoonMcpServer.ts
│ │ └── types.ts
│ ├── tools/ # MCP tools
│ └── index.ts # Main library export
├── standalone/ # Standalone server code
│ ├── http/
│ │ └── HttpTransport.ts
│ ├── stdio/
│ │ └── StdioTransport.ts
│ └── server.ts
├── cli.ts # Command line interface
└── index.ts # Root entry point
The server supports various environment variables for configuration. Copy .env.example
to .env
and configure as needed:
# TrendMoon API Configuration
TRENDMOON_API_URL=https://api.qa.trendmoon.ai
TRENDMOON_API_KEY=xxxxxxxxx
# LLM Configuration (for AI features)
LLM_API_KEY="sk-xxxx"
LLM_BASE_URL="https://openrouter.ai/api/v1"
LLM_MODEL_NAME="openai/gpt-3.5-turbo"
# Debug and Development
DEBUG_MODE=false
Variable | Description | Required | Default |
---|---|---|---|
TRENDMOON_API_URL | TrendMoon API base URL | No | https://api.qa.trendmoon.ai |
TRENDMOON_API_KEY | Your TrendMoon API key for authentication | Yes | - |
LLM_API_KEY | API key for LLM provider (OpenRouter, OpenAI, etc.) | Yes | - |
LLM_BASE_URL | Base URL for LLM API calls | No | https://api.openai.com/v1 |
LLM_MODEL_NAME | Model name to use for AI features | No | gpt-3.5-turbo |
DEBUG_MODE | Enable debug logging and verbose output | No | false |
TrendMoon API Key:
TRENDMOON_API_KEY
environment variableLLM API Key (for enhanced AI features):
LLM_API_KEY
and configure LLM_BASE_URL
accordinglyDevelopment (.env):
TRENDMOON_API_URL=https://api.qa.trendmoon.ai
TRENDMOON_API_KEY=your-dev-api-key
LLM_API_KEY="sk-your-openrouter-key"
LLM_BASE_URL="https://openrouter.ai/api/v1"
LLM_MODEL_NAME="openai/gpt-3.5-turbo"
DEBUG_MODE=true
Production:
TRENDMOON_API_URL=https://api.trendmoon.app
TRENDMOON_API_KEY=your-prod-api-key
LLM_API_KEY="sk-your-production-key"
LLM_BASE_URL="https://openrouter.ai/api/v1"
LLM_MODEL_NAME="openai/gpt-4"
DEBUG_MODE=false
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY dist/ ./dist/
EXPOSE 3000
CMD ["npm", "run", "start:http"]
version: '3.8'
services:
trendmoon-mcp:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- TRENDMOON_API_URL=https://api.trendmoon.app
- TRENDMOON_API_KEY=xxxxxxx
- LLM_API_KEY=sk-your-api-key
- LLM_BASE_URL=https://openrouter.ai/api/v1
- LLM_MODEL_NAME=openai/gpt-4
- DEBUG_MODE=false
restart: unless-stopped
import { TrendmoonMcpServer, startStandaloneServer } from '@trendmoon/mcp-server';
// Library mode
const mcpServer = new TrendmoonMcpServer();
const tools = await mcpServer.getMcpServer().tools.list();
// Programmatic standalone server
await startStandaloneServer({
transport: 'http',
http: { port: 3000 },
server: { name: 'my-custom-server' }
});
# Via CLI
trendmoon-mcp-server serve --transport http &
# Via curl (preferred endpoint)
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getCoinDetails",
"arguments": {"symbol": "BTC"}
}
}'
# Via legacy endpoint (for compatibility)
curl -X POST http://localhost:3000/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {"name": "test-client", "version": "1.0.0"}
}
}'
Start the server in HTTP mode:
trendmoon-mcp-server serve --transport http --port 3000
Open MCP Inspector and connect to:
http://localhost:3000/mcp
curl http://localhost:3000/info
Response includes server details, endpoints, active sessions, and usage instructions.
tools/list
: List all available toolstools/call
: Execute a tool with parametersprompts/list
: List all available promptsprompts/get
: Get a specific prompt{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}
{
"status": "ready",
"timestamp": "2024-01-01T00:00:00.000Z",
"server": "TrendMoon MCP Server",
"transport": "Streamable HTTP",
"sessions": 0,
"mcpConnected": true
}
{
"name": "TrendMoon MCP Server",
"version": "1.0.0",
"transport": "Streamable HTTP",
"endpoints": {
"mcp": "/mcp (POST, GET, DELETE)",
"health": "/health",
"info": "/info"
},
"activeSessions": 0,
"protocol": "MCP Streamable HTTP Transport",
"mcpConnected": true,
"usage": {
"initialize": "POST /mcp with initialize request",
"requests": "POST /mcp with mcp-session-id header",
"notifications": "GET /mcp with mcp-session-id header (SSE)",
"terminate": "DELETE /mcp with mcp-session-id header"
}
}
The HTTP transport uses session-based communication:
initialize
request to POST /mcp
mcp-session-id
headerGET /mcp
with session IDDELETE /mcp
with session IDgit clone https://github.com/trendmoon/mcp-server.git
cd mcp-server
npm install
cp .env.example .env
# Edit .env with your API keys and configuration
npm run build
npm run dev # STDIO mode
npm run dev:http # HTTP mode (port 3008)
npm run build # Build
npm run lint # Linting
npm test # Tests
npm run inspect:direct # MCP Inspector
curl http://localhost:3000/health
curl http://localhost:3000/info
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)MIT License - see the LICENSE file for details.
Made with ❤️ by the TrendMoon team
This package uses GitHub Actions for automated publishing. To release a new version:
package.json
:npm version patch # For bug fixes
npm version minor # For new features
npm version major # For breaking changes
Create a new release in GitHub:
v1.0.1
(matching your package.json version)The GitHub Action will automatically:
For manual publishing:
# Ensure you're logged in
npm login
# Check what will be included in the package
npm pack --dry-run
# Publish the package
npm publish --access public
Note: You must have appropriate npm access to the @trendmoon organization to publish.
FAQs
TrendMoon MCP Server - Library and Standalone Server for Cryptocurrency and Social Data
The npm package @trendmoon/mcp-server receives a total of 0 weekly downloads. As such, @trendmoon/mcp-server popularity was classified as not popular.
We found that @trendmoon/mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.