loading…
Search for a command to run...
loading…
MCP server exposing Merkl opportunities via @modelcontextprotocol/sdk
MCP server exposing Merkl opportunities via @modelcontextprotocol/sdk
An MCP server exposing Merkl Opportunities endpoints using @modelcontextprotocol/sdk.
npm install
Optionally set environment variables:
MERKL_BASE_URL (default: https://api.merkl.xyz)MERKL_API_KEY (Bearer token if you have one; public endpoints work without it)npm run dev
npm run build
npm start
npm run smoke
This server uses the stdio transport. Point your MCP client to run the command and read/write on stdio:
npx merkl-mcp
npm start
Set env vars as needed (e.g. MERKL_API_KEY). The server will register tools listed above.
Note: Requires Node 18+. Enable debug logs by setting MERKL_DEBUG=1.
After publishing as merkl-mcp to npm (or using npm link), you can start the server with:
npx merkl-mcp
If dist/server.js is missing, the CLI will build automatically on first run.
Claude Desktop supports MCP over stdio. Add this server to Claude's config and restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"merkl": {
"command": "npx",
"args": ["-y", "merkl-mcp"],
"env": {
"MERKL_API_KEY": "(Optional) YOUR_API_KEY_OR_REMOVE_IF_UNUSED"
}
}
}
}
{
"mcpServers": {
"merkl": {
"command": "node",
"args": ["dist/src/server.js"],
"cwd": "./merkl-mcp",
"env": {
"MERKL_API_KEY": "(Optional) YOUR_API_KEY_OR_REMOVE_IF_UNUSED"
}
}
}
}
merkl should appear in the Tools list.Troubleshooting
MERKL_API_KEY if you don't have one; public endpoints work without it.Set the name in package.json (already set up for you via bin aliases) and publish:
npm login # if not already
npm publish --access public
Then users can run:
npx merkl-mcp
# or the short alias
npx merkl-mcp
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"merkl-mcp": {
"command": "npx",
"args": [
"-y",
"merkl-mcp"
]
}
}
}