MCP Server Prototypes
Provides three MCP servers for interacting with Excel files, PDF documents, and SQLite databases, enabling AI assistants to read, create, update, and analyze local resources.
README
MCP Server Prototypes
Overview
This project investigates the Model Context Protocol (MCP) and demonstrates how AI assistants can interact with external data sources through MCP servers.
Three MCP server prototypes were developed:
- Excel MCP Server
- PDF MCP Server
- SQL MCP Server
These servers expose tools that allow AI assistants such as Claude Desktop to read, create, update, and analyze local resources through a standardized protocol.
MCP Architecture
MCP follows a client-server architecture.
- The user interacts with an AI client.
- The AI client communicates with MCP servers using the MCP protocol.
- MCP servers expose tools.
- Tools perform operations on external resources.
- Results are returned to the AI client and presented to the user.
Architecture Diagram
User
↓
Claude Desktop (MCP Client)
↓
MCP Protocol
↓
MCP Servers
├── Excel Server
├── PDF Server
└── SQL Server
Technical Stack
| Component | Technology |
|---|---|
| Language | Python 3.x |
| MCP Framework | MCP Python SDK (FastMCP) |
| Excel Processing | openpyxl |
| PDF Processing | pdfplumber |
| Database | SQLite |
| Testing Client | Claude Desktop |
| Development Environment | VS Code |
Project Structure
mcp-prototypes/
│
├── README.md
├── requirements.txt
│
├── excel_mcp/
│ ├── server.py
│ └── sample.xlsx
│
├── pdf_mcp/
│ ├── server.py
│ ├── sample1.pdf
│ └── sample2.pdf
│
├── sql_mcp/
│ ├── server.py
│ └── database.db
│
└── .gitignore
Setup
Create Virtual Environment
python3 -m venv venv
Activate Environment
macOS/Linux
source venv/bin/activate
Windows
venv\Scripts\activate
Install Dependencies
pip install -r requirements.txt
SQLite is included with Python and does not require additional installation.
Claude Desktop Configuration
Example MCP configuration:
{
"mcpServers": {
"excel-mcp": {
"command": "/path/to/venv/bin/python",
"args": [
"/path/to/excel_mcp/server.py"
]
},
"pdf-mcp": {
"command": "/path/to/venv/bin/python",
"args": [
"/path/to/pdf_mcp/server.py"
]
},
"sql-mcp": {
"command": "/path/to/venv/bin/python",
"args": [
"/path/to/sql_mcp/server.py"
]
}
}
}
Restart Claude Desktop after modifying the configuration.
Excel MCP Server
Tools
| Tool | Description |
|---|---|
| server_directory | Show server location |
| list_excel_files | List available Excel files |
| create_excel | Create workbook |
| read_excel | Read active sheet |
| read_range | Read cell range |
| read_sheet | Read specific sheet |
| write_row | Append row |
| update_cell | Update cell |
Example Prompts
- List available Excel files
- Create sales.xlsx with columns Customer, Product, Quantity
- Add a new row for Alice
- Read sales.xlsx
- Update Quantity to 500
- Read Sheet2 from sample.xlsx
PDF MCP Server
Tools
| Tool | Description |
|---|---|
| server_directory | Show server location |
| list_pdf_files | List available PDFs |
| read_pdf | Extract text |
| read_pdf_tables | Extract tables |
| pdf_metadata | Retrieve metadata |
Example Prompts
- List available PDF files
- Summarize sample1.pdf
- Extract tables from sample2.pdf
- Show metadata for sample2.pdf
- What are the key findings in sample2.pdf?
SQL MCP Server
Tools
| Tool | Description |
|---|---|
| server_directory | Show server location |
| list_database_files | List SQLite databases |
| list_tables | Show tables |
| describe_table | Show schema |
| run_query | Execute SELECT queries |
| run_write | Execute INSERT/UPDATE/DELETE queries |
| seed_demo_data | Create demo data |
Example Prompts
- Create demo data
- Show all orders
- Describe the orders table
- Add a new order for Sofia
- Update Sofia's quantity to 3
- Which customer placed the most orders?
Key Findings
Traditional AI assistants are limited to information available within the conversation context.
The Model Context Protocol extends these capabilities by allowing AI clients to discover and invoke external tools exposed by MCP servers.
In this project:
- The Excel MCP server provided access to spreadsheets.
- The PDF MCP server provided access to document contents.
- The SQL MCP server provided access to database records.
These tools enabled Claude Desktop to perform real file and database operations through a standardized protocol.
Limitations
These prototypes were designed for demonstration and learning purposes.
Current limitations include:
- No authentication
- Limited error handling
- Direct SQL execution
- Files restricted to server directories
- No role-based access control
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。