Looking for richer real-world use cases & patterns for MCP resources #600
Replies: 2 comments
|
Just have a look to MCP-UI and OpenAI sdk, resources are used to convert html to render with a tool |
|
You are asking the right question — resources are the most underutilized part of MCP, and most examples stop at "hello world" templates. Here are concrete, non-trivial patterns I have seen work in production MCP servers. The mental modelBefore diving into patterns, let us sharpen the intuition:
A good litmus test: if calling it twice with the same URI returns different data, it should probably be a tool, not a resource. If it is data that simply exists and the LLM benefits from reading it — that is a resource. Pattern 1: Configuration & Context resourcesWhat: Expose runtime configuration, environment details, feature flags as resources. Real example: The GitHub MCP server could expose Why it matters: LLMs hallucinate configuration. A resource grounds them in reality before they act. Tool coordination: A Pattern 2: Schema & Metadata resourcesWhat: Database schemas, API specifications, data dictionaries as resources. Real example: A database MCP server exposing Why it matters: This is the single most impactful pattern. LLM + schema hallucination = broken queries. LLM + schema resource = correct queries. Tool coordination: Pattern 3: Snapshot & State resourcesWhat: System health checks, deployment status, recent error logs as read-only resources. Real example: A Kubernetes MCP server exposing Why it matters: Separating observation (resource) from action (tool) is the cleanest architecture. The LLM observes first, then acts. Resource + Tool coordination:
Pattern 4: Document & Knowledge resourcesWhat: Documentation, knowledge base articles, codebase search results as resources. Real example: The Filesystem MCP server already demonstrates this — files are resources. But extend it: Why it matters: The resource/tool split maps perfectly to the RAG pattern. Resources = retrieval. Tools = generation/action. When NOT to use resourcesCommon mistakes to avoid:
A concrete architecture: the "observe-then-act" loopThe most effective pattern I have seen across MCP implementations: This maps to how a human engineer works: check the dashboard, read the docs, make the change, verify it took effect. Resources are not optional decoration — they are how the LLM builds an accurate mental model before acting. Reference MCP servers worth studying
The gap you are feeling — that resources seem trivial in toy examples — is real because resources only shine in multi-step workflows where the LLM alternates between reading state and performing actions. Build a server that exposes both, and the value becomes obvious. |
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Question Category
Your Question
Hi everyone,
I have a working demo MCP server (using FastMCP) where I expose a greeting resource and a simple add(a, b) tool. In Claude Desktop, asking “2 + 3” triggers the tool call and returns the computed sum. But I feel I’m not fully leveraging the resources side of MCP — it seems too trivial.
What I’m seeking:
Realistic, non-toy use cases where resources (read-only data) play an essential, non-trivial role (beyond greeting or static values).
Patterns or architecture suggestions for combining resources + tools so resources offer real value (e.g. document retrieval, configuration, logs, snapshots).
Code examples or reference MCP projects showing rich resource templates (e.g. doc://{id}, metrics://{service}, user://{id} with deeper context).
Advice / pitfalls: when resources are overused, or when things that should be tools are mistakenly implemented as resources.
My current understanding / constraints:
Resources are read-only, no side-effects.
Resources must be deterministic in the same context.
Tools are used when actions, updates, or logic must run.
Could someone share some sample MCP server code or architectural ideas showing resource + tool coordination in a real workflow (e.g. document QA, internal app agents, config + logs, database snapshots)?
All reactions