moving things around now that /react is moving to use-mcp
This commit is contained in:
parent
7ea70144b7
commit
d41e92812f
5 changed files with 22 additions and 1264 deletions
27
package.json
27
package.json
|
@ -1,21 +1,25 @@
|
||||||
{
|
{
|
||||||
"name": "mcp-remote",
|
"name": "mcp-remote",
|
||||||
"version": "0.0.10",
|
"version": "0.0.10",
|
||||||
|
"description": "Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth",
|
||||||
|
"keywords": [
|
||||||
|
"mcp",
|
||||||
|
"stdio",
|
||||||
|
"sse",
|
||||||
|
"remote",
|
||||||
|
"oauth"
|
||||||
|
],
|
||||||
|
"author": "Glen Maddern <glen@cloudflare.com>",
|
||||||
|
"repository": "https://github.com/geelen/remote-mcp",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
|
||||||
"mcp-remote": "dist/cli/proxy.js"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"README.md",
|
"README.md",
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"exports": {
|
"main": "dist/index.js",
|
||||||
"./react": {
|
"bin": {
|
||||||
"types": "./dist/react/index.d.ts",
|
"mcp-remote": "dist/cli/proxy.js"
|
||||||
"require": "./dist/react/index.js",
|
|
||||||
"import": "./dist/react/index.js"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsup --watch",
|
"dev": "tsup --watch",
|
||||||
|
@ -39,9 +43,8 @@
|
||||||
},
|
},
|
||||||
"tsup": {
|
"tsup": {
|
||||||
"entry": [
|
"entry": [
|
||||||
"src/cli/client.ts",
|
"src/client.ts",
|
||||||
"src/cli/proxy.ts",
|
"src/proxy.ts"
|
||||||
"src/react/index.ts"
|
|
||||||
],
|
],
|
||||||
"format": [
|
"format": [
|
||||||
"esm"
|
"esm"
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js'
|
||||||
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'
|
||||||
import { ListResourcesResultSchema, ListToolsResultSchema } from '@modelcontextprotocol/sdk/types.js'
|
import { ListResourcesResultSchema, ListToolsResultSchema } from '@modelcontextprotocol/sdk/types.js'
|
||||||
import { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js'
|
import { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js'
|
||||||
import { NodeOAuthClientProvider, setupOAuthCallbackServer, parseCommandLineArgs, setupSignalHandlers } from './shared.js'
|
import { NodeOAuthClientProvider, setupOAuthCallbackServer, parseCommandLineArgs, setupSignalHandlers } from './shared'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function to run the client
|
* Main function to run the client
|
||||||
|
@ -33,13 +33,11 @@ async function runClient(serverUrl: string, callbackPort: number) {
|
||||||
// Create the client
|
// Create the client
|
||||||
const client = new Client(
|
const client = new Client(
|
||||||
{
|
{
|
||||||
name: 'mcp-cli',
|
name: 'mcp-remote',
|
||||||
version: '0.1.0',
|
version: require('../package.json').version,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
capabilities: {
|
capabilities: {},
|
||||||
sampling: {},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
||||||
import { NodeOAuthClientProvider, setupOAuthCallbackServer, parseCommandLineArgs, setupSignalHandlers } from './shared.js'
|
import { NodeOAuthClientProvider, setupOAuthCallbackServer, parseCommandLineArgs, setupSignalHandlers } from './shared'
|
||||||
import { connectToRemoteServer, mcpProxy } from '../lib/utils.js'
|
import { connectToRemoteServer, mcpProxy } from './lib/utils'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function to run the proxy
|
* Main function to run the proxy
|
1243
src/react/index.ts
1243
src/react/index.ts
File diff suppressed because it is too large
Load diff
|
@ -18,7 +18,7 @@ import {
|
||||||
OAuthTokens,
|
OAuthTokens,
|
||||||
OAuthTokensSchema,
|
OAuthTokensSchema,
|
||||||
} from '@modelcontextprotocol/sdk/shared/auth.js'
|
} from '@modelcontextprotocol/sdk/shared/auth.js'
|
||||||
import { OAuthCallbackServerOptions, OAuthProviderOptions } from '../lib/types.js'
|
import { OAuthCallbackServerOptions, OAuthProviderOptions } from './lib/types'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the OAuthClientProvider interface for Node.js environments.
|
* Implements the OAuthClientProvider interface for Node.js environments.
|
Loading…
Add table
Add a link
Reference in a new issue