laravel-tasks

laravel-tasks

MCP server that connects to a Laravel Tasks API, enabling AI assistants to perform CRUD operations on tasks.

Category
Visit Server

README

Laravel Tasks API - MCP Server

A Model Context Protocol (MCP) server that connects to your Laravel Tasks API, allowing AI assistants to interact with your task management system.

Features

  • ✅ Health check endpoint
  • ✅ List all tasks
  • ✅ Get task by ID
  • ✅ Create new tasks
  • ✅ Update existing tasks
  • ✅ Delete tasks

Prerequisites

  • Python 3.10 or higher
  • Laravel API running at http://localhost:8000
  • MCP API key from your Laravel application

Installation

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Set up environment variables:

    cp .env.example .env
    

    Then edit .env and add your MCP_API_KEY.

Configuration

The server uses the following environment variables:

  • API_BASE_URL: Base URL for your Laravel API (default: http://localhost:8000/api/mcp)
  • MCP_API_KEY: Your API key for authentication (required)

Running the Server

For Cursor IDE

Add this to your Cursor settings (.cursor/config.json or Cursor settings):

{
  "mcpServers": {
    "laravel-tasks": {
      "command": "python",
      "args": ["/absolute/path/to/MCP Server/server.py"],
      "env": {
        "MCP_API_KEY": "your-api-key-here",
        "API_BASE_URL": "http://localhost:8000/api/mcp"
      }
    }
  }
}

Testing Locally

You can test the server using the MCP Inspector or by running:

python server.py

Available Tools

The MCP server exposes the following tools:

  1. health_check - Check API health status
  2. list_tasks - Get all tasks
  3. get_task - Get a specific task by ID
  4. create_task - Create a new task (requires title, optional description and status)
  5. update_task - Update an existing task (requires task_id, optional fields to update)
  6. delete_task - Delete a task by ID

API Endpoints

The server connects to these Laravel endpoints:

  • GET /api/mcp/health - Health check
  • GET /api/mcp/tasks - List tasks
  • POST /api/mcp/tasks - Create task
  • GET /api/mcp/tasks/{id} - Get task
  • PUT/PATCH /api/mcp/tasks/{id} - Update task
  • DELETE /api/mcp/tasks/{id} - Delete task

Authentication

All requests include authentication headers:

  • X-AI-Agent-Api-Key: <your MCP_API_KEY>
  • Authorization: Bearer <your MCP_API_KEY>

Project Structure

MCP Server/
├── server.py          # Main entry point - MCP server initialization
├── config.py          # Configuration management class
├── api_client.py      # Laravel API HTTP client class
├── tools.py           # MCP tool definitions and handlers
├── utils.py           # Utility functions
├── requirements.txt   # Python dependencies
├── .env.example      # Environment variables template
└── README.md         # This file

Architecture

The codebase is organized into modular classes:

  • Config (config.py): Manages configuration and environment variables
  • LaravelAPIClient (api_client.py): Handles all HTTP requests to Laravel API
  • TaskTools (tools.py): Defines MCP tools and handles tool execution
  • LaravelTasksMCPServer (server.py): Main server class that ties everything together

Troubleshooting

  • Connection errors: Ensure your Laravel API is running at http://localhost:8000
  • Authentication errors: Verify your MCP_API_KEY is correct
  • Import errors: Make sure all dependencies are installed: pip install -r requirements.txt
  • Module import errors: Ensure you're running from the project root directory

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured