You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The Anthropic API, llama.cpp-server, and ollama currently do not support sampling multiple responses from a model, which limits the available approaches to the following:
220
220
> `cot_reflection`, `leap`, `plansearch`, `rstar`, `rto`, `self_consistency`, `re2`, and `z3`. For models on HuggingFace, you can use the built-in local inference server as it supports multiple responses.
221
221
222
+
### MCP Plugin
223
+
224
+
The Model Context Protocol (MCP) plugin enables OptiLLM to connect with MCP servers, bringing external tools, resources, and prompts into the context of language models. This allows for powerful integrations with filesystem access, database queries, API connections, and more.
225
+
226
+
#### What is MCP?
227
+
228
+
The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) is an open protocol standard that allows LLMs to securely access tools and data sources through a standardized interface. MCP servers can provide:
Once configured, the MCP plugin will automatically:
300
+
301
+
1. Connect to all configured MCP servers
302
+
2. Discover available tools, resources, and prompts
303
+
3. Make these capabilities available to the language model
304
+
4. Handle tool calls and resource requests
305
+
306
+
The plugin enhances the system prompt with MCP capabilities so the model knows which tools are available. When the model decides to use a tool, the plugin:
307
+
308
+
1. Executes the tool with the provided arguments
309
+
2. Returns the results to the model
310
+
3. Allows the model to incorporate the results into its response
311
+
312
+
#### Example Queries
313
+
314
+
Here are some examples of queries that will engage MCP tools:
315
+
316
+
- "List all the Python files in my documents directory" (Filesystem)
317
+
- "What are the recent commits in my Git repository?" (Git)
318
+
- "Search for the latest information about renewable energy" (Search)
319
+
- "Query my database for all users who registered this month" (Database)
320
+
321
+
#### Troubleshooting
322
+
323
+
##### Logs
324
+
325
+
The MCP plugin logs detailed information to:
326
+
```
327
+
~/.optillm/logs/mcp_plugin.log
328
+
```
329
+
330
+
Check this log file for connection issues, tool execution errors, and other diagnostic information.
331
+
332
+
##### Common Issues
333
+
334
+
1.**Command not found**: Make sure the server executable is available in your PATH, or use an absolute path in the configuration.
335
+
336
+
2.**Connection failed**: Verify the server is properly configured and any required API keys are provided.
337
+
338
+
3.**Method not found**: Some servers don't implement all MCP capabilities (tools, resources, prompts). Verify which capabilities the server supports.
339
+
340
+
4.**Access denied**: For filesystem operations, ensure the paths specified in the configuration are accessible to the process.
0 commit comments