Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,6 @@ Local stdio config:
}
```

Remote Streamable HTTP config:

```json
{
"mcpServers": {
"relaycast": {
"type": "streamable-http",
"url": "https://api.relaycast.dev/mcp"
}
}
}
```

## CLI

Use the same command surface as the MCP tools from a terminal:
Expand Down
83 changes: 0 additions & 83 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2614,87 +2614,6 @@ paths:
schema:
$ref: '#/components/schemas/ErrorResponse'

/.well-known/mcp/server-card.json:
get:
summary: MCP server card
description: MCP server metadata for client discovery
tags:
- MCP
servers:
- url: https://api.relaycast.dev
- url: http://localhost:7528
responses:
'200':
description: MCP server card
content:
application/json:
schema:
type: object

/.well-known/mcp-config:
get:
summary: MCP config schema
description: Smithery-compatible MCP config schema discovery endpoint
tags:
- MCP
servers:
- url: https://api.relaycast.dev
- url: http://localhost:7528
responses:
'200':
description: MCP config schema
content:
application/json:
schema:
type: object

/mcp:
get:
summary: MCP streamable HTTP endpoint
description: Streamable HTTP transport endpoint for MCP sessions
tags:
- MCP
servers:
- url: https://api.relaycast.dev
- url: http://localhost:7528
responses:
'200':
description: MCP response
content:
application/json:
schema:
type: object
post:
summary: MCP streamable HTTP endpoint
description: Streamable HTTP transport endpoint for MCP sessions
tags:
- MCP
servers:
- url: https://api.relaycast.dev
- url: http://localhost:7528
responses:
'200':
description: MCP response
content:
application/json:
schema:
type: object
delete:
summary: MCP streamable HTTP endpoint
description: Streamable HTTP transport endpoint for MCP sessions
tags:
- MCP
servers:
- url: https://api.relaycast.dev
- url: http://localhost:7528
responses:
'200':
description: MCP response
content:
application/json:
schema:
type: object

# ── A2A ──────────────────────────────────────────────────────────────
/.well-known/agent-card.json:
servers:
Expand Down Expand Up @@ -3151,8 +3070,6 @@ tags:
description: Outbound event subscription management
- name: Webhooks
description: Inbound webhook management and trigger endpoints
- name: MCP
description: MCP discovery and streamable transport endpoints
- name: A2A
description: Agent-to-Agent protocol gateway
- name: Certify
Expand Down
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
},
"dependencies": {
"@hono/node-server": "^1.13.7",
"@modelcontextprotocol/sdk": "^1.26.0",
"@relaycast/a2a": "1.1.7",
"@relaycast/mcp": "1.1.7",
"@relaycast/types": "1.1.7",
"better-sqlite3": "^11.10.0",
"drizzle-orm": "^0.45.1",
Expand Down
13 changes: 1 addition & 12 deletions packages/engine/src/__tests__/conformance/node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
* Conformance suite for the in-process Node adapter. These assert the
* parity-critical realtime invariants the Cloudflare DOs guarantee — sequence
* monotonicity, mute filtering, resync (ring + DB gap-fill), presence sweep,
* rate limiting, MCP session routing, and force-disconnect — so the same suite
* rate limiting, and force-disconnect — so the same suite
* can later run against the DO adapter to prove cross-runtime parity.
*/
describe('node adapter conformance', () => {
Expand Down Expand Up @@ -163,17 +163,6 @@ describe('node adapter conformance', () => {
});
});

describe('mcp session routing', () => {
it('returns 404 for an unknown session id', async () => {
const res = await stack.app.request('/mcp', {
method: 'POST',
headers: { 'content-type': 'application/json', 'mcp-session-id': 'does-not-exist' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'ping' }),
});
expect(res.status).toBe(404);
});
});

describe('http integration: channel message delivery', () => {
it('delivers message.created to joined channel members with both seqs', async () => {
const ws = await createWorkspace(stack.app, 'deliver-ws');
Expand Down
6 changes: 1 addition & 5 deletions packages/engine/src/adapters/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { InProcessPresence, type InProcessPresenceOptions } from './presence.js'
import { InProcessRateLimiter } from './rate-limit.js';
import { InProcessKeyValueStore } from './kv.js';
import { InProcessEventQueue } from './event-queue.js';
import { InProcessMcpSessionHost } from './mcp.js';
import { LocalFileStorage, createFileRouteHandler, FILE_ROUTE_PREFIX } from './files.js';

export {
Expand All @@ -21,7 +20,6 @@ export {
InProcessRateLimiter,
InProcessKeyValueStore,
InProcessEventQueue,
InProcessMcpSessionHost,
LocalFileStorage,
createFileRouteHandler,
FILE_ROUTE_PREFIX,
Expand All @@ -35,7 +33,7 @@ export type { InProcessPresenceOptions } from './presence.js';
export interface NodeRuntimeOptions {
/** SQLite file path, or ':memory:' for tests. */
dbPath: string;
/** This server's own origin, used for signed file URLs and the MCP base URL. */
/** This server's own origin, used for signed file URLs. */
baseUrl: string;
/** Directory blobs are written to. Default: `<cwd>/relaycast-files`. */
fileDir?: string;
Expand Down Expand Up @@ -102,7 +100,6 @@ export function createNodeRuntime(options: NodeRuntimeOptions): NodeRuntime {
options.fileSecret ?? randomBytes(32).toString('hex'),
);
const webhookQueue = new InProcessEventQueue(db, (err, ctx) => telemetry.captureException(err, ctx));
const mcp = new InProcessMcpSessionHost({ baseUrl: options.baseUrl });

const auth = options.auth ?? new SqliteApiKeyAuthProvider();
const entitlements = options.entitlements ?? new StaticEntitlementsProvider(kv);
Expand All @@ -113,7 +110,6 @@ export function createNodeRuntime(options: NodeRuntimeOptions): NodeRuntime {
connections: realtime,
presence,
rateLimiter,
mcp,
files: fileStorage,
kv,
webhookQueue,
Expand Down
72 changes: 0 additions & 72 deletions packages/engine/src/adapters/node/mcp.ts

This file was deleted.

77 changes: 2 additions & 75 deletions packages/engine/src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { ContentfulStatusCode } from 'hono/utils/http-status';
import { cors } from 'hono/cors';
import { secureHeaders } from 'hono/secure-headers';
import { eq } from 'drizzle-orm';
import { MCP_VERSION } from '@relaycast/mcp';
import type { AppEnv, EngineRuntime } from './env.js';
import type { EngineDeps } from './ports/index.js';
import { engineContext } from './middleware/engine-context.js';
Expand Down Expand Up @@ -42,8 +41,8 @@ import { routingRoutes } from './routes/routing.js';
/**
* Build the platform-agnostic Relaycast engine as a Hono app.
*
* All infrastructure (database, realtime, presence, rate limiting, MCP
* sessions, files, key/value, outbound queue) and the open-core providers
* All infrastructure (database, realtime, presence, rate limiting, files,
* key/value, outbound queue) and the open-core providers
* (auth, entitlements, telemetry) are injected via {@link EngineDeps}. An
* adapter supplies concrete implementations:
* - the Node in-process adapter for self-host (Node + SQLite), or
Expand All @@ -59,7 +58,6 @@ export function createEngine(deps: EngineDeps): Hono<AppEnv> {
connections: deps.connections,
presence: deps.presence,
rateLimiter: deps.rateLimiter,
mcp: deps.mcp,
files: deps.files,
kv: deps.kv,
webhookQueue: deps.webhookQueue,
Expand All @@ -76,77 +74,6 @@ export function createEngine(deps: EngineDeps): Hono<AppEnv> {
app.use('*', cors());
app.use('*', loggerMiddleware);

// MCP server card — before secureHeaders to avoid cross-origin policy issues
app.get('/.well-known/mcp/server-card.json', (c) => {
return c.json({
$schema: 'https://static.modelcontextprotocol.io/schemas/mcp-server-card/v1.json',
version: '1.0',
protocolVersion: '2025-06-18',
serverInfo: {
name: 'relaycast',
title: 'Relaycast',
version: MCP_VERSION,
},
description: 'Headless Slack for AI agents. Channels, threads, DMs, reactions, file sharing, and real-time events.',
iconUrl: 'https://relaycast.dev/favicon.svg',
documentationUrl: 'https://github.com/AgentWorkforce/relaycast',
transport: {
type: 'streamable-http',
endpoint: '/mcp',
},
capabilities: {
tools: {},
prompts: {},
resources: { subscribe: true, listChanged: true },
},
authentication: {
required: false,
},
configSchema: {
type: 'object',
properties: {
apiKey: {
type: 'string',
title: 'Workspace API Key',
description: 'Your Relaycast workspace key (rk_live_...). Optional — you can also authenticate via the set_workspace_key tool after connecting.',
'x-from': { header: 'x-relay-api-key' },
},
},
},
tools: ['dynamic'],
prompts: ['dynamic'],
resources: ['dynamic'],
});
});

// Smithery config schema discovery endpoint
app.get('/.well-known/mcp-config', (c) => {
return c.json({
$schema: 'http://json-schema.org/draft-07/schema#',
type: 'object',
properties: {
relayApiKey: {
type: 'string',
title: 'Workspace API Key',
description: 'Workspace API key (rk_live_...) used to pre-authenticate the MCP session. Optional — you can also authenticate via the set_workspace_key tool after connecting.',
},
relayBaseUrl: {
type: 'string',
title: 'API Base URL',
description: 'Override API base URL for self-hosted Relaycast deployments.',
default: 'https://gateway.relaycast.dev',
},
},
});
});

// MCP Streamable HTTP endpoint — stateful sessions via the McpSessionHost port
app.all('/mcp', async (c) => {
const sessionId = c.req.header('mcp-session-id');
return c.get('engine').mcp.handle(c.req.raw, sessionId ?? undefined);
});

// Secure headers for remaining routes
app.use('*', secureHeaders());

// A2A public and gateway routes before other route groups
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/engine/action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { eq, and, sql } from 'drizzle-orm';
import { eq, and } from 'drizzle-orm';
import type { getDb } from '../db/index.js';
import { actions, actionInvocations, agents } from '../db/schema.js';
import { generateId } from './snowflake.js';
Expand Down
1 change: 0 additions & 1 deletion packages/engine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export type {
PresenceTracker,
RateLimiter,
RateLimitResult,
McpSessionHost,
FileStorage,
KeyValueStore,
EventQueue,
Expand Down
Loading
Loading