Client Configuration
Once your S3 Documentation MCP server is running, configure your MCP client to connect to it.
Prerequisites
Section titled “Prerequisites”- Server running on
http://localhost:3000(default) - Server health check passes:
curl http://localhost:3000/health
Cursor
Section titled “Cursor”Configuration File
Section titled “Configuration File”Edit your Cursor MCP configuration file:
~/.cursor/mcp.jsonBasic Configuration (No Auth)
Section titled “Basic Configuration (No Auth)”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "note": "S3 Documentation RAG Server" } }}With Authentication
Section titled “With Authentication”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "headers": { "Authorization": "Bearer your-secret-key" }, "note": "S3 Documentation RAG Server with auth" } }}Multiple Servers
Section titled “Multiple Servers”You can configure multiple MCP servers:
{ "mcpServers": { "docs": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "note": "Product Documentation" }, "api-docs": { "type": "streamable-http", "url": "http://127.0.0.1:3001/mcp", "note": "API Documentation" } }}Restart Cursor
Section titled “Restart Cursor”After editing the configuration:
- Save the file
- Restart Cursor
- Open the MCP panel to verify the connection
Claude Desktop
Section titled “Claude Desktop”Configuration Files
Section titled “Configuration Files”macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.jsonBasic Configuration (No Auth)
Section titled “Basic Configuration (No Auth)”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "note": "S3 Documentation RAG Server" } }}With Authentication
Section titled “With Authentication”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "headers": { "Authorization": "Bearer your-secret-key" }, "note": "S3 Documentation RAG Server with auth" } }}Restart Claude Desktop
Section titled “Restart Claude Desktop”After editing the configuration:
- Save the file
- Quit Claude Desktop completely
- Restart the application
- Verify the MCP server appears in the available tools
Claude Code (CLI)
Section titled “Claude Code (CLI)”Add via Command Line
Section titled “Add via Command Line”The fastest way to add the MCP server to Claude Code:
claude mcp add doc --transport http http://127.0.0.1:3000/mcpWith Authentication
Section titled “With Authentication”claude mcp add doc --transport http http://127.0.0.1:3000/mcp \ --header "Authorization: Bearer your-secret-key"Verify
Section titled “Verify”After adding, verify the server is connected:
claude mcp listYou should see doc listed with 3 tools available.
Remove
Section titled “Remove”To remove the MCP server from Claude Code:
claude mcp remove docDocker Configuration
Section titled “Docker Configuration”If running the MCP server in Docker, use the appropriate host:
Docker on macOS/Windows
Section titled “Docker on macOS/Windows”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://host.docker.internal:3000/mcp" } }}Docker on Linux
Section titled “Docker on Linux”{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://172.17.0.1:3000/mcp" } }}Or use the host’s IP address directly.
Remote Server
Section titled “Remote Server”If your MCP server is running on a remote host:
{ "mcpServers": { "doc": { "type": "streamable-http", "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer your-secret-key" }, "note": "Remote S3 Documentation Server" } }}Custom Port
Section titled “Custom Port”If your server runs on a different port:
# In .envPORT=8080{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:8080/mcp" } }}Verification
Section titled “Verification”Check Connection
Section titled “Check Connection”After configuring and restarting your client:
In Cursor:
- Open the MCP panel (View → MCP)
- Verify “doc” server appears
- Check for 3 tools:
search_documentation,refresh_index,get_full_document - Check for available resources
In Claude Desktop:
- Start a new conversation
- Type ”/” to see available tools
- Verify “doc” tools appear
- Test with a simple query: “What documentation is available?”
Test Query
Section titled “Test Query”Try a test search:
Search the documentation for "installation"Expected behavior:
- Client calls the
search_documentationtool - Returns relevant results from your documentation
- Shows source files and similarity scores
Troubleshooting
Section titled “Troubleshooting”Server Not Appearing
Section titled “Server Not Appearing”Symptoms: MCP server doesn’t show up in the client
Solutions:
- Verify JSON syntax is valid (no trailing commas, proper quotes)
- Check file path is correct
- Ensure proper file permissions (readable)
- Restart the client completely (quit and relaunch)
Connection Refused
Section titled “Connection Refused”Symptoms: “Connection refused” or “Cannot connect” errors
Solutions:
- Verify server is running:
curl http://localhost:3000/health - Check correct host and port in URL
- For Docker: Use
host.docker.internal(macOS/Windows) or172.17.0.1(Linux) - Check firewall settings
Authentication Errors
Section titled “Authentication Errors”Symptoms: “Unauthorized” or “Invalid API key” errors
Solutions:
- Verify
Authorizationheader is correctly formatted - Check API key matches the one in
.env - Ensure no extra spaces or line breaks in the key
- Restart both server and client after changes
Tools Not Working
Section titled “Tools Not Working”Symptoms: Tools appear but don’t return results
Solutions:
- Check server logs for errors
- Verify S3 credentials are correct
- Ensure documents are indexed: run
refresh_index - Check network connectivity to S3
Resources Not Appearing
Section titled “Resources Not Appearing”Symptoms: No resources listed in the client
Solutions:
- Verify files are indexed (check server logs)
- Run
refresh_indexto synchronize - Check S3 bucket contains
.mdfiles - Ensure correct bucket name in
.env
Configuration Examples
Section titled “Configuration Examples”Development Setup
Section titled “Development Setup”{ "mcpServers": { "local-docs": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "note": "Local development documentation" } }}Production Setup
Section titled “Production Setup”{ "mcpServers": { "prod-docs": { "type": "streamable-http", "url": "https://mcp.company.com/mcp", "headers": { "Authorization": "Bearer prod-api-key-here" }, "note": "Production documentation server" } }}Multi-Environment Setup
Section titled “Multi-Environment Setup”{ "mcpServers": { "dev-docs": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "note": "Development documentation" }, "staging-docs": { "type": "streamable-http", "url": "https://mcp-staging.company.com/mcp", "headers": { "Authorization": "Bearer staging-key" }, "note": "Staging documentation" }, "prod-docs": { "type": "streamable-http", "url": "https://mcp.company.com/mcp", "headers": { "Authorization": "Bearer prod-key" }, "note": "Production documentation" } }}Advanced Configuration
Section titled “Advanced Configuration”Custom Timeouts
Section titled “Custom Timeouts”Some clients support timeout configuration:
{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "timeout": 30000, "note": "30 second timeout" } }}Proxy Configuration
Section titled “Proxy Configuration”If behind a corporate proxy:
{ "mcpServers": { "doc": { "type": "streamable-http", "url": "http://127.0.0.1:3000/mcp", "proxy": "http://proxy.company.com:8080" } }}Best Practices
Section titled “Best Practices”Naming
Section titled “Naming”Use descriptive names for multiple servers:
{ "mcpServers": { "product-docs": { ... }, "api-docs": { ... }, "internal-wiki": { ... } }}Always add a note field to document the purpose:
{ "note": "S3 Documentation RAG Server - Product Documentation"}Security
Section titled “Security”- ✅ Use
Authorizationheader for authentication (not query parameters) - ✅ Enable authentication for remote servers
- ✅ Use different API keys per environment
- ❌ Never commit API keys to version control