Skip to main content

HTTP MCP Transport for Nchan

Project description

HTTP MCP Transport for Nchan - Python SDK

This is an HTTP-based MCP (Machine Conversation Protocol) transport library designed for integration with Nchan.

Installation

pip install httmcp

Usage

from httmcp import HTTMCP

# Create MCP server
mcp_server = HTTMCP(
    name="my-mcp",
    instructions="This is an MCP server",
    publish_server="http://localhost:8080"
)

# Add MCP server to FastAPI application
app = FastAPI()
app.include_router(mcp_server.router)

OpenAPI Support

HTTMCP also supports creating MCP servers from OpenAPI specifications:

from httmcp import OpenAPIMCP

# Create MCP server from OpenAPI specification
mcp_server = await OpenAPIMCP.from_openapi(
    definition="openapi.json",
    name="my-openapi-mcp",
    publish_server="http://localhost:8080"
)

# Add MCP server to FastAPI application
app = FastAPI()
app.include_router(mcp_server.router)

One-Click GPTs Actions to MCP Deployment

HTTMCP provides a powerful CLI for instant deployment of GPTs Actions to MCP servers:

# Installation
pip install httmcp[cli]

# One-click deployment from GPTs Actions OpenAPI spec
python -m httmcp -f gpt_actions_openapi.yml -p http://nchan:80

# Complete deployment with custom configuration
python -m httmcp \
  --openapi-file gpt_actions_openapi.yml \
  --name "my-gpts-service" \
  --publish-server http://nchan:80 \
  --host 0.0.0.0 \
  --port 8080

CLI options:

  • -f, --openapi-file: OpenAPI specification file path or URL (required)
  • -p, --publish-server: Nchan publish server URL for MCP transport (required)
  • -n, --name: Custom name for your MCP server (default: derived from OpenAPI)
  • -H, --host: Host address to bind the server (default: 0.0.0.0)
  • -P, --port: Local port number for accessing your deployed MCP service (default: 8000)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

httmcp-0.3.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httmcp-0.3.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file httmcp-0.3.1.tar.gz.

File metadata

  • Download URL: httmcp-0.3.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for httmcp-0.3.1.tar.gz
Algorithm Hash digest
SHA256 4bc0973f758ec841fe92aff36482eb7869f716b8dc615ec798d8fed8171ba8fc
MD5 ea4337bf882a338cdfb5c20296278e30
BLAKE2b-256 3dd047ad25738e88db5345a31da366c728bf3d270096599113aba08c2ec5bbf4

See more details on using hashes here.

File details

Details for the file httmcp-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: httmcp-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for httmcp-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d1ed06d6c56a609846019d6e5e7f091b12ac1ee89ef5c4e2c0379598c23f294
MD5 bac9a3529296a022fd1fd7d743ec827e
BLAKE2b-256 8e3c26b09a9806f593bc7a8e5d296f2610f32aac827a793a4ee6d6eb55776601

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page