When you connect an MCP server to Claude Code, Cursor or your own agent, what does the server get? A place in your model's context and the keys you give it. If it runs on your machine, it can also do whatever your user account can.
In this article, I will show how to find out what each MCP server gets and how to take away anything it doesn't need.
What one MCP server gets, and how each part goes wrong.
What reaches your model?
Every tool's name and description, and every result a tool sends back. As the MCP spec's security guide says, "Tool names and descriptions are instructions your model reads."
This script prints each tool's name and description. I tested it with MCP Python SDK 2.3.0:
"""Usage: python mcp_tools.py <server command> [args...]
It starts the server, so run it where you would run the server."""
import asyncio, sys
from mcp import Client, StdioServerParameters # MCP Python SDK 2.x
async def main(cmd, args):
cursor = None
async with Cli
Discussion
Begin the discussion
Begin something meaningful by sharing your ideas.