Microsoft Style Guide MCP Server

Microsoft Style Guide MCP Server

A professional MCP server for analyzing content against the official Microsoft Writing Style Guide, enabling style, grammar, terminology, and accessibility checks via AI tools like VS Code and GitHub Copilot.

Category
访问服务器

README

Microsoft Style Guide MCP Server

A professional Model Context Protocol (MCP) server implementation for analyzing content against the official Microsoft Writing Style Guide. This tool provides seamless integration with VS Code, GitHub Copilot Chat, and other MCP-compatible AI tools to help content creators ensure their writing follows Microsoft's style principles: warm and relaxed, crisp and clear, and ready to help.

🚀 Two Server Versions

🌐 Web-Enabled Version (mcp_server_web.py) - Recommended

  • Fetches live guidance from the official Microsoft Style Guide website
  • Always up-to-date with the latest style guide changes
  • Provides real official content and examples from Microsoft Learn
  • Requires internet connection for comprehensive analysis

📚 Offline Version (mcp_server.py)

  • Built-in style guide rules and patterns
  • Fast local analysis without internet dependency
  • Perfect for secure environments or offline work
  • Provides links to official documentation for detailed guidance

✨ Key Features

  • 🔍 Official Style Guide Integration: Fetches current guidance from Microsoft Learn
  • 🛠️ VS Code Integration: Seamless MCP protocol integration with automated setup
  • 💬 AI Chat Compatible: Works with GitHub Copilot, Claude, and other MCP-enabled AI tools
  • 📊 Comprehensive Analysis: Voice/tone, grammar, terminology, and accessibility checking
  • ⚡ One-Command Setup: Fully automated installation and configuration
  • 🌐 Always Current: Web version stays synchronized with official style guide updates

🚀 Quick Installation

Prerequisites

  • Python 3.8+
  • VS Code (for IDE integration)
  • Internet connection (for web-enabled version)

One-Command Setup

# Clone or download this repository
git clone https://github.com/your-username/mslearn-authoring-mcp-server.git
cd mslearn-authoring-mcp-server

# Run automated setup (chooses web version by default)
python setup_script.py

That's it! The setup script will:

  • ✅ Install Python dependencies
  • ✅ Configure VS Code MCP integration
  • ✅ Set up AI chat tool compatibility
  • ✅ Test server functionality
  • ✅ Create all necessary configuration files

Advanced Setup Options

# Auto-select web version (default)
python setup_script.py --auto

# Force offline version
python setup_script.py --offline

# Skip all prompts with environment variable
set AUTOMATED_SETUP=true & python setup_script.py

📁 Project Structure

mslearn-authoring-mcp-server/
├── mcp_server.py              # Offline MCP server implementation
├── mcp_server_web.py          # Web-enabled MCP server (recommended)
├── mcp_client.py              # Client for testing and interaction
├── mcp_manifest.json          # MCP server manifest for VS Code
├── setup_script.py            # Automated installation script
├── requirements.txt           # Python dependencies
└── README.md                  # This documentation

📖 Usage

Command Line Interface

Quick Test

# Test with simple text (web version)
python mcp_client.py --mode text --text "Your content here"

# Interactive mode
python mcp_client.py --mode interactive

# Analyze a specific file
python mcp_client.py --mode file --file document.md

Available Analysis Types

  • comprehensive - Complete style analysis (default)
  • voice_tone - Voice and tone compliance
  • grammar - Grammar and style patterns
  • terminology - Terminology consistency
  • accessibility - Inclusive language checking

VS Code Integration

After running the setup script, the MCP server is automatically configured in VS Code:

  1. Automatic Configuration: Setup script creates all necessary VS Code settings
  2. MCP Server Detection: Server appears in MCP-compatible extensions
  3. AI Chat Integration: Works with GitHub Copilot Chat and other AI tools
  4. Real-time Analysis: Content analysis through MCP protocol

Using with GitHub Copilot Chat

In VS Code, use Copilot Chat with commands like:

@workspace analyze this document for Microsoft Style Guide compliance
@workspace check the voice and tone of this content
@workspace suggest style improvements for this text

Direct MCP Integration

For developers integrating with other MCP clients:

# Server connection parameters
{
  "command": "python",
  "args": ["path/to/mcp_server_web.py"],
  "env": {
    "PYTHONPATH": "path/to/project"
  }
}

🎯 Microsoft Style Guide Principles

This tool analyzes content based on Microsoft's core principles:

Voice and Tone

  • Warm and Relaxed: Use contractions, natural language
  • Crisp and Clear: Direct, scannable content under 25 words per sentence
  • Ready to Help: Action-oriented, supportive language

Grammar and Style Standards

  • Active Voice: "You can configure settings" vs "Settings can be configured"
  • Second Person: Address readers as "you"
  • Imperative Mood: Use for instructions (Click, Choose, Select)
  • Scannable Format: Use headers, bullets, and short paragraphs

Terminology Consistency

Preferred Avoid Context
AI A.I. No periods in abbreviation
email e-mail One word
sign in (verb) login, log in Microsoft standard
website web site One word

Accessibility and Inclusion

  • Use "everyone" instead of "guys"
  • Use "allow list" instead of "whitelist"
  • People-first language: "people with disabilities"

📊 Example Analysis Output

Web-Enabled Version

📋 Microsoft Style Guide Analysis

✅ Good - Minor improvements suggested

📊 Text Statistics:
   • Words: 45 | Sentences: 3 | Avg: 15.0 words/sentence

🔍 Issues Found: 2
   • Voice/Tone: Use more contractions for natural tone
   • Accessibility: Consider "everyone" instead of "users"

🌐 Official Microsoft Guidance:
   Voice and tone - Use contractions like "it's" and "you're" 
   to create a friendly, approachable tone...

📎 Reference: https://learn.microsoft.com/en-us/style-guide/voice-tone

Offline Version

📋 Microsoft Style Guide Analysis

⚠️ Minor style issues detected

📊 Text Statistics:
   Words: 45 | Sentences: 3 | Avg: 15.0 words/sentence

🔍 Issues Found: 2
   • Voice/Tone: Consider more conversational language
   • Terminology: Check official Microsoft terms

🌐 For detailed guidance:
   https://learn.microsoft.com/en-us/style-guide

🛠️ Development and Testing

Running Tests

# Test server functionality
python mcp_client.py --mode text --text "Test content"

# Verify web version connectivity
python -c "import mcp_server_web; print('Web server OK')"

# Check offline version
python -c "import mcp_server; print('Offline server OK')"

Server Configuration

Both servers expose these MCP tools:

  • analyze_content - Main analysis function
  • get_style_guidelines - Retrieve specific guidelines
  • suggest_improvements - Get improvement recommendations
  • search_style_guide - Search official documentation (web version only)

🐛 Troubleshooting

Common Issues

Setup Script Fails

# Check Python version
python --version  # Should be 3.8+

# Install dependencies manually
pip install -r requirements.txt

VS Code Integration Not Working

  • Restart VS Code completely after running setup
  • Check that MCP-compatible extensions are installed
  • Verify server appears in extension settings

Web Version Connection Issues

  • Check internet connectivity
  • Verify firewall allows Python to access microsoft.com
  • Try offline version as fallback

Debug Mode

# Run with verbose output
python mcp_client.py --mode text --text "test" --verbose

# Check server logs
python mcp_server_web.py  # Should start without errors

🔧 Configuration Options

Environment Variables

# Force specific server version
set MCP_SERVER_VERSION=web
set MCP_SERVER_VERSION=offline

# Enable debug logging
set MCP_DEBUG=true

# Skip VS Code configuration
set SKIP_VSCODE_CONFIG=true

VS Code Settings

The setup script creates comprehensive VS Code configuration:

  • MCP server registration
  • Multiple extension compatibility
  • Automatic server discovery
  • Debug configuration

🤝 Contributing

  1. Fork this repository
  2. Create a feature branch
  3. Follow Microsoft Style Guide principles in code and documentation
  4. Test with both server versions
  5. Submit a pull request

Development Setup

git clone your-fork-url
cd mslearn-authoring-mcp-server
python setup_script.py --auto
# Make changes and test
python mcp_client.py --mode interactive

📚 References

📄 License

This project is licensed under the MIT License. See LICENSE file for details.

⚠️ Disclaimer

This tool is not officially affiliated with Microsoft. It's an independent implementation based on publicly available Microsoft Style Guide principles and documentation.


Built for better technical writing and communication

For questions or issues, please check the troubleshooting section or create an issue in this repository.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选