Skip to main content
Glama
monostate

100ms Raydium Sniper MCP

by monostate
token-parser.ts658 B
export class TokenParser { async parse(input: string): Promise<string | null> { // Remove any whitespace input = input.trim(); // Check if it's a direct token address (base58 encoded string) if (/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(input)) { return input; } // Parse natural language input // Example: "snipe XYZ with 2% slippage" const match = input.match(/(?:snipe\s+)?([A-Za-z0-9]+)(?:\s+with\s+(\d+(?:\.\d+)?)%\s+slippage)?/i); if (match) { // TODO: Implement token symbol to address lookup // For now just return a mock address return "TokenMint" + match[1]; } return null; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/monostate/100ms-SPL-Token-Sniper-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server