Excel MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Excel MCP ServerAdd 'John' to cell B3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Excel MCP Agent
An AI-powered Excel automation project built using FastAPI, Model Context Protocol (MCP), Groq LLM, HTTPX, JWT Authentication, and OpenPyXL.
The project enables users to manipulate Excel spreadsheets through natural language by combining an AI agent, an MCP server, and a secure REST API.
Architecture
Natural Language Request
│
▼
Groq LLM Agent
│
▼
MCP Client
│
▼
MCP Server
│
▼
HTTPX API Client (JWT)
│
▼
FastAPI REST API
│
▼
Excel WorkbookRelated MCP server: @node2flow/google-sheets-mcp
Features
Secure REST API using JWT Authentication
AI-powered Excel automation
MCP Server exposing Excel tools
Natural language interaction through Groq LLM
CRUD operations on Excel spreadsheets
Swagger UI documentation
Modular project structure
Automatic JWT handling inside the MCP server
Project Structure
excel_project/
│
├── excel_api/
│ ├── auth.py
│ ├── main.py
│ ├── models.py
│ ├── services.py
│ └── files/
│ └── data.xlsx
│
├── excel_mcp_server/
│ ├── api_client.py
│ ├── config.py
│ └── mcp_server.py
│
├── excel_mcp_client/
│ ├── agent.py
│ ├── client.py
│ ├── llm_config.py
│ ├── main.py
│ └── prompts.py
│
├── requirements.txt
└── README.mdTechnologies Used
Python 3
FastAPI
MCP (Model Context Protocol)
Groq API
HTTPX
OpenPyXL
PyJWT
Pydantic
Uvicorn
Excel API Endpoints
Authentication
Method | Endpoint | Description |
POST |
| Authenticate user and obtain JWT token |
GET |
| Retrieve current authenticated user |
Excel Operations
Method | Endpoint | Description |
POST |
| Insert data into a single Excel cell |
POST |
| Insert data into multiple Excel cells |
DELETE |
| Clear data from a single cell |
DELETE |
| Clear data from a range of cells |
MCP Tools
The MCP server exposes the following tools:
add_data
add_data_range
delete_cell_data
delete_cell_range
These tools internally communicate with the secured FastAPI application.
Authentication Flow
Client
│
▼
POST /auth/login
│
▼
JWT Access Token
│
▼
Authorization: Bearer <token>
│
▼
Protected Excel APIsThe MCP server automatically:
logs in to the FastAPI application
retrieves a JWT token
stores the token
includes the Authorization header in every API request
re-authenticates if required
Installation
Clone the repository.
git clone https://github.com/<your-username>/excel-mcp-agent.gitNavigate to the project.
cd excel-mcp-agentCreate a virtual environment.
python -m venv .venvActivate the virtual environment.
Windows
.venv\Scripts\activateLinux/macOS
source .venv/bin/activateInstall dependencies.
pip install -r requirements.txtEnvironment Variables
Create a .env file in the project root.
GROQ_API_KEY=your_groq_api_key
JWT_SECRET_KEY=your_secret_key
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
API_BASE_URL=http://127.0.0.1:8000
API_USERNAME=admin
API_PASSWORD=admin123Running the FastAPI Server
uvicorn excel_api.main:app --reloadSwagger UI
http://127.0.0.1:8000/docsRunning the MCP Server
python -m excel_mcp_server.mcp_serveror
mcp dev excel_mcp_server/mcp_server.py:mcpRunning the AI Agent
python -m excel_mcp_client.mainExample prompts:
Add "John" to row 3 column 2
Insert "Apple", "Banana", "Orange" into A1:A3
Delete data from C5
Clear the range B2:D5Example Workflow
User
│
▼
Natural Language Prompt
│
▼
Groq LLM
│
▼
MCP Client
│
▼
MCP Server
│
▼
FastAPI API
│
▼
Excel Workbook UpdatedFuture Improvements
Multiple worksheets support
Read/search Excel data
Update existing cell values
File upload support
User management with database
Refresh token implementation
Role-based authorization
Docker support
License
This project is intended for learning purposes.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/labeebkm/AI-Powered-Excel-Management'
If you have feedback or need assistance with the MCP directory API, please join our Discord server