adding-and-configuring-servers.mdx 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. ---
  2. title: "Adding & Configuring Servers"
  3. sidebarTitle: "Adding & Configuring"
  4. description: "Find MCP servers, add them to Cline, and configure settings."
  5. ---
  6. This guide covers finding MCP servers, adding them to Cline, and configuring their settings.
  7. ## Finding MCP Servers
  8. Several places to find MCP servers:
  9. - **[Cline MCP Marketplace](/mcp/mcp-marketplace)**: Browse and install directly from Cline
  10. - **[Official MCP servers](https://github.com/modelcontextprotocol/servers)**: GitHub repository
  11. - **[Awesome-MCP servers](https://github.com/punkpeye/awesome-mcp-servers)**: Community collection
  12. - **Online directories**: [mcpservers.org](https://mcpservers.org/), [mcp.so](https://mcp.so/), [glama.ai/mcp/servers](https://glama.ai/mcp/servers)
  13. ## Adding Servers with Cline
  14. The easiest way to add an MCP server is to have Cline build it for you:
  15. 1. Provide Cline with the GitHub repository URL
  16. 2. Optionally include the README contents for context
  17. 3. Cline clones the repo, builds it, and adds the configuration
  18. Example conversation:
  19. ```text
  20. User: "Add the MCP server from https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search"
  21. Cline: "Cloning the repository. It needs to be built. Should I run 'npm run build'?"
  22. User: "Yes"
  23. Cline: "Build complete. This server needs an API key. Where should I find it?"
  24. ```
  25. ## Managing Servers
  26. Access server settings through the MCP Servers icon in Cline's top navigation bar.
  27. ### Enable/Disable
  28. Toggle the switch next to any server to enable or disable it.
  29. ### Restart
  30. Click "Restart Server" if a server becomes unresponsive.
  31. ### Delete
  32. Click the trash icon or "Delete Server" button. No confirmation dialog.
  33. ### Network Timeout
  34. Set how long to wait for responses (30 seconds to 1 hour, default 1 minute).
  35. ## Editing Configuration Files
  36. Settings are stored in `cline_mcp_settings.json`:
  37. 1. Click MCP Servers icon
  38. 2. Select "Configure" tab
  39. 3. Click "Configure MCP Servers"
  40. ### STDIO Transport (Local Servers)
  41. ```json
  42. {
  43. "mcpServers": {
  44. "local-server": {
  45. "command": "node",
  46. "args": ["/path/to/server.js"],
  47. "env": {
  48. "API_KEY": "your_api_key"
  49. },
  50. "alwaysAllow": ["tool1", "tool2"],
  51. "disabled": false
  52. }
  53. }
  54. }
  55. ```
  56. ### SSE Transport (Remote Servers)
  57. ```json
  58. {
  59. "mcpServers": {
  60. "remote-server": {
  61. "url": "https://your-server-url.com/mcp",
  62. "headers": {
  63. "Authorization": "Bearer your-token"
  64. },
  65. "alwaysAllow": ["tool3"],
  66. "disabled": false
  67. }
  68. }
  69. }
  70. ```
  71. ## Global MCP Mode
  72. Control how MCP servers affect token usage:
  73. 1. Click MCP Servers icon
  74. 2. Select "Configure" tab
  75. 3. Click "Advanced MCP Settings"
  76. 4. Find `Cline>Mcp:Mode` and select your preference
  77. <Frame>
  78. <img
  79. src="https://storage.googleapis.com/cline_public_images/docs/assets/MCP-settings-edit%20(1).png"
  80. alt="MCP settings"
  81. />
  82. </Frame>
  83. ## Using MCP Tools
  84. After configuring a server, Cline automatically detects available tools:
  85. 1. Type your request in chat
  86. 2. Cline identifies when an MCP tool can help
  87. 3. Approve the tool use (or use [auto-approval](/features/auto-approve))
  88. ## Troubleshooting
  89. | Issue | Solution |
  90. |-------|----------|
  91. | Server not responding | Check if process is running, verify network connectivity |
  92. | Permission errors | Ensure API keys and credentials are configured |
  93. | Tool not available | Confirm server implements the tool and it's not disabled |
  94. | Slow performance | Increase network timeout for the server |
  95. ## Related
  96. - [What is MCP?](/mcp/mcp-overview)
  97. - [MCP Marketplace](/mcp/mcp-marketplace)
  98. - [Building Your Own MCP Server](/mcp/mcp-server-development-protocol)