
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@enconvo/mcp
Advanced tools
OAuth authentication utilities for MCP (Model Context Protocol) clients, providing secure authentication flows for connecting to OAuth-protected MCP servers.
npm install @enconvo/mcp-oauth @modelcontextprotocol/sdk
pnpm add @enconvo/mcp-oauth @modelcontextprotocol/sdk
import { OAuthFlowManager } from '@enconvo/mcp-oauth';
const flowManager = new OAuthFlowManager(
'https://api.example.com/mcp', // MCP server URL
'my-mcp-client' // Client name
);
try {
const tools = await flowManager.executeOAuthFlow();
console.log('Available tools:', tools);
} catch (error) {
console.error('Authentication failed:', error);
}
import { SimpleOAuthClientProvider } from '@enconvo/mcp-oauth';
import { OAuthClientMetadata } from '@modelcontextprotocol/sdk/shared/auth.js';
const clientMetadata: OAuthClientMetadata = {
client_name: 'my-app',
redirect_uris: ['http://localhost:8080/callback'],
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code'],
token_endpoint_auth_method: 'client_secret_post',
scope: 'mcp:tools'
};
const provider = new SimpleOAuthClientProvider(
'http://localhost:8080/callback',
clientMetadata
);
import { findAvailablePort, isPortAvailable } from '@enconvo/mcp-oauth';
// Check if a specific port is available
const available = await isPortAvailable(8080);
// Find the next available port starting from 8080
const port = await findAvailablePort(8080);
console.log(`Using port: ${port}`);
@modelcontextprotocol/sdk
>= 1.17.3@enconvo/api
(peer dependency, optional for non-Enconvo environments)Main class for managing OAuth authentication flows with MCP servers.
new OAuthFlowManager(serverUrl: string, clientName: string)
executeOAuthFlow(): Promise<any>
- Execute complete OAuth flow and return MCP tools listOAuth client provider implementation with secure token storage.
new SimpleOAuthClientProvider(redirectUrl: string | URL, clientMetadata: OAuthClientMetadata)
clientInformation(): Promise<OAuthClientInformation | undefined>
saveClientInformation(clientInformation: OAuthClientInformationFull): Promise<void>
tokens(): Promise<OAuthTokens | undefined>
saveTokens(tokens: OAuthTokens): Promise<void>
isPortAvailable(port: number): Promise<boolean>
- Check if a port is availablefindAvailablePort(startPort: number, maxAttempts?: number): Promise<number>
- Find next available portMIT © Enconvo
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
FAQs
OAuth authentication utilities for MCP (Model Context Protocol) clients
The npm package @enconvo/mcp receives a total of 3 weekly downloads. As such, @enconvo/mcp popularity was classified as not popular.
We found that @enconvo/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.