How to Set Up AI Client Integration
This guide covers setting up AI clients to work with the documcp MCP server for seamless documentation workflows.
Prerequisites
- documcp MCP server installed and working
- AI client that supports MCP protocol
- Basic understanding of JSON configuration files
Supported AI Clients
Claude Desktop (Recommended)
Claude Desktop provides the most mature MCP integration with documcp.
Installation
-
Download Claude Desktop:
- Visit Claude Desktop
- Install for your operating system
-
Locate Configuration File:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/claude/claude_desktop_config.json
- macOS:
-
Configure documcp Server:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": ["/path/to/documcp/dist/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
} -
Find Your documcp Path:
# If installed globally
npm list -g documcp
# If installed locally
pwd # Use this path + /dist/index.js -
Restart Claude Desktop to load the configuration.
Verification
Test the integration by asking Claude:
Can you analyze my repository using documcp tools?
Claude should respond with available documcp tools and offer to help with documentation setup.
GitHub Copilot Integration
GitHub Copilot Chat supports MCP through extensions.
Setup Steps
-
Install MCP Extension:
- Open VS Code
- Install "MCP for GitHub Copilot" extension
- Restart VS Code
-
Configure MCP Server:
// settings.json
{
"mcp.servers": {
"documcp": {
"transport": "stdio",
"command": "node",
"args": ["/path/to/documcp/dist/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
} -
Enable MCP in Copilot:
- Open Command Palette (
Cmd+Shift+P
) - Run "MCP: Enable Server"
- Select "documcp"
- Open Command Palette (
Usage
In GitHub Copilot Chat:
@mcp documcp analyze this repository and recommend documentation structure
Other AI Clients
OpenAI ChatGPT (via MCP Bridge)
Use community MCP bridges for ChatGPT integration:
-
Install MCP Bridge:
npm install -g mcp-chatgpt-bridge
-
Configure Bridge:
{
"servers": {
"documcp": {
"command": "node",
"args": ["/path/to/documcp/dist/index.js"]
}
},
"chatgpt": {
"apiKey": "your-openai-api-key",
"model": "gpt-4"
}
}
Configuration Best Practices
Security Configuration
-
Limit File Access:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": ["/path/to/documcp/dist/index.js"],
"env": {
"NODE_ENV": "production",
"ALLOWED_PATHS": "/home/user/projects,/workspace"
}
}
}
} -
Resource Limits:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": [
"--max-old-space-size=2048",
"/path/to/documcp/dist/index.js"
],
"timeout": 30000
}
}
}
Performance Optimization
-
Memory Management:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": [
"--max-old-space-size=4096",
"--expose-gc",
"/path/to/documcp/dist/index.js"
]
}
}
} -
Concurrent Processing:
{
"mcpServers": {
"documcp": {
"env": {
"UV_THREADPOOL_SIZE": "8",
"NODE_OPTIONS": "--max-old-space-size=4096"
}
}
}
}
Workflow Integration
Complete Documentation Setup
Once your AI client is configured, you can run complete documentation workflows:
I need to set up comprehensive documentation for my TypeScript project. Can you:
1. Analyze my repository structure
2. Recommend the best static site generator
3. Create a complete Diataxis documentation structure
4. Set up GitHub Pages deployment
5. Populate the documentation with project-specific content
Automated Documentation Updates
Set up automated documentation maintenance:
Please help me:
1. Detect gaps in my current documentation
2. Validate all existing content for accuracy
3. Update outdated sections
4. Generate missing how-to guides
Multi-Project Management
For teams managing multiple projects:
Can you help me standardize documentation across multiple repositories? I want to:
1. Analyze 5 different projects
2. Create consistent documentation templates
3. Set up automated deployment workflows
4. Establish documentation quality standards
Troubleshooting Integration
Common Issues
AI Client Shows No Tools:
- Verify MCP server path is correct
- Check that Node.js is in PATH
- Restart the AI client
- Review client-specific logs
Tool Execution Timeouts:
- Increase timeout values in configuration
- Add memory limits to prevent crashes
- Test with smaller repositories first
Permission Errors:
- Ensure documcp has read access to target repositories
- Check file system permissions
- Verify environment variable configuration
Debug Mode
Enable debug mode for troubleshooting:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": ["/path/to/documcp/dist/index.js"],
"env": {
"DEBUG": "documcp:*",
"NODE_ENV": "development"
}
}
}
}
Advanced Integration
Custom Tool Configuration
Configure specific tools for your workflow:
{
"mcpServers": {
"documcp": {
"command": "node",
"args": ["/path/to/documcp/dist/index.js"],
"env": {
"DOCUMCP_DEFAULT_SSG": "docusaurus",
"DOCUMCP_DEFAULT_DEPTH": "comprehensive",
"DOCUMCP_ENABLE_GITHUB_INTEGRATION": "true"
}
}
}
}
Team Configuration
Share configuration across team members:
# Create team configuration template
cat > team-mcp-config.json << EOF
{
"mcpServers": {
"documcp": {
"command": "node",
"args": ["$(npm root -g)/documcp/dist/index.js"],
"env": {
"NODE_ENV": "production",
"TEAM_STANDARDS": "true"
}
}
}
}
EOF