MCP Server with Docker
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server with Dockercheck if the Docker container is running and show me the logs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server with Docker
This project demonstrates how to integrate the Model Control Protocol (MCP) with OpenAI's API, enabling OpenAI to access and use tools exposed by an MCP server running in Docker.
Prerequisites
Docker installed on your system
Git (to clone the repository)
Related MCP server: OpenAI MCP Server
Project Structure
server.py: The MCP server implementation with a toolclient.py: A client that connects to the server and calls the agentDockerfile: Instructions for building the Docker imagerequirements.txt: Python dependencies for the project
Data Flow Explanation
User Query: The user sends a query to the system (e.g., "What is our company's vacation policy?")
OpenAI API: OpenAI receives the query and available tools from the MCP server
Tool Selection: OpenAI decides which tools to use based on the query
MCP Client: The client receives OpenAI's tool call request and forwards it to the MCP server
MCP Server: The server executes the requested tool (e.g., retrieving knowledge base data)
Response Flow: The tool result flows back through the MCP client to OpenAI
Final Response: OpenAI generates a final response incorporating the tool data
Running with Docker
Step 1: Build the Docker image
docker build -t mcp-server .Step 2: Run the Docker container
docker run -p 8050:8050 mcp-serverThis will start the MCP server inside a Docker container and expose it on port 8050.
Running the Client
Once the server is running, you can run the client in a separate terminal:
python client.pyThe client will connect to the server, list available tools, and call the agent to answer the query.
Troubleshooting
If you encounter connection issues:
Check if the server is running: Make sure the Docker container is running with
docker ps.Verify port mapping: Ensure the port is correctly mapped with
docker psor by checking the output of thedocker runcommand.Check server logs: View the server logs with
docker logs <container_id>to see if there are any errors.Host binding: The server is configured to bind to
0.0.0.0instead of127.0.0.1to make it accessible from outside the container. If you're still having issues, you might need to check your firewall settings.Network issues: If you're running Docker on a remote machine, make sure the port is accessible from your client machine.
Notes
The server is configured to use SSE (Server-Sent Events) transport and listens on port 8050.
The client connects to the server at
http://localhost:8050/sse.Make sure the server is running before starting the client.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA simple MCP server for interacting with OpenAI assistants. This server allows other tools (like Claude Desktop) to create and interact with OpenAI assistants through the Model Context Protocol.Last updated939MIT
- Flicense-qualityDmaintenanceA Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.Last updated35
- Alicense-qualityDmaintenanceA server that integrates the MCP library with OpenAI's API, allowing users to interact with various tools, such as the weather tool, through natural language queries.Last updatedMIT
- Flicense-qualityDmaintenanceAn auto-generated MCP server that enables interaction with the OpenAI API, allowing users to access OpenAI's models and capabilities through the Multi-Agent Conversation Protocol.Last updated
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that integrates with Discord to provide AI-powered features.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TomasRodriguez2002/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server