home / mcp / lunarcrush mcp server
Provides remote access to LunarCrush data via MCP with HTTP streaming, SSE, and a local stdio server.
Configuration
View docs{
"mcpServers": {
"lunarcrush-mcp-server": {
"url": "https://lunarcrush.ai/mcp",
"headers": {
"LUNARCRUSH_API_KEY": "<your_lunarcrush_api_key>"
}
}
}
}You can connect to LunarCrush data and actions through a dedicated MCP (Multi-Chain Protocol) server. This MCP server exposes multiple connection methods—remote HTTP endpoints and a local stdio process—so you can choose the integration model that fits your environment while keeping your LunarCrush API key secure.
Connect with an MCP client against the LunarCrush MCP server using any of the available connection methods. You can use the remote HTTP endpoints to stream data or receive server-sent events, or run a local stdio server that starts with your runtime environment. In all cases, provide your LunarCrush API key to authorize requests. Use the option that best matches your deployment requirements: remote HTTP for hosted access, SSE for event-driven streaming, or a local stdio process for a self-contained deployment.
# Prerequisites
- Install Node.js (recommended latest LTS)
- Ensure you have access to a terminal or shell
# Step 1: Prepare MCP configuration
# Create a config file (example: mcp-config.json) with all server connections
```
```json
{
"mcpServers": {
"LunarCrush": {
"type": "http",
"url": "https://lunarcrush.ai/mcp",
"headers": {
"Authorization": "Bearer ${input:lunarcrush-api-key}"
},
"args": [],
"env": [
{"name": "LUNARCRUSH_API_KEY", "value": "<your_lunarcrush_api_key>"}
]
}
}
}
```
```json
{
"mcpServers": {
"LunarCrushSSE": {
"type": "http",
"url": "https://lunarcrush.ai/sse",
"headers": {
"Authorization": "Bearer ${input:lunarcrush-api-key}"
},
"args": [],
"env": [
{"name": "LUNARCRUSH_API_KEY", "value": "<your_lunarcrush_api_key>"}
]
}
}
}
```
```json
{
"mcpServers": {
"LunarCrushLocal": {
"type": "stdio",
"command": "node",
"args": ["<absolute_path_to_project_root>/index.js"],
"env": {
"LUNARCRUSH_API_KEY": "<your_lunarcrush_api_key>"
}
}
}
}
```
# Step 2: Start using the MCP
- If you configured http endpoints, connect your MCP client to the provided URLs and pass the API key in the Authorization header as shown.
- If you configured the local stdio server, run the npm/yarn commands necessary to start your runtime environment and then point your client at the local process via the CLI or IPC as supported by your MCP client.
- Ensure your API key is kept secure and not committed to version control.Security and credentials: Treat your LunarCrush API key as a secret. Use environment variables in your deployment to avoid hard-coding keys. Rotate keys regularly and restrict permissions to the minimum required scope for your integration.
Notes on deployment: The HTTP endpoints are streaming and event-based options. The local stdio option runs a Node.js process that expects an index.js file at the specified path and requires the LUNARCRUSH_API_KEY environment variable to be set.
Troubleshooting: If your MCP client cannot connect, verify that the URLs are reachable from your network, your API key is correct, and the environment variables are properly set for each connection method.