Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chatmcp/mcprouter
/ functions
Functions
213 in github.com/chatmcp/mcprouter
⨍
Functions
213
◇
Types & classes
57
↓ 30 callers
Method
Get
(ctx context.Context, key string)
util/redis.go:27
↓ 27 callers
Method
RespErr
(err error)
service/api/context.go:154
↓ 23 callers
Function
db
()
model/base.go:9
↓ 21 callers
Method
String
String returns the string representation of the response.
service/jsonrpc/response.go:13
↓ 14 callers
Method
JSONRPCError
JSONRPCError returns a JSON-RPC error response
service/proxy/context.go:104
↓ 13 callers
Method
Set
(ctx context.Context, key string, value interface{}, expiration time.Duration)
util/redis.go:26
↓ 12 callers
Function
GetAPIContext
GetAPIContext returns the APIContext from the echo.Context
service/api/context.go:38
↓ 10 callers
Method
Close
()
util/redis.go:30
↓ 10 callers
Method
RespData
(data interface{})
service/api/context.go:196
↓ 10 callers
Method
SendEventData
SendEventData will send the event data to the client
service/proxy/writer.go:37
↓ 10 callers
Method
Valid
Valid: valid request params
service/api/context.go:47
↓ 8 callers
Method
Close
()
service/mcpclient/client.go:15
↓ 8 callers
Function
NewRequest
NewRequest creates a new JSON-RPC request.
service/jsonrpc/request.go:14
↓ 6 callers
Function
NewError
NewError creates a new JSON-RPC error.
service/jsonrpc/error.go:18
↓ 6 callers
Method
UnmarshalResult
UnmarshalResult unmarshals the result into a given value.
service/jsonrpc/response.go:20
↓ 5 callers
Method
Done
Done returns the done channel of the session
service/proxy/session.go:98
↓ 5 callers
Method
RespNoAuthMsg
(message string)
service/api/context.go:189
↓ 4 callers
Method
Close
Close client
service/mcpclient/stdio.go:182
↓ 4 callers
Method
Error
()
service/mcpclient/client.go:14
↓ 4 callers
Method
ForwardMessage
ForwardMessage forwards a JSON-RPC message to the MCP server and returns the response
service/mcpclient/rest.go:202
↓ 4 callers
Method
ForwardMessage
ForwardMessage forwards a JSON-RPC message to the MCP server and returns the response
service/mcpclient/stdio.go:327
↓ 4 callers
Function
GetServerConfig
GetServerConfig returns the config for the given key
service/mcpserver/config.go:32
↓ 4 callers
Method
ProxyInfo
ProxyInfo returns the proxy info
service/api/context.go:63
↓ 3 callers
Method
Connect
Connect connects to the mcp server
service/api/context.go:92
↓ 3 callers
Method
DeleteClient
DeleteClient deletes the client from the clients store
service/proxy/context.go:78
↓ 3 callers
Function
GenUUID
()
util/hash.go:15
↓ 3 callers
Function
GetRedisHandler
GetRedisHandler returns a Redis handler
util/redis.go:133
↓ 3 callers
Method
JSONRPCResponse
JSONRPCResponse returns a JSON-RPC response
service/proxy/context.go:111
↓ 3 callers
Function
NewClient
NewClient creates a new client
service/mcpclient/client.go:26
↓ 3 callers
Function
NewSSEWriter
NewSSEWriter will create SSE writer from request context
service/proxy/writer.go:18
↓ 3 callers
Method
SendMessage
(message []byte)
service/mcpclient/client.go:17
↓ 3 callers
Method
ServerConfig
ServerConfig returns the server config
service/api/context.go:77
↓ 3 callers
Method
SetProxyInfo
(proxyInfo *proxy.ProxyInfo)
service/api/context.go:67
↓ 3 callers
Function
getRedisContext
()
service/proxy/cache.go:28
↓ 3 callers
Function
getRedisHandler
获取Redis操作接口
service/proxy/cache.go:19
↓ 3 callers
Function
validateSSEContext
validateSSEContext validates and returns SSE context
handler/proxy/common.go:52
↓ 2 callers
Method
Command
Command returns the command of the session
service/proxy/session.go:48
↓ 2 callers
Function
CreateServerLog
CreateServerLog creates a new server log
model/serverlog.go:45
↓ 2 callers
Method
DeleteSession
DeleteSession deletes the session from the sessions store
service/proxy/context.go:59
↓ 2 callers
Function
FindServer
(name, authorName string)
model/server.go:40
↓ 2 callers
Method
ForwardMessage
(request *jsonrpc.Request)
service/mcpclient/client.go:18
↓ 2 callers
Function
GetClient
GetClient gets the database connection
util/db.go:81
↓ 2 callers
Method
GetClient
GetClient returns the client from the clients store
service/proxy/context.go:69
↓ 2 callers
Method
GetJSONRPCRequest
GetJSONRPCRequest returns the JSON-RPC request from the request body
service/proxy/context.go:87
↓ 2 callers
Function
GetServerTools
(serverKey string)
model/tool.go:58
↓ 2 callers
Function
GetServers
(page int, limit int)
model/server.go:68
↓ 2 callers
Method
GetSessionID
GetSessionID returns the session ID for the proxy info
service/proxy/proxy.go:43
↓ 2 callers
Function
Init
()
cmd/root.go:32
↓ 2 callers
Method
JSONRPCAcceptResponse
JSONRPCAcceptResponse returns a JSON-RPC accept response
service/proxy/context.go:116
↓ 2 callers
Method
ListTools
()
service/mcpclient/client.go:21
↓ 2 callers
Function
MD5
MD5 returns the MD5 hash of the given string
util/hash.go:11
↓ 2 callers
Method
OnNotification
(handler func(message []byte))
service/mcpclient/client.go:16
↓ 2 callers
Method
Ping
(ctx context.Context)
util/redis.go:29
↓ 2 callers
Method
Start
Start will start the http server
service/api/server.go:32
↓ 2 callers
Method
StoreClient
StoreClient stores the client in the clients store
service/proxy/context.go:64
↓ 2 callers
Function
StoreProxyInfo
StoreProxyInfo stores the proxy info to redis
service/proxy/cache.go:33
↓ 2 callers
Method
StoreSession
StoreSession stores the session in the sessions store
service/proxy/context.go:54
↓ 2 callers
Method
ToServerLog
ToServerLog converts a ProxyInfo to a ServerLog
service/proxy/proxy.go:48
↓ 2 callers
Function
createProxyInfo
createProxyInfo creates basic ProxyInfo structure with server config
handler/proxy/common.go:61
↓ 2 callers
Function
validateKeyAndConfig
validateKeyAndConfig validates key parameter and retrieves server configuration
handler/proxy/common.go:35
↓ 1 callers
Method
CallTool
(params *jsonrpc.CallToolParams)
service/mcpclient/client.go:22
↓ 1 callers
Method
CloseClient
()
service/proxy/session.go:90
↓ 1 callers
Function
CreateAPIBetaMiddleware
()
service/api/middleware.go:24
↓ 1 callers
Function
CreateAPIMiddleware
()
service/api/middleware.go:12
↓ 1 callers
Function
CreateAPIV1Middleware
()
service/api/middleware.go:54
↓ 1 callers
Function
CreateServer
(server *Server)
model/server.go:28
↓ 1 callers
Method
Del
(ctx context.Context, keys ...string)
util/redis.go:28
↓ 1 callers
Function
DeleteProxyInfo
DeleteProxyInfo deletes the proxy info from redis
service/proxy/cache.go:79
↓ 1 callers
Function
Execute
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the r
cmd/root.go:25
↓ 1 callers
Function
FindServerByKey
(serverKey string)
model/server.go:59
↓ 1 callers
Function
FindServerByUUID
(uuid string)
model/server.go:50
↓ 1 callers
Function
FindUserByEmail
(email string)
model/user.go:65
↓ 1 callers
Function
FindUserByUUID
(uuid string)
model/user.go:74
↓ 1 callers
Function
GetProjectsWithFilters
GetProjectsWithFilters gets projects with various filters
model/project.go:90
↓ 1 callers
Function
GetProxyInfo
GetProxyInfo gets the proxy info from redis
service/proxy/cache.go:54
↓ 1 callers
Function
GetSSEContext
GetSSEContext returns the SSEContext from the echo.Context
service/proxy/context.go:36
↓ 1 callers
Method
GetSession
GetSession returns the session from the sessions store
service/proxy/context.go:45
↓ 1 callers
Function
InitConfigWithFile
InitConfigWithFile will read config from file
util/config.go:11
↓ 1 callers
Function
InitDBWithName
InitDBWithName initializes the database connection
util/db.go:31
↓ 1 callers
Function
InitRedisWithName
InitRedisWithName initializes the redis connection
util/redis.go:55
↓ 1 callers
Method
Initialize
(params *jsonrpc.InitializeParams)
service/mcpclient/client.go:19
↓ 1 callers
Method
JSONRPCStreamResponse
JSONRPCStreamResponse returns a JSON-RPC response in SSE format for streaming
service/proxy/context.go:121
↓ 1 callers
Method
JSONRPCStreamStart
JSONRPCStreamStart initiates a streaming response and returns the writer for continued streaming
service/proxy/context.go:143
↓ 1 callers
Method
Key
Key returns the key of the session
service/proxy/session.go:43
↓ 1 callers
Method
Messages
Messages returns the messages channel of the session
service/proxy/session.go:68
↓ 1 callers
Function
NewAPIServer
NewAPIServer will create API server
service/api/server.go:16
↓ 1 callers
Function
NewErrorResponse
NewErrorResponse creates a new error response.
service/jsonrpc/response.go:41
↓ 1 callers
Function
NewRestClient
NewRestClient creates a new RestClient.
service/mcpclient/rest.go:32
↓ 1 callers
Function
NewSSEServer
NewSSEServer will create SSE server
service/proxy/server.go:18
↓ 1 callers
Function
NewSSESession
NewSSESession will create a new SSE session
service/proxy/session.go:21
↓ 1 callers
Function
NewStdioClient
NewStdioClient creates a new StdioClient.
service/mcpclient/stdio.go:35
↓ 1 callers
Function
NewValidator
NewValidator: new validator
service/api/validate.go:23
↓ 1 callers
Method
NotificationsInitialized
()
service/mcpclient/client.go:20
↓ 1 callers
Method
Route
Route will create the routes for http server
service/proxy/server.go:27
↓ 1 callers
Method
Route
Route will create the routes for http server
service/api/server.go:23
↓ 1 callers
Function
SaveServerTools
(serverKey string, tools []*jsonrpc.Tool)
service/tools.go:12
↓ 1 callers
Function
SaveUser
SaveUser saves the user information using email as the unique key. If a user with the given email exists, it updates the record; otherwise, it creates
model/user.go:35
↓ 1 callers
Method
SendMessage
SendMessage sends a JSON-RPC message to the MCP server and returns the response
service/mcpclient/rest.go:82
↓ 1 callers
Method
SendMessage
SendMessage sends a JSON-RPC message to the MCP server and returns the response
service/mcpclient/stdio.go:237
↓ 1 callers
Method
Start
Start will start the http server
service/proxy/server.go:33
next →
1–100 of 213, ranked by callers