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)

Command Line Interface

HTTMCP provides a CLI to quickly deploy OpenAPI services with Nchan MCP Transport:

# Basic usage
python -m httmcp -f openapi.json -p http://nchan:80

# Advanced usage with all options
python -m httmcp \
  --openapi-file openapi.json \
  --name "my-openapi-service" \
  --publish-server http://nchan:80 \
  --host 0.0.0.0 \
  --port 8080 \

CLI arguments:

  • -f, --openapi-file: OpenAPI specification file path or URL (required)
  • -n, --name: Name for the MCP server (default: derived from OpenAPI)
  • -p, --publish-server: Nchan publish server URL (required)
  • -H, --host: Host to bind the server (default: 0.0.0.0)
  • -P, --port: Port to bind the server (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.2.1.tar.gz (5.9 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.2.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for httmcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2f056308efc873a8f59aba4be0581c2745b7ccc9d73a3afa35c062640ef2a7bc
MD5 20ebae6114216186dabf438071fdd60f
BLAKE2b-256 4cf7adc0a9bd38db04927642c927a04186dbbfcf5535f3f913de88a676c9fcb4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: httmcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b89858376d5468ed81ecbde48d8dc288ea62afc8a07f329aeb31aa819c5a1b73
MD5 de1cb613db30e6a2fec761201c5088d9
BLAKE2b-256 913b799cf4a8e1306d0c533b4642f28bc9969ca5be4e44d545af40a20fc0eae6

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