office-mcp
Version:
A Model Context Protocol server for Microsoft Office document manipulation
139 lines (98 loc) • 2.7 kB
Markdown
# Office MCP Server
A Model Context Protocol (MCP) server for Microsoft Office document manipulation, providing AI assistants with the ability to read, write, and manipulate Word documents (.docx files).
## Prerequisites
**Required:**
- [.NET 9.0 Runtime or SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
- Node.js 16.0.0 or higher
**Verify .NET installation:**
```bash
dotnet --version
# Should show 9.0.x or higher
```
## Installation
### From npm (recommended)
```bash
npm install -g office-mcp
```
Or use with npx (no installation required):
```bash
npx office-mcp
```
### Building from Source
If you need to build the package locally:
```bash
# Clone the repository
git clone <repository-url>
cd mcp-servers/office
# Install dependencies and build
npm install
npm run build
# Test the build
npm test
# Package for local installation
npm pack
# Install locally
npm install -g ./office-mcp-*.tgz
```
## Usage
### Command Line
Start the MCP server in stdio mode:
```bash
office-mcp
```
### MCP Client Configuration
Add to your MCP client configuration:
```json
{
"servers": {
"office": {
"command": "office-mcp"
}
}
}
```
Or if using npx:
```json
{
"servers": {
"office": {
"command": "npx",
"args": ["office-mcp"]
}
}
}
```
## Development
### Build Scripts
The project includes cross-platform build scripts:
```bash
# Standard build (detects platform automatically)
npm run build
# Clean build artifacts
npm run clean
# Build for release/publishing
npm run build:release
```
### Platform Support
The build system automatically detects and builds for your platform:
- **macOS**: x64 and ARM64 (Apple Silicon)
- **Linux**: x64 and ARM64
- **Windows**: x64 and ARM64
### Troubleshooting
**"office-mcp: command not found" after installation:**
- Ensure .NET 9.0 is installed and in your PATH
- Try reinstalling: `npm uninstall -g office-mcp && npm install -g office-mcp`
- Use npx instead: `npx office-mcp`
**"Failed to start OfficeMcp" error:**
- Verify .NET runtime: `dotnet --version`
- Check platform compatibility: The package should match your OS and architecture
- Rebuild from source if needed (see Building from Source section)
## Contributing
This MCP server is part of the commercial Supen platform. As this is proprietary software, external contributions are not currently accepted.
## License
This software is proprietary and not open source. All rights reserved by Supen Team.
## Support
For support and inquiries about this MCP server, please contact the Supen Team.
## Links
- [Model Context Protocol](https://modelcontextprotocol.io)
- [.NET Download](https://dotnet.microsoft.com/download)