Skip to main content
Glama
sumup
by sumup
sumup-agent.ts1.15 kB
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { SumUpAgentToolkit } from "@sumup/agent-toolkit/mcp"; import { McpAgent } from "agents/mcp"; export function createSumUpServer({ apiKey }: { apiKey: string }): McpServer { return new SumUpAgentToolkit({ apiKey, configuration: { capabilities: { resources: {}, tools: {}, }, }, }) as unknown as McpServer; } export interface SumUpAgentProps extends Record<string, unknown> { apiKey?: string; } export class SumUpMcpAgent extends McpAgent<unknown, never, SumUpAgentProps> { private _server: McpServer | undefined; set server(server: McpServer) { this._server = server; } get server(): McpServer { if (!this._server) { throw new Error("Tried to access MCP server before it was initialized"); } return this._server; } async init() { const props = this.props; if (!props?.apiKey) { throw new Error("Missing SumUp API key"); } this.server = new SumUpAgentToolkit({ apiKey: props.apiKey, configuration: { capabilities: { resources: {}, tools: {}, }, }, }) as unknown as McpServer; } }

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/sumup/sumup-mcp'

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