can we expose source code implimentation of a mcp tool to client instead to asking LLM to call the tool. #552
Replies: 4 comments
-
|
it would b nice option to enable for every MCP server's related to dev SDKs like stripe etc |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Great question — this touches on a fundamental architectural difference between MCP and the newer Agent Skills protocol. Short answerMCP does not natively expose tool source code to clients, and this is by design. Tools in MCP are intentionally black boxes: the host only sees Why MCP chose black-box toolsMCP tools are API contracts, not code snippets. The design philosophy is:
The workaround you already foundExposing source code as an MCP resource (your A cleaner variant: have the resource dynamically read the tool's source file at runtime using The bigger picture: MCP vs Agent SkillsThis question actually reveals a genuine architectural gap in MCP. There is a newer protocol — Agent Skills (Anthropic, see
For your Stripe use case specifically: an Agent Skill would ship the actual API integration code that the LLM reads, understands, and can adapt into the user's backend. MCP tools, by contrast, expect the LLM to call them as remote procedures. RecommendationIf your goal is "LLM reads the source code and generates a backend endpoint," you have two paths:
Neither is "wrong" — they serve different trust models. MCP assumes the server is the authority; Skills assume the host should have full visibility. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
for example i am using stripe mcp server with vs code.
i ask copilot to create a stripe user.
it calls the tool provided by stripe MCP to create a user and return me stripe_user_id.
but i do not want the LLM to call that tool.
i want my LLM to get the source code of that MCP tool and make an api on backend to to create stripe user.
in this way i have chance to get a perfect standerized implimentation of backend api provided by MCP server.
i know that there is resoarce opthon in MCP.
do we have a way to attach that function in resoarce,
or is there any config flag in tool to expose source code also.
Beta Was this translation helpful? Give feedback.
All reactions