ask-llm-mcp
Provides tools to make raw text-in/text-out LLM calls using the Codeium (Windsurf) API, with model selection and multi-turn session support.
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., "@ask-llm-mcpSummarize the contents of README.md in three bullet points."
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.
ask-llm-mcp
Give your coding agent a cheap LLM to delegate to.
ask-llm-mcp is a minimal MCP server that
exposes raw text-in / text-out LLM calls. No agent runtime, no tools, no
context injection — you send a prompt, you get text back.
The point: your main agent (Claude / Codex / CodeBuddy / …) is running on an
expensive model. Summarising a file, classifying an issue, drafting a commit
message, extracting a JSON blob — none of that needs the expensive model.
Hand those subtasks to ask_llm and keep the good model for real reasoning.
Unofficial project. This speaks an undocumented, reverse-engineered API used by the Devin / Windsurf client. It is not affiliated with, endorsed by, or supported by Cognition, Windsurf or Codeium. It requires your own Devin subscription and uses your own credentials. The protocol can change or stop working at any time. Use at your own risk and make sure your usage complies with the terms of service of the service you subscribe to.
Contents
English | 中文文档 | Install guide
Related MCP server: geminicli-mcp
Why
Running devin -p "<prompt>" spawns a full agent runner: it loads a system
prompt, registers tools, and can burn minutes deciding it doesn't want to
answer a one-line question. That's the wrong shape for "classify this log line".
ask-llm-mcp calls the backend GetChatMessage endpoint directly over
Connect-RPC. One HTTP request, one text response. That's it.
The second half of the design is keeping the answer out of your context
window. ask_llm does not return the LLM's text inline — it returns a path.
Your agent reads the file only if it actually needs the content, and can ignore
it, grep it, or pass it along without paying for the tokens twice.
Features
Three tools:
ask_llm,list_models,list_sessions.Model choice with pricing — pick a cheap model per call, or discover options at runtime.
Multi-turn conversations via
session_id.File-based results —
result_file(answer) +log_file(timing, errors, prompt preview) under a configurable data directory.No MCP SDK dependency — hand-rolled JSON-RPC over stdio; the only runtime dependency is
requests.Two stdio transports — newline-delimited JSON and
Content-Lengthframing, auto-detected per message.Offline test suite — protobuf/framing round-trip tests, no credentials needed.
Requirements
Requirement | Notes |
Python | 3.11 or newer (uses |
| Installed automatically by pip / the install script |
| Must be installed and logged in — the server reads its credentials |
A Devin subscription | The API is called with your account |
The server reads your API key from
~/.local/share/devin/credentials.toml (written by devin auth login /
devin login). No key is ever passed through MCP arguments or env vars.
list_models and list_sessions additionally shell out to the devin CLI
(devin models list --format json, devin list --format json). ask_llm
does not.
Quick start
# 1. get the code
git clone https://github.com/agentming/ask-llm-mcp.git
cd ask-llm-mcp
# 2. install (creates an isolated venv + console script)
./install.sh
# 3. sanity check — should print the three tool definitions
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | ask-llm-mcp
# 4. sanity check with real credentials
python3 devin_api.py "Say hello in one sentence."./install.sh --help shows the options (--dev, --uninstall,
--prefix DIR).
Alternative installs
# pipx — no venv management for you
pipx install git+https://github.com/agentming/ask-llm-mcp.git
# plain pip
pip install git+https://github.com/agentming/ask-llm-mcp.git
# run straight from the checkout, no install at all
python3 /path/to/ask-llm-mcp/server.pyThen register it with your MCP client — see below.
Client configuration
Claude Code / Codex CLI
claude mcp add ask-llm -- /absolute/path/to/ask-llm-mcp
# or, without installing:
claude mcp add ask-llm -- python3 /absolute/path/to/ask-llm-mcp/server.pyClaude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"ask-llm": {
"command": "/absolute/path/to/ask-llm-mcp",
"env": {
"DEVIN_MODEL": "swe-1-7"
}
}
}
}CodeBuddy Code / other JSON-config clients
.codebuddy/mcp.json or ~/.codebuddy/mcp.json:
{
"mcpServers": {
"ask-llm": {
"command": "python3",
"args": ["/absolute/path/to/ask-llm-mcp/server.py"]
}
}
}More copy-pasteable variants live in examples/.
Use absolute paths. MCP clients launch the server with an arbitrary working directory.
Tools
ask_llm
Raw text-in / text-out LLM call.
Argument | Type | Default | Description |
| string | required | The prompt text to send. |
| string |
| Model uid or alias. Ignored when resuming a session. Use |
| string | — | Resume a multi-turn conversation. Omit to start a new one. |
| string |
| Optional override. |
Returns structured data, not the answer text:
{
"status": "ok",
"session_id": "0f9c...",
"result_file": "/home/you/.local/share/ask-llm/results/20260908_113000_ab12cd34.txt",
"log_file": "/home/you/.local/share/ask-llm/logs/20260908_113000_ab12cd34.json",
"error": null,
"call_id": "20260908_113000_ab12cd34"
}Read result_file for the answer. If the model emitted reasoning, it is
prepended and separated by a --- divider. On failure status is "error",
error carries the message, and result_file contains [ERROR] ….
Multi-turn example — just feed the returned session_id back in:
turn 1: ask_llm(prompt="My function returns None. Here it is: ...")
-> session_id = "0f9c..."
turn 2: ask_llm(prompt="Now show the fix.", session_id="0f9c...")list_models
Lists model families with per-1M-token pricing, context window and cost tier.
Argument | Type | Description |
| string | Case-insensitive filter against family name, uid, label or cost tier (e.g. |
## SWE (aliases: swe)
swe-1-7 — SWE-1.7 [200K ctx, cheap, $0.25/$0.03/$1.00]list_sessions
Lists recent Devin sessions so you can recover a session_id.
Argument | Type | Default | Description |
| integer |
| Max sessions to return. |
| string |
| Filter by working directory; |
Configuration
All configuration is via environment variables (set them in your MCP client's
env block).
Variable | Default | Description |
|
| Default model when |
|
| Seconds to wait for the API response. |
|
| Where |
Result files are never deleted automatically — clear
$ASK_LLM_DATA_DIR/results yourself if it grows.
How it works
MCP client ──stdin (JSON-RPC)──► server.py ──► devin_api.py ──HTTPS──► server.codeium.com
│ (Connect-RPC)
└──► $ASK_LLM_DATA_DIR/{results,logs}/devin_api.pyhand-rolls the protobuf request (GetChatMessageRequest) and wraps it in a single uncompressed Connect-RPC frame. Responses are streamed back as gzipped frames whosedelta_text/delta_thinkingfields are concatenated into the final answer.server.pyimplements just enough of the MCP protocol to advertise and serve the three tools:initialize,tools/list,tools/call. It accepts both newline-delimited JSON andContent-Lengthframing on stdin.
Because the request field numbers were calibrated against live traffic rather than a published schema, they are the most likely thing to break upstream. If calls start failing with an HTTP error, look there first.
Troubleshooting
Symptom | Cause / fix |
|
|
| Same file, missing key — re-login. |
| Expired or revoked key. Re-login with the |
| The request payload was rejected — most often an unsupported |
Empty result file | The model returned no text. Check |
|
|
Tools never appear in the client | Verify the absolute path to |
Server hangs | Raise |
Logs for every call live in $ASK_LLM_DATA_DIR/logs/*.json and include the
timestamp, model, elapsed seconds, prompt length/preview and the error.
Project layout
server.py MCP JSON-RPC server + the three tool implementations
devin_api.py Connect-RPC / protobuf client for the backend (no MCP knowledge)
tests/ Offline tests for the wire helpers
examples/ MCP client config snippets
install.sh Isolated-venv installerContributing
See CONTRIBUTING.md. The short version: keep changes small, never add tests that hit the real API, never commit credentials.
License
MIT © agentming
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server that exposes any LynxPrompt instance to LLMs, enabling browsing, searching, and managing AI configuration blueprints and prompt hierarchies.6692GPL 3.0
- AlicenseAqualityBmaintenanceA stateless MCP server that wraps the headless Gemini CLI, providing tools to send prompts to Google's Gemini models and receive text responses. It supports both simple prompts and prompts with contextual information.2MIT
- FlicenseCqualityDmaintenanceEnables MCP clients to interact with local LLMs via LM Studio, supporting dynamic chat, vision, RAG, file interaction, and model orchestration.28-
- FlicenseNot gradedqualityCmaintenanceEnables developers to explain error messages, validate and format JSON, generate regex patterns from descriptions, and summarize text via an LLM, all through MCP-connected clients.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/AgentMing/ask-llm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server