- Resources (files, documents, database records, etc.)
- Tools (actions like querying APIs, updating systems, or running code)
- Prompts (reusable workflows or instructions)
- For users: AI becomes far more capable and personalized — it can access your files, calendars, databases, or business tools in real time and take meaningful actions, rather than just generating text.
- For developers: It dramatically reduces integration complexity. One standard replaces dozens of bespoke connections, speeding up development while improving security and maintainability.
- For the ecosystem: It enables plug-and-play interoperability across different AI models, tools, and platforms.
Command Prompt Command to create Local MCP Server
C:\>npx @modelcontextprotocol/server-filesystem C:\Users\Ee" "Leen\mcp_test
Python script to act as MCP client to call the MCP server
Execute python script command: python mcp_filesystem_test.py
Python Script by ChatGPT
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
server = StdioServerParameters(
command="npx",
args=[
"@modelcontextprotocol/server-filesystem",
r"C:\Users\Ee Leen\mcp_test"
]
)
async with stdio_client(server) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print("Available MCP tools:")
for tool in tools.tools:
print("-", tool.name)
asyncio.run(main())
No comments:
Post a Comment