lmstudio-agent-mcp
Allows web search via DuckDuckGo (no API key required), returning titles, URLs, and snippets.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lmstudio-agent-mcpsearch for Python web scraping tutorials"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent MCP Server for LM Studio
A lightweight MCP (Model Context Protocol) server that provides local agent capabilities for LM Studio: file I/O, terminal execution, and web search.
Features
Tool | Description |
| Read text files with offset/limit pagination and encoding support |
| Write or append to files, with optional parent directory creation |
| Execute shell commands with pipes, redirections, custom working directory, environment variables, and configurable timeout |
| Search the web via DuckDuckGo (no API key required), returning titles, URLs, and snippets |
Related MCP server: Coding Agent MCP Server
Requirements
Python 3.10+
Dependencies listed in
requirements.txt
Installation
cd lmstudio_agent_mcp
pip install -r requirements.txtUsage with LM Studio
Add the following to your LM Studio MCP server configuration:
{
"mcpServers": {
"agent_mcp": {
"command": "python3",
"args": ["/absolute/path/to/lmstudio_agent_mcp/server.py"]
}
}
}If you are using a virtual environment, replace python3 with the absolute path to your venv's Python binary (e.g. /path/to/venv/bin/python).
Usage with Other MCP Clients
The server uses stdio transport by default. Start it directly:
python3 server.pyFor remote access, you can switch to streamable HTTP:
# Add to the bottom of server.py
if __name__ == "__main__":
mcp.run(transport="streamable_http", port=8000)Tool Reference
agent_read_file
Read the contents of a text file.
Parameter | Type | Default | Description |
| string | (required) | Absolute or relative path to the file |
| int |
| Number of lines to skip from the beginning |
| int | null |
| Maximum number of lines to return ( |
| string |
| Text encoding |
agent_write_file
Write text content to a file.
Parameter | Type | Default | Description |
| string | (required) | Absolute or relative path to the file |
| string | (required) | Text content to write |
| string |
| Text encoding |
| bool |
| If |
| bool |
| If |
agent_execute_command
Execute a terminal command.
Parameter | Type | Default | Description |
| string | (required) | Shell command to execute |
| string | null |
| Working directory (defaults to server cwd) |
| float |
| Maximum execution time in seconds (1-600) |
| object | null |
| Additional environment variables to set |
| bool |
| Execute through system shell (required for pipes/redirects) |
agent_web_search
Search the web via DuckDuckGo.
Parameter | Type | Default | Description |
| string | (required) | Search query (1-500 chars) |
| int |
| Maximum results to return (1-20) |
| string | null |
| DuckDuckGo region code (e.g. |
Security Notes
File paths are resolved to absolute paths;
~expansion is supportedLarge files (>10 MiB) are rejected to prevent memory exhaustion
Command execution has a configurable timeout (max 600s)
Do not expose this server to untrusted clients —
agent_execute_commandcan run arbitrary shell commands
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oemoem12/lmstudio-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server