What is an MCP server?
An MCP server is a program that makes tools and data available to AI assistants and agents through the Model Context Protocol (MCP). An agent asks the server what it offers, then calls a tool by name: “find the open tickets for this customer” or “update this deal stage”. The server runs the action in the system behind it and returns the result.
An MCP client is the other half: Claude, Copilot Studio, an agent framework or your own code. One client can use many servers, and one server can serve many clients.
What a server exposes
- Tools: actions the agent can take, such as creating a record or sending a message.
- Resources: data the agent can read, such as a document or a table.
- Prompts: reusable instructions the server offers to the client.
How do you build an MCP server?
You write one with an official MCP SDK, such as the TypeScript or Python SDK. Define each tool with a name, a plain description and an input schema, add the code that does the work when the tool is called, and run the server over stdio for a local client or over HTTP for a remote one. Then add the server’s address to the client, such as Claude or Cursor.
The harder part comes after the first server works: hosting it, keeping credentials out of the code, and logging what agents do with it. If your tools are actions in systems you already automate, you can skip the server code. Agent Gateway publishes Tray workflows as MCP tools, so there is no server to host, patch or audit one by one.
Why servers need governing
Most MCP servers answer anyone who has the address and a token, and the token often belongs to whoever set the server up. That means an agent can inherit far more access than its job needs, and a team with servers for Salesforce, Jira and Slack has three sets of credentials, permissions and logs to keep straight. MCP vs API covers why the protocol alone doesn’t solve this, and the MCP security checklist lists the controls a server should have.
MCP servers at Tray
Agent Gateway for MCP publishes governed tools from Tray iPaaS workflows, so the tools an agent sees are scoped to a job and every call is logged in one place, whichever client makes it. A tool can be a single action, or a workflow that does several steps in one call, such as pulling a customer’s records from Salesforce, Zendesk and Stripe together. The MCP gateway term explains the two ways gateways work, and Governance covers access and audit across them.