Model Context Protocol documentation
LLM
MCP
MCPs are fairly simple, providing a bridge between the chat client and other applications. I’m not sure what my own use case would be for them as my use cases don’t actually involve the chat client.
https://modelcontextprotocol.io/
Personal takeaways
- MCP Servers are fairly simple lightweight programs that form an interface between an LLM and an application.
- Once the client has created a connection, the server can send data when it wants (i.e. you could get the server to send alerts).
- I set up the example Filesystem MCP Server following the instructions here, and asked Claude to save a file to my desktop, which it did. Fairly easy (although the setup involves editing a config file which won’t be easy for many non-techies).
- Whilst it is interesting and I can see the appeal, I’m not sure what my use case would be for this. I think most of my scripts are better served with just using APIs to communicate directly with a model. It seems this is really about the interface between the chat client part of an LLM and other applications. A lot of my use cases don’t actually involve the chat client.
- MCPs are the interface between LLMs and applications.
- “Think of MCP like a USB-C port for AI applications.”
- MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol
- Each server can present a list of tools, resources and prompts to the model. The model can then make further calls to the server to request information or execute one of those tools.
There is an example SQLite MCP Serveron GitHub:
Message types
MCP has these main types of messages:
Requests expect a response from the other side:
interface Request { : string; method?: { ... }; params }
Results are successful responses to requests:
interface Result { : string]: unknown; [key }
Errors indicate that a request failed:
interface Error { : number; code: string; message?: unknown; data }
Notifications are one-way messages that don’t expect a response:
interface Notification { : string; method?: { ... }; params }