Overview
By default, MCP servers use STDIO transport for local communication. HTTP mode enables:- Remote server connections over network
- Web-based MCP clients
- Multiple concurrent client connections
- Easier debugging with HTTP tools
- Container deployments with exposed ports
Configuration
Environment Variables
Configure HTTP transport using environment variables:| Variable | Description | Default | Required |
|---|---|---|---|
ORACLE_MCP_HOST | Host address to bind to | "" (disabled) | Yes |
ORACLE_MCP_PORT | Port number to listen on | "" (disabled) | Yes |
FASTMCP_LOG_LEVEL | Logging verbosity | ERROR | No |
When
ORACLE_MCP_HOST and ORACLE_MCP_PORT are set, the server automatically switches from STDIO to HTTP streaming transport.Local HTTP Server
Start Server
Run an MCP server in HTTP mode locally:Verify Server
Test that the server is running:Client Configuration
Configure your MCP client to connect via HTTP:Container HTTP Server
Run an MCP server in a container with HTTP transport:Using Podman
Using Docker
Key differences for containers:
- Use
ORACLE_MCP_HOST=0.0.0.0(not127.0.0.1) to accept external connections - Map container port with
-p 8888:8888 - Mount OCI credentials with
-vfor OCI servers
Client Configuration (Container)
Clients connect the same way as local servers:Remote Servers
Network Configuration
To expose an MCP server to remote clients:Remote Client Configuration
Port Selection
Common Ports
- 8888: Default in examples
- 3000: Alternative common choice
- 5000-5999: Suitable range for local services
Checking Port Availability
Changing Ports
If port 8888 is already in use:Logging and Debugging
Enable Verbose Logging
Log Levels
DEBUG: Detailed diagnostic informationINFO: General informational messagesWARNING: Warning messagesERROR: Error messages only (default)
Testing HTTP Endpoints
Debug HTTP connections with curl:Comparison: STDIO vs HTTP
| Feature | STDIO | HTTP |
|---|---|---|
| Connection | Local only | Local or remote |
| Clients | Single | Multiple concurrent |
| Setup | Simple | Requires port configuration |
| Debugging | Limited | HTTP tools available |
| Security | Process isolation | Network exposure risk |
| Performance | Lower latency | Network overhead |
| Use case | IDE integrations | Web apps, remote access |
Troubleshooting
Server Won’t Start
Port already in use:Client Can’t Connect
Connection refused:- Verify server is running:
curl http://127.0.0.1:8888/mcp - Check firewall settings
- Ensure correct host/port in client config
- For containers, verify port mapping:
podman ps
Container Connection Issues
Can’t reach container from host:- Use
ORACLE_MCP_HOST=0.0.0.0(not127.0.0.1) - Verify port mapping:
-p 8888:8888 - Check container status:
podman ps - Test from inside container:
podman exec <container-id> curl http://localhost:8888/mcp
Next Steps
Podman Deployment
Run servers in containers with Podman
Local Development
Set up local development environment
Client Configuration
Configure different MCP clients
Authentication
Set up OCI authentication
