Skip to main content
Glama
owen-lacey

FPL MCP Server

by owen-lacey

getEntryHistory

Retrieve current and past season performance data for a Fantasy Premier League team by entering its entry ID to analyze historical results.

Instructions

Fetch this and previous season performance of a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryIdYes

Implementation Reference

  • Core handler function that performs the API fetch for entry history data from Fantasy Premier League.
    export async function getEntryHistory(entryId: number): Promise<any> {
      const res = await fetch(`https://fantasy.premierleague.com/api/entry/${entryId}/history/`);
      return res.json();
    }
  • src/server.ts:67-81 (registration)
    Registers the MCP tool 'getEntryHistory' with title, description, input schema (entryId: number), and a wrapper handler that calls the core function and formats the JSON response.
    server.registerTool("getEntryHistory", {
      title: "Get Entry History",
      description: "Fetch this and previous season performance of a team",
      inputSchema: { entryId: z.number() }
    }, async ({ entryId }) => {
      const data = await getEntryHistory(entryId);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    });

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/owen-lacey/fpl-mcp'

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