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.0.tar.gz (6.0 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.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: httmcp-0.3.0.tar.gz
  • Upload date:
  • Size: 6.0 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.0.tar.gz
Algorithm Hash digest
SHA256 7484459cba521145fe8e316ebc8c63a805177b5c8f70ce87b47237f6e60e549c
MD5 1f16e7e0e8a7e96d4a91a8033a3ff436
BLAKE2b-256 cbfbb76335902e4b41b57bf6504fd0e455e46c618b12b488e4c333ccbe4a4e1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: httmcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa13ac81315d9d1dd8800d6ea83c975393dfe93f2ab43b132ef44ceefc3b337f
MD5 31fd24a64350dc2c4e64cb312d60f6cb
BLAKE2b-256 0db4c74f5567f85be6fb1862c4d7d15d68b3737aed623d19eb2bc677bf49c2ea

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