Skip to main content
Glama
apsogos4ever

Trading 212 MCP

by apsogos4ever

Minimal MCP server on Cloudflare Workers

A stateless MCP server using the MCP SDK directly, without the Agents SDK. One factory and one handler serve Stateless clients and Legacy compatibility requests.

import { McpServer, createMcpHandler } from "@modelcontextprotocol/server";
import { z } from "zod";

function createServer() {
  const server = new McpServer({
    name: "hello-server",
    version: "1.0.0"
  });

  server.registerTool(
    "hello",
    {
      description: "Returns a greeting",
      inputSchema: z.object({ name: z.string().optional() })
    },
    async ({ name }) => ({
      content: [{ type: "text", text: `Hello, ${name ?? "World"}!` }]
    })
  );

  return server;
}

export default createMcpHandler(createServer);

createMcpHandler creates a fresh server for every request. Its default legacy: "stateless" behavior provides 2025 wire compatibility without sessions, Durable Objects, storage, or a second tool definition.

Run

npm install
npm run dev

Connect an MCP client or the MCP Inspector to http://localhost:8787/mcp.

Use createMcpHandler(createServer, { legacy: "reject" }) instead if the endpoint should accept only MCP 2026-07-28.

For Agents-owned route matching, CORS, OAuth context bridging, and temporary SDK v1 application compatibility, see mcp-worker.

Trading 212 MCP

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure access to Trading 212 Public API through MCP, enabling Claude Desktop users to manage portfolios, execute trades, and analyze market data using natural language commands.
    -
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that wraps the Trading 212 Public API, enabling AI agents to interact with your Trading 212 brokerage account through natural language.
    16
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI tools to interact with a Firefly III personal finance instance via MCP protocol, deployed on Cloudflare Workers for low-latency global access.
    14 npm
    ISC
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for the Trading 212 public API, enabling account, portfolio, order, pie, and history access with read tools always available and trading tools opt-in.
    13
    1
    MIT