ifs-api-mcp-server

Yorktel-IM/ifs-api-mcp-server

3.2

If you are the rightful owner of ifs-api-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An MCP server that provides intelligent API discovery and recommendation for IFS ERP systems.

Tools
  1. find_ifs_api

    Find API recommendations based on task description.

  2. explore_entity

    Explore a specific IFS entity and its operations.

  3. build_request

    Build complete HTTP request details for an API endpoint.

  4. get_api_stats

    Get statistics about the loaded IFS API catalog.

IFS API MCP Server

An MCP (Model Context Protocol) server that provides intelligent API discovery and recommendation for IFS ERP systems. This server analyzes over 5000 OData metadata files to recommend appropriate APIs based on natural language task descriptions.

Features

  • Natural Language API Discovery: Describe your task in plain English and get relevant IFS API recommendations
  • Semantic Search: Uses OpenAI embeddings to understand intent and match APIs semantically
  • Entity Exploration: Detailed exploration of IFS entities, their properties, and available operations
  • Request Building: Complete HTTP request details for code generation and BPMN workflows
  • IFS-Specific: Tailored for IFS ERP business objects and operations

Installation

npm install
npm run build

Configuration

Create a config.json file in the root directory:

{
  "metadataDirectory": "./metadata",
  "databasePath": "./ifs-api-catalog.db",
  "openaiApiKey": "your-openai-api-key",
  "enableEmbeddings": true
}

Alternatively, set the OpenAI API key as an environment variable:

export OPENAI_API_KEY="your-openai-api-key"

Usage

Metadata Setup

  1. Place your IFS OData metadata JSON files in the ./metadata directory
  2. The server will automatically parse and index all .json files on startup

Running the Server

npm start

Or in development mode:

npm run dev

Available Tools

find_ifs_api

Find API recommendations based on task description.

Parameters:

  • task_prompt (string): Natural language description of the task
  • limit (number, optional): Maximum number of recommendations (default: 5)

Example:

{
  "task_prompt": "Create a new customer order",
  "limit": 3
}
explore_entity

Explore a specific IFS entity and its operations.

Parameters:

  • entity_name (string): Name of the IFS entity to explore

Example:

{
  "entity_name": "CustomerOrder"
}
build_request

Build complete HTTP request details for an API endpoint.

Parameters:

  • entity_name (string): Name of the IFS entity
  • operation (string): Type of operation (CREATE, READ, UPDATE, DELETE, FUNCTION, ACTION)
  • function_or_action_name (string, optional): Name of function or action if applicable

Example:

{
  "entity_name": "CustomerOrder",
  "operation": "CREATE"
}
get_api_stats

Get statistics about the loaded IFS API catalog.

Example:

{}

Output Format

The server provides structured output suitable for:

  • Code Generation: Complete HTTP request details with headers, body schemas, and response formats
  • BPMN Workflows: Activity type hints and implementation details for process automation
  • API Documentation: Business context and usage examples

Example Response

{
  "task": "Create a new customer order",
  "recommendations": [
    {
      "id": "CustomerOrder-CREATE",
      "entity": "CustomerOrder",
      "operation": "CREATE",
      "confidence": 0.95,
      "httpMethod": "POST",
      "endpoint": "/api/ifsapplications-{version}/projection/v1/CustomerOrder",
      "description": "Create a new CustomerOrder",
      "businessContext": "CREATE operation on CustomerOrder entity in IFS ERP system",
      "ifsModule": "ORDER",
      "businessObject": "CustomerOrder",
      "codeGeneration": {
        "method": "POST",
        "url": "/api/ifsapplications-{version}/projection/v1/CustomerOrder",
        "headers": {
          "Content-Type": "application/json",
          "Authorization": "Bearer {access_token}"
        },
        "requestBody": {
          "OrderNo": { "type": "string", "required": true },
          "CustomerNo": { "type": "string", "required": true },
          "OrderDate": { "type": "string", "required": true }
        }
      },
      "bpmnFragment": {
        "activityType": "BusinessRuleTask",
        "implementation": "REST",
        "method": "POST",
        "url": "/api/ifsapplications-{version}/projection/v1/CustomerOrder"
      }
    }
  ]
}

Architecture

src/
ā”œā”€ā”€ types/ifs.ts              # IFS-specific type definitions
ā”œā”€ā”€ parsers/odata-parser.ts   # OData metadata parser
ā”œā”€ā”€ database/schema.ts        # SQLite database management
ā”œā”€ā”€ embeddings/semantic-index.ts  # Semantic indexing with OpenAI
ā”œā”€ā”€ nlp/task-parser.ts        # Natural language processing
ā”œā”€ā”€ recommendation/api-recommender.ts  # API recommendation engine
ā”œā”€ā”€ server/mcp-server.ts      # MCP server implementation
└── index.ts                  # Main entry point

Development

Build

npm run build

Type Checking

npm run typecheck

Linting

npm run lint

Testing

npm test

Integration

This MCP server can be integrated with:

  • AI Assistants: For intelligent API discovery and recommendation
  • Code Generation Tools: For automatic API client generation
  • BPMN Designers: For process automation with IFS integration
  • Documentation Tools: For API catalog and usage examples

License

MIT