MCP Servers
- What is an MCP server?
An MCP server is a program that exposes tools, data, or services to AI models using the Model Context Protocol (MCP), an open standard created by Anthropic. It acts as a bridge between an LLM and external systems. - How does an MCP server work?
An MCP server runs as a separate process, communicates with an MCP host over a transport like stdio or HTTP, and exposes tools, resources, and prompts. The host's LLM decides when to call them, and the server executes the request and returns results. - Why use MCP instead of direct API calls?
MCP provides a standardized, reusable interface that works across multiple AI hosts, reducing custom integration code. Direct API calls are simpler for one-off use cases but don't scale across models or applications. - Can I build my own MCP server?
Yes, you can build your own MCP server using official SDKs in Python, TypeScript, or other languages. The protocol is open and designed to be implementable by individual developers. - Is MCP server secure?
MCP servers can be secure, but it depends on implementation. They introduce risks like prompt injection and unauthorized access, so you must follow security best practices. - How do I connect an AI assistant to an MCP server?
You connect an AI assistant to an MCP server by configuring the assistant to use the MCP client, which communicates with the server via a defined protocol (often over stdio or HTTP). - How to call mcp server with curl?
Only servers that use the HTTP transport can be called with curl. Send a JSON-RPC initialize request with POST, save the session ID from the response, then send tools/list or tools/call requests with that session ID. - How do I list MCP servers?
You can list MCP servers by checking your client's configuration, such as a settings page or an MCP panel. Some command line clients also offer a list command that shows configured servers. - How are MCP servers hosted?
MCP servers are hosted in two main ways. Local servers run on your own computer as a process, while remote servers run on a web server and accept requests over HTTP. - What are MCP servers for Codex?
MCP servers for Codex are set up in Codex's configuration, where you add each server with its launch command or URL. Once connected, Codex can list and use the server's tools during a task. - Can I call an MCP server directly?
You can call an MCP server directly if you send it the right protocol messages, usually through an HTTP request or a stdio process. Most people use a client because it handles the handshake for them. - How do I call an MCP server locally?
Start the server process on your own machine, then point your client at it through the transport the server uses. Local setups usually run over standard input and output or a local HTTP port.