Skip to main content
Glama

claude-mcp-server

by paybyrd
toolkit.ts1.25 kB
import {McpServer} from '@modelcontextprotocol/sdk/server/mcp.js'; import {RequestHandlerExtra} from '@modelcontextprotocol/sdk/shared/protocol.js'; import { Configuration, isToolAllowed, PaybyrdAPI, tools } from '@paybyrd/ai-agent-toolkit'; class ClaudeAgentToolkit extends McpServer { private _paybyrd: PaybyrdAPI; constructor({ authToken, configuration, }: { authToken: string; configuration: Configuration; }) { super({ name: 'paybyrd', version: '0.1.0' }); this._paybyrd = new PaybyrdAPI(authToken, configuration.context); const filteredTools = tools.filter((tool) => isToolAllowed(tool, configuration) ); filteredTools.forEach((tool) => { this.tool( tool.method, // Method is the tool's ID tool.description, tool.parameters.shape, async (arg: any, _extra: RequestHandlerExtra) => { const result = await this._paybyrd.run(tool.method, arg); return { content: [ { type: 'text' as const, text: String(result), }, ], }; } ); }); } } export default ClaudeAgentToolkit;

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/paybyrd/ai-agent-toolkit-js'

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