excel-mcp
Integrates with GitHub Copilot to allow performing Excel operations through natural language prompts in VS Code, such as reading, writing, and manipulating Excel files.
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-mcpread the first row of Sheet1 in data.xlsx"
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 Server
A Model Context Protocol (MCP) server for Excel operations with enterprise-grade security and clean architecture. Seamlessly integrates with GitHub Copilot, Cline, and other MCP-compatible tools in VS Code.
Features
Complete Excel Operations: Read, write, and manipulate Excel files (.xlsx, .xls)
Clean Architecture: Follows Single Responsibility Principle for maintainability
Enterprise Security: Robust permission system with path restrictions and access control
VS Code Integration: Works seamlessly with GitHub Copilot and Cline
TypeScript: Full type safety with modern ES2022+ features
Zero Deprecated Dependencies: Uses only current, actively maintained libraries
Related MCP server: Excel MCP Server
Quick Start
Installation
# Clone the repository
git clone https://github.com/az-coder-123/excel-mcp.git
cd excel-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Copy example environment file
cp .env.example .env📌 Đã cấu hình sẵn cho Cline
Server đã được cấu hình và kết nối sẵn với Cline! Xem Hướng dẫn cài đặt chi tiết để biết:
✅ Trạng thái hiện tại: Đã kết nối và hoạt động bình thường
Server đang chạy:
node dist/index.jsCấu hình Cline:
.cline/mcp_servers.jsonFile cấu hình đã sẵn sàng sử dụng
Xem ngay: docs/SETUP_GUIDE.md để biết cách sử dụng
Configuration
Edit .env file to customize permissions:
# Restrict access to specific directories
MCP_ALLOWED_PATHS=/home/user/documents,/workspace
# Block sensitive system directories
MCP_DENIED_PATHS=/etc/*,/sys/*,C:\Windows\*
# Set maximum file size (50MB default)
MCP_MAX_FILE_SIZE=52428800VS Code Integration
This server works seamlessly with MCP-compatible tools in VS Code. See the dedicated setup guides for detailed configuration instructions:
GitHub Copilot Setup — Configuration for GitHub Copilot Chat in VS Code.
Cline Setup — Configuration for the Cline extension in VS Code.
Available Tools
For detailed parameter references, see the Tools Reference.
System
Tool | Description |
| Check server health, dependencies, and configuration |
Workbook Operations
Tool | Description |
| Open an Excel file for operations |
| Create a new Excel workbook |
| Save the workbook to disk |
| Close an opened workbook |
| Get workbook context and state |
| Export worksheet to a new Excel file |
Worksheet Operations
Tool | Description |
| List all worksheets in a workbook |
| Add a new worksheet |
| Delete a worksheet |
| Rename a worksheet |
| Copy a worksheet |
Cell Operations
Tool | Description |
| Read a single cell value |
| Read multiple cells |
| Write a value to a cell |
| Write multiple cells at once |
| Get detailed cell information (type, formula) |
| Copy a cell range to another location |
| Find and replace text |
Formatting → Detailed docs
Tool | Category | Docs |
| Font & Text | |
| Font & Text | |
| Font & Text | |
| Alignment | |
| Alignment | |
| Borders | |
| Borders | |
| Borders | |
| Colors | |
| Colors | |
| Number Formats | |
| Number Formats | |
| Number Formats | |
| Number Formats | |
| Style Presets | |
| Style Presets | |
| Style Presets |
Accounting & Finance → Detailed docs
Tool | Category | Docs |
| Financial Calculations | |
| Financial Calculations | |
| Financial Calculations | |
| Financial Calculations | |
| Financial Calculations | |
| Accounting Formats | |
| Accounting Formats | |
| Accounting Formats | |
| Accounting Formats | |
| Financial Analysis | |
| Financial Analysis | |
| Financial Analysis | |
| Financial Analysis | |
| Investment Analysis | |
| Investment Analysis | |
| Investment Analysis | |
| Loan & Debt | |
| Loan & Debt | |
| Tax & Currency | |
| Tax & Currency |
Usage Examples & Reference
Examples — Practical usage examples for all tool groups
Reference — Color codes, border styles, font names, AARRGGBB format
Security Features
Permission Levels
read: Read-only access to Excel files
write: Create and modify Excel files
delete: Delete worksheets and clear data
admin: Full administrative access
Path Restrictions
Configure allowed and denied paths using wildcards:
# Allow only specific directories
MCP_ALLOWED_PATHS=/workspace/*,/home/user/documents/*
# Block sensitive system paths
MCP_DENIED_PATHS=/etc/*,/sys/*,/proc/*,C:\Windows\*File Size Limits
Prevent processing of excessively large files:
MCP_MAX_FILE_SIZE=52428800 # 50MBExtension Whitelist
Only process specific file types (configured by default):
.xlsx- Excel Workbook.xls- Excel 97-2003 Workbook.xlsm- Excel Macro-Enabled Workbook.xlsb- Excel Binary Workbook
Architecture
excel-mcp/
├── src/
│ ├── index.ts # Application entry point
│ ├── types/
│ │ └── index.ts # Type definitions
│ ├── security/
│ │ └── permission-checker.ts # Access control
│ ├── services/
│ │ └── excel-service.ts # Excel operations
│ ├── tools/
│ │ ├── tool-definitions.ts # Tool schemas
│ │ └── tool-handler.ts # Tool execution
│ ├── server/
│ │ └── excel-mcp-server.ts # MCP server core
│ └── utils/
│ └── logger.ts # Logging utility
├── docs/
│ ├── ARCHITECTURE.md # Architecture details
│ ├── API.md # API reference
│ ├── SECURITY.md # Security guide
│ └── TROUBLESHOOTING.md # Common issues
└── dist/ # Compiled JavaScriptDesign Principles
Single Responsibility: Each class/module has one clear purpose
Dependency Injection: Components are loosely coupled
Type Safety: Full TypeScript coverage with strict mode
Error Handling: Comprehensive error catching and reporting
Security First: Permission checks before all operations
Development
Scripts
# Development with hot reload
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run format
# Clean build artifacts
npm run cleanProject Structure
src/- TypeScript source filesdist/- Compiled JavaScript outputdocs/- Documentationpackage.json- Dependencies and scriptstsconfig.json- TypeScript configuration
Environment Variables
Variable | Description | Default |
| Server identifier |
|
| Server version |
|
| Logging verbosity |
|
| Comma-separated allowed paths | All paths |
| Comma-separated denied paths | System paths |
| Maximum file size in bytes |
|
Troubleshooting
Common Issues
"Permission denied" errors
Check your
MCP_ALLOWED_PATHSconfigurationEnsure the file isn't in a denied path
Verify you have the required permission level
"Workbook not opened" errors
Call
excel_open_workbookbefore other operationsCheck that the file path is correct
Ensure the file isn't corrupted
TypeScript compilation errors
Run
npm installto ensure all dependencies are installedCheck Node.js version (requires >= 18.0.0)
For more troubleshooting help, see docs/TROUBLESHOOTING.md.
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please read our contributing guidelines and code of conduct.
Support
GitHub Issues: Report bugs
Documentation: Full docs
Tools Reference: Tools index
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/az-coder-123/excel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server