🧠 Model Context Protocol (MCP) Server

by sathishj21

355 downloads
Not rated
GitHub

About

A modular FastAPI-based MCP (Model Context Protocol) server that supports reading local JSON and Excel files via HTTP API. Easily extensible for agents and automation tools like Flowsie AI or n8n. Includes Docker support and clean production-ready structure.

Details

Author
sathishj21
Downloads
355
Categories
Developer Tools

- Reads local JSON and Excel files and returns JSON
- Exposes a single REST endpoint: GET /local/read
- Supports .json, .xlsx, and .xls file formats
- Configurable via the app/configs/ directory
- Can be run locally or inside a Docker container
- Built with FastAPI and includes auto‑generated Swagger docs at /docs

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🧠 Model Context Protocol (MCP) Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies with pip install -r requirements.txt (requires Python 3.10+), then run locally with uvicorn app.main:app --reload --port 8000. Use the endpoint GET /local/read with a query parameter filename pointing to a file inside app/local_data/. A Docker image can be built with docker build -t mcp-server . and run with docker run -p 8000:8000 mcp-server.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83e\udde0 model context protocol (mcp) server": {
            "mcp-server-sathishj21": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mcp-server",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-sathishj21": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mcp-server",
            "."
        ]
    }
}

🧠 Model Context Protocol (MCP) Server

This project is a modular, FastAPI-based MCP server designed for use in agent-based systems and orchestration tools like Flowsie AI and n8n. It currently supports reading local JSON and Excel files and returns the data in JSON format.

---

πŸ“ Project Structure

mcp_project/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ configs/         # App configuration settings
β”‚   β”œβ”€β”€ local_data/      # Folder to store local JSON/Excel files
β”‚   β”œβ”€β”€ models/          # (Reserved for data models)
β”‚   β”œβ”€β”€ routers/         # FastAPI route handlers
β”‚   β”œβ”€β”€ services/        # Business logic (file readers, connectors)
β”‚   β”œβ”€β”€ utils/           # Utility functions (logging, parsing)
β”‚   └── main.py          # FastAPI app entry point
β”œβ”€β”€ Dockerfile           # Docker setup
└── requirements.txt     # Python dependencies

---

πŸš€ Getting Started

1. Install dependencies

Make sure you have Python 3.10+ installed:

pip install -r requirements.txt

2. Run the app locally

uvicorn app.main:app --reload --port 8000

Server will be available at: http://localhost:8000/docs

3. Example Usage

Endpoint: GET /local/read

Query Parameter:
- filename: Name of the file inside app/local_data/ (e.g., sample.json, data.xlsx)

curl -X 'GET'   'http://localhost:8000/local/read?filename=sample.json'   -H 'accept: application/json'

---

🐳 Docker Usage

Build Docker Image

docker build -t mcp-server .

Run the Container

docker run -p 8000:8000 mcp-server

Then access the server at: http://localhost:8000/docs

---

πŸ“¦ File Support

The local file reader MCP server supports:
- .json β€” Standard structured JSON
- .xlsx / .xls β€” Excel files (auto-converted to JSON)

Returned format is always a JSON list or dict.

---

πŸ›  Future Modules (Suggested)

- design_system_connector: For querying design metadata
- gmail_connector: Secure access to Gmail via OAuth
- context_session_handler: Track and manage agent sessions

---

πŸ“„ License

MIT License β€” use freely and modify as needed.

---

✨ Author

This project was generated via [ChatGPT-4] and customized for real-world MCP use cases.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.