← Table of Contents · Page 168 of 868

THE MODEL CONTEXT PROTOCOL (MCP) AND TOOL STANDARDS

Part 5 of 11

CONNECTING EXTERNAL DATA SOURCES, SYSTEMS, AND SERVICES To connect a system, you usually take one of three paths. Reuse an existing server. For popular systems such as code hosting sites, file storage, messaging tools, and databases, community or company-maintained servers often already exist. Reusing saves time, but you must evaluate it carefully, because you are running someone else's code that will have access to your data. Part Nine, Chapter 39, covers this supply-chain risk. Build a new server. If you have an internal system, such as a company ticketing tool, you can write a small server with an SDK that wraps the system's API. An API is a menu of requests that one piece of software offers so that other software can use it. Wrap an existing tool with an adapter, when you have a command-line program or a library that you want exposed in standard form. Choosing the transport follows a few simple rules. Use stdio when the server runs on the same machine, when you want the least setup, and when the connection involves only one user. Use a network transport when the server is shared by many users, when it must run in a managed environment close to the data, or when the data lives behind a company firewall. Network servers need authentication, meaning proof of who is calling, and authorization, meaning rules about what each caller may do.
Advertisement
Read Aloud:
0:00 / 0:00